/*
Theme Name: SVDM Design
Theme URI: https://svdmdesign.com
Author: SVDM Design
Author URI: https://svdmdesign.com
Description: Custom theme for SVDM Design — steel manufacturing and CAD studio. Dark industrial/blueprint design system with WooCommerce support for physical products (Collections) and downloadable DXF files.
Version: 1.0
Requires PHP: 7.4
Text Domain: svdm-design
*/

:root{
    --bg: #101214;
    --bg2: #191c1f;
    --panel: #1e2226;
    --line: #3a4148;
    --line-soft: #2a3036;
    --text: #eceae4;
    --text-dim: #8b939a;
    --accent: #4d9fff;
    --accent-dim: #2f6fcc;
  }
  *{box-sizing:border-box; margin:0; padding:0;}
  html{scroll-behavior:smooth;}
  body{
    background:var(--bg);
    color:var(--text);
    font-family:'Inter', sans-serif;
    line-height:1.5;
    overflow-x:hidden;
    position:relative;
  }
  body::before{
    content:'';
    position:fixed;
    inset:0;
    background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22220%22%20height%3D%22220%22%20viewBox%3D%220%200%20220%20220%22%3E%20%3Cg%20fill%3D%22none%22%20stroke%3D%22%234d9fff%22%20stroke-width%3D%222.2%22%20stroke-linecap%3D%22round%22%3E%20%20%20%3C%21--%20central%20diamond%20motif%20--%3E%20%20%20%3Cpath%20d%3D%22M110%2C60%20L128%2C90%20L110%2C120%20L92%2C90%20Z%22/%3E%20%20%20%3Ccircle%20cx%3D%22110%22%20cy%3D%2290%22%20r%3D%228%22/%3E%20%20%20%3C%21--%20symmetric%20scrolls%20left%20--%3E%20%20%20%3Cpath%20d%3D%22M92%2C90%20C60%2C90%2055%2C60%2030%2C60%20C10%2C60%205%2C80%2020%2C90%20C32%2C98%2045%2C85%2040%2C72%22/%3E%20%20%20%3Cpath%20d%3D%22M92%2C110%20C60%2C120%2055%2C150%2030%2C150%20C10%2C150%205%2C130%2020%2C120%20C32%2C112%2045%2C125%2040%2C138%22/%3E%20%20%20%3C%21--%20symmetric%20scrolls%20right%20--%3E%20%20%20%3Cpath%20d%3D%22M128%2C90%20C160%2C90%20165%2C60%20190%2C60%20C210%2C60%20215%2C80%20200%2C90%20C188%2C98%20175%2C85%20180%2C72%22/%3E%20%20%20%3Cpath%20d%3D%22M128%2C110%20C160%2C120%20165%2C150%20190%2C150%20C210%2C150%20215%2C130%20200%2C120%20C188%2C112%20175%2C125%20180%2C138%22/%3E%20%20%20%3C%21--%20small%20leaf%20accents%20--%3E%20%20%20%3Cpath%20d%3D%22M110%2C60%20C100%2C45%20100%2C25%20110%2C10%20C120%2C25%20120%2C45%20110%2C60%20Z%22/%3E%20%20%20%3Cpath%20d%3D%22M110%2C120%20C100%2C135%20100%2C155%20110%2C170%20C120%2C155%20120%2C135%20110%2C120%20Z%22/%3E%20%20%20%3C%21--%20corner%20dots%20--%3E%20%20%20%3Ccircle%20cx%3D%2220%22%20cy%3D%2220%22%20r%3D%224%22/%3E%20%20%20%3Ccircle%20cx%3D%22200%22%20cy%3D%2220%22%20r%3D%224%22/%3E%20%20%20%3Ccircle%20cx%3D%2220%22%20cy%3D%22200%22%20r%3D%224%22/%3E%20%20%20%3Ccircle%20cx%3D%22200%22%20cy%3D%22200%22%20r%3D%224%22/%3E%20%20%20%3Ccircle%20cx%3D%22110%22%20cy%3D%2220%22%20r%3D%223%22/%3E%20%20%20%3Ccircle%20cx%3D%22110%22%20cy%3D%22200%22%20r%3D%223%22/%3E%20%3C/g%3E%20%3C/svg%3E");
    background-size:220px 220px;
    background-repeat:repeat;
    opacity:0.08;
    pointer-events:none;
    z-index:0;
  }
  header, .hero, section, footer, .svdm-woo-wrap, .woocommerce, .woocommerce-page {
    position:relative;
    z-index:1;
  }
  .mono{font-family:'IBM Plex Mono', monospace;}
  .display{font-family:'Big Shoulders Display', sans-serif; text-transform:uppercase;}

  /* NAV */
  header{
    position:fixed; top:0; left:0; right:0; z-index:100;
    display:flex; align-items:center; justify-content:space-between;
    padding:20px 48px;
    background:rgba(16,18,20,0.85);
    backdrop-filter:blur(8px);
    border-bottom:1px solid var(--line-soft);
  }
  .logo-mark{display:flex; align-items:center; gap:12px;}
  .logo-mark img{height:35.7px; filter:invert(1);}
  .logo-mark span{font-family:'Big Shoulders Display'; font-weight:700; font-size:20px; letter-spacing:1px;}
  nav ul{list-style:none; display:flex; gap:36px;}
  nav a{color:var(--text-dim); text-decoration:none; font-size:14px; font-weight:500; letter-spacing:0.3px; transition:color .2s;}
  nav a:hover{color:var(--accent);}
  .cart-indicator a{
    display:flex; align-items:center; gap:2px; position:relative; text-decoration:none;
    font-size:16px; color:var(--text-dim); padding:4px;
  }
  .cart-indicator a:hover{color:var(--accent);}
  .cart-count-badge{
    display:none; align-items:center; justify-content:center;
    position:absolute; top:-4px; right:-6px;
    background:var(--accent); color:#fff; border-radius:50%;
    width:15px; height:15px; font-size:9px; font-family:'IBM Plex Mono';
  }
  .nav-cta{
    border:1px solid var(--accent); color:var(--accent) !important;
    padding:8px 18px; font-family:'IBM Plex Mono';
  }
  .nav-cta:hover{background:var(--accent); color:#ffffff !important;}

  /* HERO */
  .hero{
    min-height:100vh;
    display:flex; align-items:center;
    padding:120px 48px 60px;
    position:relative;
    background:
      linear-gradient(var(--bg2) 1px, transparent 1px),
      linear-gradient(90deg, var(--bg2) 1px, transparent 1px);
    background-size:48px 48px;
    background-color:var(--bg);
  }
  .hero-grid{
    display:grid; grid-template-columns:1.1fr 1fr; gap:60px;
    max-width:1280px; margin:0 auto; width:100%;
    align-items:center;
  }
  .eyebrow{
    font-family:'IBM Plex Mono'; color:var(--accent); font-size:13px;
    letter-spacing:2px; margin-bottom:20px; display:flex; align-items:center; gap:10px;
  }
  .eyebrow::before{content:''; width:24px; height:1px; background:var(--accent);}
  h1{
    font-size:clamp(42px, 6vw, 76px);
    line-height:0.98;
    font-weight:700;
    letter-spacing:0.5px;
    margin-bottom:26px;
  }
  h1 em{font-style:normal; color:var(--accent);}
  .hero p.sub{
    font-size:17px; color:var(--text-dim); max-width:460px; margin-bottom:34px;
  }
  .btn-row{display:flex; gap:16px; flex-wrap:wrap;}
  .btn{
    display:inline-flex; align-items:center; gap:10px;
    padding:14px 28px; font-size:14px; font-weight:600;
    text-decoration:none; letter-spacing:0.3px;
    border-radius:2px; transition:all .2s;
  }
  .btn-primary{background:var(--accent); color:#ffffff;}
  .btn-primary:hover{background:#6fb2ff; transform:translateY(-1px);}
  .btn-outline{border:1px solid var(--line); color:var(--text);}
  .btn-outline:hover{border-color:var(--text-dim);}

  /* HERO SVG - toolpath drawing */
  .hero-visual{position:relative;}
  .dim-label{
    position:absolute; font-family:'IBM Plex Mono'; font-size:11px; color:var(--text-dim);
    letter-spacing:0.5px;
  }
  .cut-path{
    stroke:var(--accent);
    stroke-width:2;
    fill:none;
    stroke-dasharray:1400;
    stroke-dashoffset:1400;
    animation:draw 3.2s ease-out forwards;
  }
  .fill-shape{
    fill:var(--panel);
    stroke:var(--line);
    stroke-width:1;
    opacity:0;
    animation:fillIn 1s ease-out 3s forwards;
  }
  @keyframes draw{ to { stroke-dashoffset:0; } }
  @keyframes fillIn{ to { opacity:1; } }
  .spark{
    fill:var(--accent);
    opacity:0;
    animation:spark 0.4s ease-out 3.1s forwards, sparkFade 0.6s ease-in 3.4s forwards;
  }
  @keyframes spark{ from{opacity:0; r:0;} to{opacity:1; r:3;} }
  @keyframes sparkFade{ to{opacity:0;} }

  @media (prefers-reduced-motion: reduce){
    .cut-path{animation:none; stroke-dashoffset:0;}
    .fill-shape{animation:none; opacity:1;}
    .spark{display:none;}
  }

  /* SECTION SHARED */
  section{padding:100px 48px;}
  .section-inner{max-width:1280px; margin:0 auto;}
  .section-head{
    display:flex; justify-content:space-between; align-items:flex-end;
    margin-bottom:56px; flex-wrap:wrap; gap:20px;
    border-bottom:1px solid var(--line-soft); padding-bottom:24px;
  }
  .section-head .tag{font-family:'IBM Plex Mono'; color:var(--accent); font-size:13px; letter-spacing:1.5px; margin-bottom:8px; display:block;}
  .section-head h2{font-size:clamp(28px,3.5vw,42px); font-weight:700;}
  .section-head p{color:var(--text-dim); max-width:360px; font-size:14px;}

  /* PROCESS - dimension-style markers instead of 01/02/03 */
  .process{background:var(--bg2);}
  .process-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:var(--line-soft);}
  .process-step{background:var(--bg2); padding:32px 28px;}
  .process-step .marker{font-family:'IBM Plex Mono'; color:var(--accent); font-size:13px; margin-bottom:16px;}
  .process-step h3{font-size:19px; margin-bottom:10px; font-weight:600;}
  .process-step p{color:var(--text-dim); font-size:14px;}

  /* SHOP */
  .product-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:28px;}
  .product-card{
    background:var(--panel); border:1px solid var(--line-soft); border-radius:2px;
    overflow:hidden; transition:border-color .2s, transform .2s;
  }
  .product-card:hover{border-color:var(--accent); transform:translateY(-4px);}
  .product-thumb{
    aspect-ratio:4/3; background:
      repeating-linear-gradient(45deg, #22262a, #22262a 10px, #1c1f22 10px, #1c1f22 20px);
    display:flex; align-items:center; justify-content:center;
    color:var(--text-dim); font-family:'IBM Plex Mono'; font-size:12px; text-align:center;
    padding:20px; border-bottom:1px solid var(--line-soft);
  }
  .product-info{padding:20px;}
  .product-info .cat{font-family:'IBM Plex Mono'; color:var(--accent); font-size:11px; letter-spacing:1px;}
  .product-info h3{font-size:17px; margin:8px 0 6px; font-weight:600;}
  .product-info .price{color:var(--text-dim); font-size:14px; font-family:'IBM Plex Mono';}
  .product-info .row{display:flex; justify-content:space-between; align-items:center; margin-top:14px;}
  .mini-btn{
    font-size:12px; font-family:'IBM Plex Mono'; color:#ffffff; background:var(--accent);
    padding:8px 14px; border:none; cursor:pointer; letter-spacing:0.5px;
  }

  /* CUSTOM CTA */
  .custom-cta{
    background:var(--panel); border:1px solid var(--line-soft);
    padding:64px 56px; display:grid; grid-template-columns:1.3fr 1fr; gap:40px; align-items:center;
    position:relative; overflow:hidden;
  }
  .custom-cta::before{
    content:''; position:absolute; top:0; right:0; width:280px; height:280px;
    background:radial-gradient(circle, rgba(77,159,255,0.14), transparent 70%);
  }
  .custom-cta h2{font-size:clamp(26px,3vw,36px); margin-bottom:16px; font-weight:700;}
  .custom-cta p{color:var(--text-dim); font-size:15px; max-width:480px;}

  /* FOOTER */
  footer{padding:60px 48px 40px; border-top:1px solid var(--line-soft);}
  .footer-grid{max-width:1280px; margin:0 auto; display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px;}
  footer h4{font-family:'IBM Plex Mono'; font-size:13px; color:var(--text-dim); margin-bottom:16px; letter-spacing:1px;}
  footer ul{list-style:none;}
  footer li{margin-bottom:10px;}
  footer a{color:var(--text); text-decoration:none; font-size:14px;}
  footer a:hover{color:var(--accent);}
  .footer-bottom{
    max-width:1280px; margin:40px auto 0; padding-top:24px; border-top:1px solid var(--line-soft);
    display:flex; justify-content:space-between; color:var(--text-dim); font-size:13px; font-family:'IBM Plex Mono';
    flex-wrap:wrap; gap:12px;
  }

  @media (max-width:900px){
    .hero-grid{grid-template-columns:1fr;}
    .process-grid{grid-template-columns:repeat(2,1fr);}
    .product-grid{grid-template-columns:1fr 1fr;}
    .custom-cta{grid-template-columns:1fr;}
    .footer-grid{grid-template-columns:1fr 1fr;}
    nav ul{display:none;}
  }
  @media (max-width:560px){
    .product-grid{grid-template-columns:1fr;}
    section{padding:70px 24px;}
    header{padding:16px 24px;}
  }
/* ==========================================================================
   WooCommerce overrides — reskins WooCommerce's default markup to match
   the SVDM Design system instead of writing custom cart/checkout logic.
   ========================================================================== */

.woocommerce, .woocommerce-page {
  color: var(--text);
  font-family: 'Inter', sans-serif;
}

.svdm-woo-wrap { display: block; padding-top: 140px; }

/* Shop / archive grid */
ul.products { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; padding: 0 48px 48px; max-width: 1280px; margin: 0 auto !important; }
ul.products li.product {
  background: var(--panel); border: 1px solid var(--line-soft); border-radius: 2px;
  overflow: hidden; transition: border-color .2s, transform .2s; padding: 0 !important; margin: 0 !important;
}
ul.products li.product:hover { border-color: var(--accent); transform: translateY(-4px); }
ul.products li.product a { text-decoration: none; color: inherit; }
ul.products li.product img { aspect-ratio: 4/3; object-fit: cover; border-bottom: 1px solid var(--line-soft); }
ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Inter'; font-size: 17px; font-weight: 600; padding: 20px 20px 6px; margin: 0;
}
ul.products li.product .price {
  font-family: 'IBM Plex Mono'; color: var(--text-dim); font-size: 14px; padding: 0 20px 16px; display: block;
}
ul.products li.product .price ins { color: var(--text); text-decoration: none; }
ul.products li.product .button {
  margin: 0 20px 20px; display: inline-block; font-family: 'IBM Plex Mono'; font-size: 12px;
  color: #fff !important; background: var(--accent); padding: 8px 14px; border: none; letter-spacing: 0.5px;
}

/* Category / collection tiles (product_cat archive listing on shop.html-equivalent) */
.woocommerce-products-header { padding: 0 48px 20px; max-width: 1280px; margin: 0 auto; }
.term-description, .woocommerce-products-header__title { font-family: 'Big Shoulders Display'; text-transform: uppercase; font-size: clamp(34px,4.5vw,54px); }

/* Single product page — top padding comes from .svdm-woo-wrap, not duplicated here */
.woocommerce div.product {
  max-width: 1280px; margin: 0 auto; padding: 0 48px 100px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
}
.woocommerce div.product .woocommerce-product-gallery { background: var(--bg2); border: 1px solid var(--line-soft); }
.woocommerce div.product .product_title {
  font-family: 'Big Shoulders Display'; text-transform: uppercase; font-size: clamp(30px,3.5vw,44px); font-weight: 700; margin: 12px 0 14px;
}
.woocommerce div.product p.price { font-family: 'IBM Plex Mono'; font-size: 24px; color: var(--text); margin-bottom: 20px; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--text-dim); font-size: 15px; max-width: 460px; margin-bottom: 28px; }
.woocommerce div.product form.cart .button {
  background: var(--accent); color: #fff; border: none; padding: 14px 28px; font-family: 'IBM Plex Mono'; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; cursor: pointer;
}
.woocommerce div.product .quantity input.qty {
  background: var(--panel); border: 1px solid var(--line); color: var(--text); font-family: 'IBM Plex Mono'; padding: 10px; width: 60px;
}
.woocommerce table.woocommerce-product-attributes { width: 100%; border-collapse: collapse; margin-bottom: 32px; }
.woocommerce table.woocommerce-product-attributes tr { border-bottom: 1px solid var(--line-soft); }
.woocommerce table.woocommerce-product-attributes th { padding: 12px 0; font-size: 12px; color: var(--text-dim); font-family: 'IBM Plex Mono'; text-align: left; width: 170px; }
.woocommerce table.woocommerce-product-attributes td { padding: 12px 0; font-size: 14px; }

