/* ==========================================================================
   R3D — design tokens
   ========================================================================== */
:root{
  --bg:             #0b0a09;
  --panel:          #141312;
  --panel-2:        #1c1b19;
  --line:           #2b2926;

  --steel:          #9a9c9f;
  --steel-dark:     #55565a;
  --steel-bright:   #c9cbce;

  --orange:         #ff6a1a;
  --orange-deep:    #c4470d;
  --orange-glow:    #ff8a3d;

  --text:           #f4f1ea;
  --text-muted:     #a7a49d;
  --text-faint:     #6f6c66;

  --font-display:   'Vazirmatn', system-ui, sans-serif;
  --font-body:      'Vazirmatn', system-ui, sans-serif;
  --font-mono:       'JetBrains Mono', ui-monospace, monospace;

  --wrap:           1220px;
  --radius:         10px;
  --ease:           cubic-bezier(.22,.68,0,1);
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
html{ overflow-x: hidden; }
body{ max-width: 100%; overflow-x: hidden; position: relative; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *,*::before,*::after{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body{
  margin:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-feature-settings: "ss01" 1;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
button,input,select,textarea{ font-family:inherit; color:inherit; }

.mono{ font-family: var(--font-mono); letter-spacing: 0.02em; }

.wrap{
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
  position: relative;
  z-index: 1;
}

section{ position: relative; }

/* ==========================================================================
   Reusable background texture — keeps every section tied to the
   print-bed / blueprint language instead of sitting on flat black.
   ========================================================================== */
.tex-thread{
  position:absolute; inset:0;
  width:100%; height:100%;
  z-index:0; pointer-events:none;
}
.tex-thread path{ fill:none; stroke: url(#threadGradient); }
.tex-thread circle{ fill: var(--orange-glow); }

@media (max-width: 720px){
  .tex-thread{ display:none; }
}

.tex-mark{
  position:absolute;
  z-index:0; pointer-events:none;
  background-image: url('assets/logo.webp');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.035;
  filter: grayscale(1) contrast(1.05) blur(0.5px);
}
.tex-mark.wm-lg{ width: clamp(260px, 46vw, 620px); height: clamp(260px, 46vw, 620px); }
.tex-mark.wm-md{ width: clamp(200px, 34vw, 420px); height: clamp(200px, 34vw, 420px); }
.tex-mark.wm-right{ right: -120px; }
.tex-mark.wm-left{ left: -120px; }
.tex-mark.wm-center{ left: 50%; transform: translateX(-50%); }
.tex-mark.wm-top{ top: -100px; }
.tex-mark.wm-mid{ top: 50%; transform: translateY(-50%); }
.tex-mark.wm-mid.wm-center{ transform: translate(-50%,-50%); }
.tex-mark.wm-bottom{ bottom: -140px; }
.tex-mark.wm-rot{ transform: rotate(-10deg); }
.tex-mark.wm-mid.wm-rot{ transform: translateY(-50%) rotate(-10deg); }

@media (max-width: 720px){
  .tex-mark{ display:none; }
}

/* corner reticle — small viewfinder ticks, echoes a scan/build volume */
.tex-corner{
  position:absolute; z-index:0; pointer-events:none;
  width: 22px; height: 22px;
  opacity: 0.5;
}
.tex-corner::before, .tex-corner::after{
  content:""; position:absolute; background: var(--steel-dark);
}
.tex-corner::before{ width:100%; height:1px; top:0; }
.tex-corner::after{ width:1px; height:100%; left:0; }
.tex-corner.tc-tl{ top: 28px; left: 28px; }
.tex-corner.tc-tr{ top: 28px; right: 28px; }
.tex-corner.tc-tr::before{ right:0; left:auto; }
.tex-corner.tc-tr::after{ right:0; left:auto; }


/* soft ambient glow behind the printer illustration */
.hero-grid-bg{
  position:absolute; inset:0;
  background-image: radial-gradient(circle at 62% 32%, rgba(255,106,26,0.09), transparent 46%);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active{ transform: translateY(1px); }
.btn-primary{
  background: linear-gradient(180deg, var(--orange-glow), var(--orange) 60%, var(--orange-deep));
  color: #1a0d05;
  box-shadow: 0 0 0 1px rgba(255,106,26,.35), 0 10px 24px -10px rgba(255,106,26,.55);
}
.btn-primary:hover{ filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost{
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}
.btn-ghost:hover{ border-color: var(--steel); background: var(--panel); }
.btn-sm{ padding: 9px 16px; font-size: 0.82rem; }
.btn-lg{ padding: 18px 40px; font-size: 1.05rem; }
.btn-block{ width:100%; }

/* ==========================================================================
   Print rail — fixed side HUD (signature element)
   ========================================================================== */
.print-rail{
  position: fixed;
  left: 18px; top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  display: flex; align-items: center; gap: 12px;
  flex-direction: column;
  pointer-events: none;
}
.rail-track{
  position: relative;
  width: 3px;
  height: 40vh;
  max-height: 340px;
  background: var(--line);
  border-radius: 3px;
}
.rail-fill{
  position:absolute; right:0; left:0; bottom:0;
  width:100%;
  background: linear-gradient(180deg, var(--orange-glow), var(--orange));
  border-radius: 3px;
  height: 0%;
  box-shadow: 0 0 10px rgba(255,106,26,.6);
}
.rail-nozzle{
  position:absolute; right:50%; transform: translate(50%, -50%);
  bottom: 0%;
  transition: bottom .05s linear;
  filter: drop-shadow(0 0 6px rgba(255,106,26,.7));
}
.rail-readout{
  display:flex; flex-direction:column; gap:2px;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align:center;
  writing-mode: vertical-rl;
}
.rail-readout span:last-child{ color: var(--orange); font-weight:600; }

@media (max-width: 880px){
  .print-rail{ display:none; }
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header{
  position: sticky; top:0; z-index: 50;
  background: rgba(11,10,9,.72);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.site-header.scrolled{
  border-bottom-color: var(--line);
  background: rgba(11,10,9,.92);
}
.header-inner{
  display:grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  height: 76px;
  gap: 16px;
}
.brand{ display:flex; align-items:center; gap:10px; flex-shrink:0; min-width:0; justify-self:start; }
.brand-mark{ width:38px; height:38px; border-radius:50%; }
.brand-word{
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  color: var(--text);
}

/* ==========================================================================
   Header — hamburger drawer on ALL screen sizes
   ========================================================================== */
.header-right{
  display:flex; align-items:center; gap: 12px;
  min-width: 0;
}
.header-inner{ display:flex; align-items:center; justify-content:space-between; }

/* --- cart button --- */
.cart-btn{
  position:relative;
  width:42px; height:42px;
  display:grid; place-items:center;
  background: transparent;
  border:1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  cursor:pointer;
  transition: border-color .2s, background .2s, color .2s;
}
.cart-btn:hover{ border-color: var(--orange); color: var(--orange); background: var(--panel); }
.cart-count{
  position:absolute; top:-6px; inset-inline-start:-6px;
  min-width:19px; height:19px; padding:0 5px;
  display:grid; place-items:center;
  background: var(--orange); color:#1a0d05;
  font-family: var(--font-mono); font-size:.66rem; font-weight:700;
  border-radius: 20px;
}
.cart-count.hidden{ display:none; }

/* --- hamburger --- */
.nav-toggle{
  display:flex; flex-direction:column; justify-content:center; gap:5px;
  width:42px; height:42px; padding:0 10px;
  background:none; border:1px solid var(--line); border-radius:6px; cursor:pointer;
  transition: border-color .2s;
}
.nav-toggle:hover{ border-color: var(--orange); }
.nav-toggle span{
  width:100%; height:2px; background: var(--text); border-radius:2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav-toggle.is-open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2){ opacity:0; }
.nav-toggle.is-open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* --- slide-in drawer --- */
.nav-overlay, .cart-overlay{
  position:fixed; inset:0; z-index:70;
  background: rgba(6,5,4,.7);
  backdrop-filter: blur(3px);
}
.main-nav{
  position:fixed; top:0; right:0; bottom:0;
  visibility:hidden;
  z-index:80;
  width: min(330px, 86vw);
  background: var(--panel);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform .38s var(--ease), visibility .38s;
  overflow-y:auto;
}
.main-nav.open{ transform: translateX(0) !important; visibility:visible; }
.nav-inner{ padding: 84px 26px 28px; display:flex; flex-direction:column; }
.nav-label{ color: var(--orange); font-size:.7rem; margin:0 0 18px; }
.main-nav a{
  font-size: 1.02rem;
  color: var(--text-muted);
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition: color .2s, padding-inline-start .2s;
}
.main-nav a:hover{ color: var(--orange); padding-inline-start: 6px; }
.nav-foot{ margin-top: 26px; }
.nav-social{ display:flex; gap:10px; justify-content:center; margin-top:18px; }
.nav-social a{
  width:38px; height:38px; display:grid; place-items:center;
  border:1px solid var(--line); border-radius:50%;
  color: var(--text-muted); padding:0;
  transition: color .2s, border-color .2s;
}
.nav-social a:hover{ color: var(--orange); border-color: var(--orange); padding:0; }
body.nav-open{ overflow:hidden; }

/* ==========================================================================
   Cart drawer
   ========================================================================== */
.cart-drawer{
  position:fixed; top:0; bottom:0; left:0;
  visibility:hidden;
  z-index:80;
  width: min(390px, 92vw);
  background: var(--panel);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  transition: transform .38s var(--ease), visibility .38s;
  display:flex; flex-direction:column;
}
.cart-drawer.open{ transform: translateX(0) !important; visibility:visible; }
.cart-head{
  display:flex; align-items:center; justify-content:space-between;
  padding: 20px 22px; border-bottom:1px solid var(--line);
}
.cart-head h2{ margin:0; font-size:1.05rem; }
.cart-close{
  background:none; border:none; color: var(--text-muted);
  font-size:1.7rem; line-height:1; cursor:pointer; padding:0 4px;
}
.cart-close:hover{ color: var(--orange); }
.cart-body{ flex:1; overflow-y:auto; padding: 14px 18px; }
.cart-empty{ color: var(--text-faint); text-align:center; padding: 40px 0; font-size:.9rem; }
.cart-item{
  display:grid;
  grid-template-columns: 54px 1fr auto auto;
  gap: 12px; align-items:center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.cart-item img{ width:54px; height:54px; object-fit:cover; border-radius:5px; border:1px solid var(--line); }
.ci-info{ min-width:0; }
.ci-info b{ display:block; font-size:.86rem; font-weight:600; margin-bottom:3px; }
.ci-info span{ font-size:.74rem; color: var(--orange); }
.ci-qty{ display:flex; align-items:center; gap:8px; }
.ci-qty span{ min-width:22px; text-align:center; font-size:.85rem; }
.qty-btn{
  width:24px; height:24px; display:grid; place-items:center;
  background: var(--panel-2); border:1px solid var(--line); border-radius:4px;
  color: var(--text); cursor:pointer; font-size:.95rem; line-height:1;
}
.qty-btn:hover{ border-color: var(--orange); color: var(--orange); }
.ci-remove{
  background:none; border:none; color: var(--text-faint);
  font-size:1.3rem; cursor:pointer; line-height:1; padding:0 2px;
}
.ci-remove:hover{ color: #ff8a70; }
.cart-foot{ padding: 18px 22px; border-top:1px solid var(--line); }
.cart-total{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.cart-total b{ color: var(--orange); font-size:1.05rem; }
.cart-quote-note{ font-size:.72rem; color: var(--text-faint); margin: 0 0 12px; }

/* ==========================================================================
   Checkout modal
   ========================================================================== */
.modal{ position:fixed; inset:0; z-index:120; display:grid; place-items:center; padding:20px; }
/* [hidden] باید بر display غلبه کند وگرنه بک‌دراپ نامرئی کلیک‌ها را می‌گیرد */
.modal[hidden], .nav-overlay[hidden], .cart-overlay[hidden], .toast[hidden],
.track-pane[hidden], .cart-foot[hidden], .track-result[hidden]{ display:none !important; }
.modal-backdrop{ position:absolute; inset:0; background:rgba(6,5,4,.78); backdrop-filter:blur(4px); }
.modal-card{
  position:relative; z-index:1;
  width:100%; max-width: 460px; max-height: 92vh; overflow-y:auto;
  background: var(--panel); border:1px solid var(--line); border-radius:12px;
  padding: 30px 26px;
}
.modal-close{
  position:absolute; top:12px; inset-inline-end:16px;
  background:none; border:none; color: var(--text-muted);
  font-size:1.8rem; line-height:1; cursor:pointer;
}
.modal-close:hover{ color: var(--orange); }
.modal-card h2{ margin:0 0 6px; font-size:1.15rem; }
.modal-sub{ color: var(--text-muted); font-size:.85rem; margin:0 0 20px; }
.modal-form label{ display:block; margin-bottom:14px; }
.modal-form label span{ display:block; font-size:.8rem; color: var(--text-muted); margin-bottom:6px; }
.modal-form .hint{ color: var(--text-faint); font-weight:400; font-size:.72rem; }
.modal-form input, .modal-form textarea{
  width:100%; background: var(--panel-2); border:1px solid var(--line);
  border-radius:6px; padding:11px 13px; color: var(--text);
  font-family:inherit; font-size:.9rem; resize:vertical;
}
.modal-form input:focus, .modal-form textarea:focus{ outline:none; border-color: var(--orange); }
.modal-status{ font-size:.8rem; margin:12px 0 0; text-align:center; color: var(--text-muted); }
.modal-status.err{ color:#ff8a70; }

.order-success{ text-align:center; padding: 10px 0; }
.success-ico{
  width:60px; height:60px; margin:0 auto 16px;
  display:grid; place-items:center; border-radius:50%;
  background: rgba(255,106,26,.14); color: var(--orange); font-size:1.8rem;
}
.order-success h3{ margin:0 0 10px; font-size:1.1rem; }
.order-success p{ color: var(--text-muted); font-size:.88rem; margin:0 0 8px; }
.order-code{
  display:block; font-size:1.45rem; color: var(--orange);
  letter-spacing:.08em; margin: 6px 0 14px; font-weight:700;
}
.success-note{ font-size:.78rem !important; color: var(--text-faint) !important; margin-bottom:18px !important; }

/* ---- toast ---- */
.toast{
  position:fixed; inset-inline-start:50%; transform:translateX(-50%);
  bottom:26px; z-index:200;
  background: var(--panel-2); border:1px solid var(--orange);
  color: var(--text); padding:12px 22px; border-radius:6px;
  font-size:.88rem; box-shadow: 0 8px 30px rgba(0,0,0,.5);
}
.toast.err{ border-color:#8a3d2c; color:#ffb9a5; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative;
  overflow:hidden;
  padding: 76px 0 60px;
}
.hero-inner{
  display:grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items:center;
  min-height: 78vh;
  position:relative;
}
.eyebrow{
  color: var(--orange);
  font-size: 0.78rem;
  font-weight:600;
  margin: 0 0 18px;
}
.hero-title{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 5.4vw, 3.9rem);
  line-height: 1.2;
  margin: 0 0 22px;
  letter-spacing: -0.01em;
}
.text-stack{ position:relative; display:inline-grid; vertical-align: baseline; max-width: 100%; }
.stack-line{ grid-area: 1/1; }
.stack-outline{
  color: var(--orange);
  opacity: 0.55;
}
@supports (-webkit-text-stroke: 1px black){
  .stack-outline{
    -webkit-text-stroke: 1.3px var(--orange);
    color: transparent;
    opacity: 1;
  }
}
.stack-fill{
  color: var(--orange);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.1s var(--ease);
}
.hero.in-view .stack-fill{ clip-path: inset(0 0 0% 0); }

.hero-sub{
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
  margin: 0 0 32px;
}
.hero-actions{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom: 44px; }
.hero-stats{ display:flex; gap: 36px; }
.stat{ display:flex; flex-direction:column; gap:4px; }
.stat b{ font-size:1.2rem; color: var(--text); }
.stat span{ font-size:0.72rem; color: var(--text-faint); }

.hero-visual{ position:relative; display:flex; align-items:center; justify-content:center; }

/* ---- Hero visual: the R3D mark assembles itself here, plain and clean
   (no card/frame chrome) — same look as the original loading mark,
   just placed directly in the page instead of a blocking splash. ---- */
.hero-visual-logo{
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}
/* padding-top box-sizing hack guarantees a 1:1 height even on browsers
   that don't support (or mis-support) the aspect-ratio property, so the
   three absolutely-positioned layers below always have somewhere to sit. */
.hero-visual-logo::before{
  content: "";
  display: block;
  padding-top: 100%;
}
.hvl-layer{
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  opacity: 0;
  will-change: transform, opacity, filter;
}
.hvl-ring{
  transform-origin: 50% 50%;
  animation: hvlRingIn 900ms var(--ease) 150ms forwards;
}
/* printer + wordmark appear together, right after the ring */
.hvl-printer{
  animation: hvlPrinterIn 800ms var(--ease) 700ms forwards;
}
.hvl-text{
  animation: hvlTextIn 750ms var(--ease) 700ms forwards;
}
@keyframes hvlRingIn{
  0%{   opacity: 0; transform: scale(.55) rotate(-70deg); filter: blur(6px); }
  65%{  opacity: 1; }
  100%{ opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0); }
}
@keyframes hvlPrinterIn{
  0%{   opacity: 0; transform: scale(.82) translateY(10px); filter: blur(4px); }
  100%{ opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes hvlTextIn{
  0%{   opacity: 0; transform: translateY(16px); filter: blur(3px); }
  100%{ opacity: 1; transform: translateY(0); filter: blur(0); }
}
@media (prefers-reduced-motion: reduce){
  .hvl-layer{ animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
}
@media (max-width: 640px){
  .hero-visual-logo{ max-width: 280px; }
}

.scroll-cue{
  position:absolute; bottom: 22px; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  font-size: 0.68rem; color: var(--text-faint);
}
.scroll-cue i{
  width:1px; height: 34px;
  background: linear-gradient(var(--orange), transparent);
  display:block;
  animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue{ 0%,100%{ transform: scaleY(0.6); opacity:.4; } 50%{ transform: scaleY(1); opacity:1; } }

@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; min-height: auto; padding-top: 20px; }
  .hero-visual{ order:-1; width: 100%; max-width: 360px; margin: 0 auto 12px; }
  .hero-stats{ gap:24px; flex-wrap:wrap; }
}

/* ==========================================================================
   Strip
   ========================================================================== */
.strip{ border-top:1px solid var(--line); border-bottom:1px solid var(--line); background: var(--panel); }
.strip-inner{
  display:flex; justify-content:space-between; flex-wrap:wrap;
  gap: 18px; padding: 18px 28px; color: var(--text-faint); font-size:0.8rem;
}

/* ==========================================================================
   Section shared
   ========================================================================== */
section{ padding: 108px 0; }
.section-head{ max-width: 640px; margin: 0 0 56px; }
.section-head h2{
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}
.section-sub{ color: var(--text-muted); margin:0; }

/* ==========================================================================
   Process — gcode list
   ========================================================================== */
.process{ background: var(--panel); border-top:1px solid var(--line); border-bottom:1px solid var(--line); overflow: hidden; }
.gcode-list{ display:flex; flex-direction:column; }
.gcode-step{
  display:grid;
  grid-template-columns: 90px 1fr 96px;
  align-items:center;
  gap: 28px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  opacity: .35;
  transform: translateY(14px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.gcode-step:last-child{ border-bottom: 1px solid var(--line); }
.gcode-step.in-view{ opacity:1; transform:none; }
.gcode-tag{ font-size:1.1rem; color: var(--orange); font-weight:700; }
.gcode-body h3{ margin:0 0 6px; font-size:1.15rem; }
.gcode-body p{ margin:0; color: var(--text-muted); max-width: 56ch; }
.gcode-wire{ width:64px; height:64px; justify-self:end; color: var(--steel-dark); }
.wire-shape{
  fill:none; stroke: var(--steel);
  stroke-width: 2;
  stroke-dasharray: 260;
  stroke-dashoffset: 260;
  transition: stroke-dashoffset 1s var(--ease), stroke .4s;
}
.gcode-step.in-view .wire-shape{ stroke-dashoffset: 0; stroke: var(--orange); }

@media (max-width: 720px){
  .gcode-step{ grid-template-columns: 50px 1fr; }
  .gcode-wire{ display:none; }
}

/* ==========================================================================
   Products
   ========================================================================== */
.product-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.product-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  transition: border-color .3s, transform .3s var(--ease);
}
.product-card:hover{ border-color: var(--steel-dark); transform: translateY(-4px); }
.card-visual{
  aspect-ratio: 4/5;
  position: relative;
  overflow: hidden;
  background: var(--panel-2);
}
.card-photo{
  position:absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(0) brightness(0.5) contrast(1.05);
  opacity: 0;
  transform: scale(1.08);
  transition: opacity .6s .45s, transform 1s .45s var(--ease), filter .9s .45s;
}
.product-card.in-view .card-photo{
  opacity: 1;
  transform: scale(1);
  filter: saturate(1) brightness(1) contrast(1.02);
}
.card-frame{
  position:absolute; inset: 4%;
  fill:none; stroke: var(--orange);
  stroke-width: 1.5;
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  transition: stroke-dashoffset .9s var(--ease), opacity .5s .4s;
}
.product-card.in-view .card-frame{ stroke-dashoffset: 0; opacity: 0; }
.card-scanline{
  position:absolute; inset-inline: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-glow), transparent);
  bottom: 0;
  opacity: 0;
  box-shadow: 0 0 10px rgba(255,106,26,.8);
}
.product-card.in-view .card-scanline{
  animation: scanline .9s .1s var(--ease) forwards;
}
@keyframes scanline{
  0%{ bottom: 0; opacity: 1; }
  95%{ bottom: 96%; opacity: 1; }
  100%{ bottom: 96%; opacity: 0; }
}

.card-body{ padding: 20px 22px 24px; }
.card-tag{ display:inline-block; font-size:0.68rem; color: var(--orange); margin-bottom: 10px; }
.card-body h3{ margin: 0 0 8px; font-size: 1.08rem; }
.card-body p{ margin: 0 0 16px; color: var(--text-muted); font-size:0.92rem; }
.card-price{ font-size: 0.82rem; color: var(--steel-bright); }

@media (max-width: 980px){ .product-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 620px){ .product-grid{ grid-template-columns: 1fr; } }

/* ==========================================================================
   Materials
   ========================================================================== */
.materials{ overflow: hidden; }
.material-grid{
  display:grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
.material-card{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.material-card h3{ margin: 0 0 18px; color: var(--orange); font-size:1.1rem; }
.material-card dl{ margin:0; display:flex; flex-direction:column; gap: 10px; }
.material-card dl div{ display:flex; justify-content:space-between; gap: 8px; font-size: 0.78rem; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.material-card dt{ color: var(--text-faint); }
.material-card dd{ margin:0; color: var(--text); text-align:left; }

@media (max-width: 980px){ .material-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px){ .material-grid{ grid-template-columns: 1fr; } }

/* ==========================================================================
   Custom CTA / upload
   ========================================================================== */
.custom-cta{ background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.custom-inner{
  display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:start;
}
.custom-copy h2{ font-family: var(--font-display); font-weight:800; font-size: clamp(1.7rem,3.2vw,2.3rem); margin: 0 0 16px; }
.custom-copy p{ color: var(--text-muted); margin: 0 0 22px; max-width: 48ch; }
.custom-list{ display:flex; flex-direction:column; gap:12px; }
.custom-list li{
  position:relative; padding-right: 22px; color: var(--text-muted); font-size:0.92rem;
}
.custom-list li::before{
  content:""; position:absolute; right:0; top:8px; width:8px; height:8px;
  background: var(--orange); border-radius:1px; transform: rotate(45deg);
}

.upload-card{
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  display:flex; flex-direction:column; gap:18px;
}
.upload-drop{
  border: 1.5px dashed var(--steel-dark);
  border-radius: 8px;
  padding: 30px 18px;
  text-align:center;
  color: var(--text-muted);
  cursor:pointer;
  transition: border-color .2s, background .2s;
}
.upload-drop:hover, .upload-drop.drag{ border-color: var(--orange); background: rgba(255,106,26,.06); }
.upload-drop svg{ margin: 0 auto 10px; color: var(--orange); }
.upload-drop p{ margin: 0 0 8px; font-size:0.92rem; }
.file-name{ font-size: 0.72rem; color: var(--text-faint); }
.upload-fields{ display:flex; flex-direction:column; gap: 12px; }
.upload-fields input, .upload-fields select, .upload-fields textarea{
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 14px;
  font-size: 0.92rem;
  width:100%;
  resize: vertical;
}
.upload-fields input:focus, .upload-fields select:focus, .upload-fields textarea:focus{
  outline: none; border-color: var(--orange);
}
.upload-status{
  min-height: 1em;
  font-size: 0.78rem;
  color: var(--orange);
  text-align: center;
}
.upload-status.is-error{ color: #ff5a5a; }
#uploadSubmitBtn:disabled{ opacity: 0.6; cursor: not-allowed; }

@media (max-width: 880px){ .custom-inner{ grid-template-columns: 1fr; } }

/* ==========================================================================
   Closing
   ========================================================================== */
.closing{ overflow: hidden; }
.closing-cube{
  position:absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  opacity: 0.5;
  z-index: 0;
}
.closing-inner{ text-align:center; }
.closing h2{
  font-family: var(--font-display); font-weight:800;
  font-size: clamp(2rem, 4.4vw, 3rem);
  margin: 0 0 30px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{ background: var(--panel); border-top: 1px solid var(--line); padding-top: 64px; position: relative; overflow: hidden; }
.footer-inner{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px;
}
.footer-brand{ display:flex; flex-direction:column; align-items:flex-start; gap:10px; }
.footer-brand .brand-mark{ width:34px; height:34px; border-radius:50%; }
.footer-brand p{ color: var(--text-faint); font-size:0.82rem; margin: 4px 0 0; }
.footer-col{ display:flex; flex-direction:column; gap: 12px; }
.footer-col h4{ margin:0 0 6px; font-size:0.72rem; color: var(--text-faint); letter-spacing:0.08em; }
.footer-col a{ color: var(--text-muted); font-size:0.88rem; transition: color .2s; }
.footer-col a:hover{ color: var(--orange); }
.footer-bottom{
  border-top: 1px solid var(--line);
  padding: 20px 28px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:8px;
  color: var(--text-faint); font-size: 0.7rem;
}

@media (max-width: 880px){
  .footer-inner{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px){
  .footer-inner{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   Focus visibility
   ========================================================================== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* ==========================================================================
   Shop filters (categories + sort)
   ========================================================================== */
.shop-filters{
  display:flex; align-items:center; justify-content:space-between;
  gap:18px; flex-wrap:wrap; margin-bottom: 30px;
}
.cat-chips{ display:flex; gap:9px; flex-wrap:wrap; }
.chip{
  display:inline-flex; align-items:center; gap:7px;
  padding: 8px 16px; border-radius: 30px;
  border:1px solid var(--line); background: var(--panel);
  color: var(--text-muted); font-size:.84rem;
  transition: border-color .2s, color .2s, background .2s;
}
.chip:hover{ border-color: var(--steel-dark); color: var(--text); }
.chip.on{ border-color: var(--orange); color: var(--orange); background: rgba(255,106,26,.08); font-weight:600; }
.chip i{ font-style:normal; font-size:.7rem; opacity:.65; }
.sort-form{ display:flex; align-items:center; gap:9px; }
.sort-form label{ font-size:.72rem; color: var(--text-faint); }
.sort-form select{
  background: var(--panel); border:1px solid var(--line); border-radius:6px;
  color: var(--text); padding: 8px 12px; font-family:inherit; font-size:.82rem; cursor:pointer;
}
.sort-form select:focus{ outline:none; border-color: var(--orange); }

/* ---- product card additions ---- */
.card-visual{ display:block; position:relative; }
.card-body h3 a{ color:inherit; }
.card-body h3 a:hover{ color: var(--orange); }
.card-foot{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px; margin-top:14px; padding-top:14px; border-top:1px solid var(--line);
}
.card-price.quote{ color: var(--orange); font-size:.8rem; }
.btn-mini{
  display:inline-flex; align-items:center; gap:5px;
  padding: 7px 15px; border-radius:4px; cursor:pointer;
  border:1px solid var(--orange); background: transparent; color: var(--orange);
  font-family:inherit; font-size:.79rem; font-weight:600;
  transition: background .2s, color .2s;
}
.btn-mini:hover{ background: var(--orange); color:#1a0d05; }
.btn-mini.call{ border-color: var(--steel-dark); color: var(--steel-bright); }
.btn-mini.call:hover{ background: var(--steel-dark); color: var(--text); }
.oos-badge{
  position:absolute; top:10px; inset-inline-start:10px; z-index:2;
  background: rgba(11,10,9,.85); border:1px solid #8a3d2c; color:#ff8a70;
  font-size:.68rem; padding:4px 10px; border-radius:20px;
}

/* ==========================================================================
   Order tracking section
   ========================================================================== */
.track-sec{
  position:relative; overflow:hidden;
  background: var(--panel);
  border-top:1px solid var(--line); border-bottom:1px solid var(--line);
}
.track-inner{ display:grid; grid-template-columns: 1fr 1fr; gap:48px; align-items:start; }
.track-copy h2{ font-family: var(--font-display); font-weight:800; font-size: clamp(1.6rem,3vw,2.2rem); margin:0 0 14px; }
.track-copy p{ color: var(--text-muted); max-width: 44ch; }
.track-card{ background: var(--panel-2); border:1px solid var(--line); border-radius:10px; padding:26px; }
.track-tabs{ display:flex; gap:8px; margin-bottom:20px; }
.track-tab{
  flex:1; padding:10px; border-radius:6px; cursor:pointer;
  background: transparent; border:1px solid var(--line);
  color: var(--text-muted); font-family:inherit; font-size:.82rem;
  transition: border-color .2s, color .2s, background .2s;
}
.track-tab.on{ border-color: var(--orange); color: var(--orange); background: rgba(255,106,26,.08); font-weight:600; }
.track-form label{ display:block; font-size:.76rem; color: var(--text-faint); margin:0 0 6px; }
.track-form input{
  width:100%; background: var(--panel); border:1px solid var(--line); border-radius:6px;
  padding: 12px 14px; color: var(--text); font-family:inherit; font-size:.9rem; margin-bottom:14px;
}
.track-form input:focus{ outline:none; border-color: var(--orange); }
.track-status{ font-size:.8rem; text-align:center; margin:12px 0 0; color: var(--text-muted); }
.track-status.err{ color:#ff8a70; }

.track-result{ margin-top:20px; border-top:1px solid var(--line); padding-top:18px; }
.tr-head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.tr-head span:first-child{ color: var(--orange); font-weight:700; letter-spacing:.05em; }
.tr-badge{ padding:4px 12px; border-radius:20px; font-size:.72rem; font-weight:600; }
.tr-badge.s-pending{ background:rgba(255,106,26,.14); color:var(--orange-glow); }
.tr-badge.s-confirmed{ background:rgba(90,150,255,.14); color:#8fb4ff; }
.tr-badge.s-printing{ background:rgba(255,200,60,.14); color:#ffd066; }
.tr-badge.s-shipped{ background:rgba(120,200,255,.14); color:#7fd0ff; }
.tr-badge.s-done{ background:rgba(80,220,140,.14); color:#66dfa0; }
.tr-badge.s-canceled{ background:rgba(255,90,70,.14); color:#ff8a70; }
.tr-items{ list-style:none; margin:0 0 14px; padding:0; }
.tr-items li{
  display:flex; align-items:center; gap:10px;
  padding:9px 0; border-bottom:1px dashed var(--line); font-size:.85rem;
}
.tr-items li span{ flex:1; }
.tr-items li b{ color: var(--text-muted); font-size:.78rem; }
.tr-items li em{ font-style:normal; color: var(--orange); font-size:.78rem; }
.tr-foot{ display:flex; justify-content:space-between; font-size:.8rem; color: var(--text-muted); }
.tr-foot b{ color: var(--text); }
.tr-note{
  margin:14px 0 0; padding:12px 14px; border-radius:6px;
  background: rgba(255,106,26,.07); border:1px solid var(--orange-deep);
  font-size:.83rem; color: var(--text);
}

@media (max-width: 880px){ .track-inner{ grid-template-columns:1fr; gap:28px; } }

/* ==========================================================================
   Product detail page (PDP)
   ========================================================================== */
.pdp-main{ padding-top: 40px; }
.breadcrumb{ display:flex; align-items:center; gap:8px; font-size:.76rem; color: var(--text-faint); margin-bottom:26px; flex-wrap:wrap; }
.breadcrumb a:hover{ color: var(--orange); }
.breadcrumb b{ color: var(--text-muted); font-weight:500; }
.pdp-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:48px; align-items:start; padding-bottom: 70px; }
.pdp-media{
  position:relative; overflow:hidden; border-radius:10px;
  border:1px solid var(--line); background: var(--panel-2); aspect-ratio: 4/5;
}
.pdp-media img{ width:100%; height:100%; object-fit:cover; }
.pdp-info h1{ font-family: var(--font-display); font-weight:800; font-size: clamp(1.6rem,3.4vw,2.3rem); margin:10px 0 12px; }
.pdp-tagline{ color: var(--text-muted); font-size:1rem; margin:0 0 22px; }
.pdp-price{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:24px; }
.pdp-price b{ font-size:1.5rem; color: var(--orange); }
.quote-tag{ font-size:.88rem; color: var(--orange); }
.oos-tag{ font-size:.75rem; padding:4px 12px; border-radius:20px; background:rgba(255,90,70,.14); color:#ff8a70; }
.pdp-actions{ display:flex; gap:12px; flex-wrap:wrap; margin-bottom:28px; }
.pdp-body{ color: var(--text-muted); line-height:1.9; padding-top:22px; border-top:1px solid var(--line); margin-bottom:24px; }
.pdp-meta{ list-style:none; margin:0; padding:0; border-top:1px solid var(--line); }
.pdp-meta li{ display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px dashed var(--line); font-size:.82rem; }
.pdp-meta li span{ color: var(--text-faint); }
.pdp-related{ border-top:1px solid var(--line); }
.pdp-404{ text-align:center; padding: 90px 0 120px; }
.pdp-404 h1{ font-size:1.9rem; margin-bottom:12px; }
.pdp-404 p{ color: var(--text-muted); margin-bottom:26px; }
@media (max-width: 880px){ .pdp-grid{ grid-template-columns:1fr; gap:28px; } }

/* ==========================================================================
   Footer additions — icons, map, BM credit
   ========================================================================== */
.social-row{ display:flex; gap:9px; margin-top:16px; }
.social-ico{
  width:38px; height:38px; display:grid; place-items:center;
  border:1px solid var(--line); border-radius:50%;
  color: var(--text-muted);
  transition: color .2s, border-color .2s, transform .2s;
}
.social-ico:hover{ color: var(--orange); border-color: var(--orange); transform: translateY(-2px); }
.footer-contact .ico-line{
  display:flex; align-items:flex-start; gap:9px;
  color: var(--text-muted); font-size:.86rem; line-height:1.6;
}
.footer-contact .ico-line svg{ flex-shrink:0; margin-top:4px; color: var(--orange); }
.footer-contact .ico-line:hover{ color: var(--orange); }
.map-box{
  border:1px solid var(--line); border-radius:8px; overflow:hidden;
  height: 150px; background: var(--panel-2);
}
.map-box iframe{ width:100%; height:100%; border:0; filter: grayscale(1) invert(.9) hue-rotate(180deg) brightness(.85); }
.map-box:hover iframe{ filter: grayscale(.3) invert(.88) hue-rotate(180deg) brightness(.95); }

.footer-bottom{ align-items:center; }
.bm-credit{
  display:inline-flex; align-items:center; gap:9px;
  color: var(--text-faint); font-size:.72rem;
  transition: color .2s;
}
.bm-credit:hover{ color: var(--orange); }
.bm-logo{
  display:grid; place-items:center;
  width:30px; height:30px; border-radius:50%;
  background: linear-gradient(155deg, var(--panel-2), var(--panel));
  border:1.5px solid var(--orange); color: var(--orange);
  font-family: var(--font-mono); font-weight:700; font-size:.66rem;
  transition: background .25s, color .25s, box-shadow .25s;
}
.bm-credit:hover .bm-logo{
  background: linear-gradient(155deg, var(--orange-deep), var(--orange));
  color:#1a0d05; box-shadow: 0 3px 14px rgba(255,106,26,.4);
}
@media (max-width: 880px){
  .footer-bottom{ flex-direction:column; gap:14px; text-align:center; }
}