/* Cart / checkout tables */
.woocommerce table.shop_table { border-collapse: collapse; width: 100%; margin: 40px auto; max-width: 1000px; }
.woocommerce table.shop_table th { font-family: 'IBM Plex Mono'; color: var(--text-dim); font-size: 12px; text-align: left; padding: 12px; border-bottom: 1px solid var(--line-soft); }
.woocommerce table.shop_table td { padding: 14px 12px; border-bottom: 1px solid var(--line-soft); }
.woocommerce #payment { background: var(--panel); border: 1px solid var(--line-soft); padding: 24px; }
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button {
  background: var(--accent); color: #fff; border: none; padding: 12px 22px; font-family: 'IBM Plex Mono'; font-size: 13px; letter-spacing: 0.3px; cursor: pointer;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: #6fb2ff; }
.woocommerce .woocommerce-message, .woocommerce .woocommerce-info {
  background: var(--panel); border-left: 3px solid var(--accent); color: var(--text); padding: 14px 18px; font-family: 'IBM Plex Mono'; font-size: 13px;
}

/* Downloadable-file (DXF) product cards get a small badge — set this class on products in the "DXF Files" category via a bit of PHP (see functions.php) */
.svdm-digital-badge {
  display: inline-block; font-family: 'IBM Plex Mono'; font-size: 10px; color: var(--accent);
  border: 1px solid var(--accent); padding: 3px 8px; margin: 10px 20px 0; letter-spacing: 0.5px;
}

/* ==========================================================================
   3D viewer shortcode controls (Solid / Blueprint / Explode)
   ========================================================================== */
.svdm-3d-embed { position: relative; }
.viewer-controls {
  position: absolute; bottom: 52px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; background: rgba(16,18,20,0.85); border: 1px solid var(--line-soft);
  padding: 5px; border-radius: 2px; z-index: 3; backdrop-filter: blur(4px);
}
.viewer-btn {
  font-family: 'IBM Plex Mono'; font-size: 11px; letter-spacing: 0.5px;
  background: none; border: none; color: var(--text-dim);
  padding: 8px 14px; cursor: pointer; border-radius: 2px; transition: all .15s;
}
.viewer-btn:hover { color: var(--text); }
.viewer-btn.active { background: var(--accent); color: #fff; }
.viewer-explode {
  position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 3;
  background: rgba(16,18,20,0.85); border: 1px solid var(--line-soft);
  padding: 6px 12px; border-radius: 2px; backdrop-filter: blur(4px);
}
.viewer-explode label { font-family: 'IBM Plex Mono'; font-size: 10px; color: var(--text-dim); letter-spacing: 0.5px; }
.viewer-explode input[type=range] { accent-color: var(--accent); width: 120px; }

.cart-count-badge { display: none; }
.cart-count-badge.has-items { display: flex !important; }

@media (max-width: 900px) {
  ul.products { grid-template-columns: 1fr 1fr; }
  .woocommerce div.product { grid-template-columns: 1fr; padding: 0 24px 60px; gap: 36px; }
}
@media (max-width: 560px) {
  ul.products { grid-template-columns: 1fr; padding: 24px; }
}
