/* ===== 3DPrintNest storefront ===== */
:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #15161a;
  --ink-2: #4a4c55;
  --muted: #8a8c94;
  --line: #e6e2d9;
  --accent: #ff5a1f;
  --accent-2: #ff8a3d;
  --teal: #19b39b;
  --violet: #7a5cff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(20, 20, 30, .04), 0 12px 32px -12px rgba(20, 20, 30, .16);
  --shadow-lg: 0 30px 70px -25px rgba(20, 20, 30, .35);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.02em; line-height: 1.1; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 26px; border: 0; border-radius: 999px; cursor: pointer;
  font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .25s var(--ease), box-shadow .25s, background .2s, color .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 10px 24px -10px rgba(21, 22, 26, .6); }
.btn-primary:hover { background: #000; box-shadow: 0 14px 30px -10px rgba(21, 22, 26, .7); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 12px 28px -10px rgba(255, 90, 31, .7); }
.btn-accent:hover { box-shadow: 0 16px 34px -10px rgba(255, 90, 31, .8); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 244, 239, .78); backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color .3s, background .3s;
}
.header.scrolled { border-color: var(--line); background: rgba(246, 244, 239, .92); }
.header .wrap { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.03em; }
.logo-mark { width: 34px; height: 34px; flex: none; }
.logo b { color: var(--accent); font-weight: 700; }
.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; }
.nav a:hover, .nav a.on { background: rgba(21, 22, 26, .06); color: var(--ink); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search { position: relative; }
.search input {
  width: 220px; height: 42px; padding: 0 16px 0 40px; border-radius: 999px; border: 1.5px solid var(--line);
  background: var(--surface); transition: width .35s var(--ease), border-color .2s;
}
.search input:focus { outline: none; border-color: var(--ink); width: 280px; }
.search svg { position: absolute; left: 14px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--muted); }
.icon-btn {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: var(--ink); color: #fff; cursor: pointer; transition: transform .25s var(--ease);
}
.icon-btn:hover { transform: scale(1.06); }
.icon-btn svg { width: 20px; height: 20px; }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg); transform: scale(0); transition: transform .3s var(--ease);
}
.cart-count.has { transform: scale(1); }
.cart-count.bump { animation: bump .45s var(--ease); }
@keyframes bump { 40% { transform: scale(1.45); } }
.menu-btn { display: none; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 56px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; min-height: 560px; }
.hero-blob {
  position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(255, 138, 61, .32), transparent 70%),
              radial-gradient(closest-side at 30% 70%, rgba(122, 92, 255, .18), transparent 70%);
  filter: blur(20px); pointer-events: none; animation: float 14s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translate(-4%, 6%) scale(1.06); } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 8px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.eyebrow i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); }
.eyebrow i::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.hero h1 { font-size: clamp(44px, 6.6vw, 86px); margin: 22px 0 20px; font-weight: 700; }
.hero h1 .grad {
  background: linear-gradient(100deg, var(--accent) 10%, var(--violet) 90%); -webkit-background-clip: text;
  background-clip: text; color: transparent;
}
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 500px; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; }
.hero-stats b { display: block; font-family: var(--display); font-size: 30px; letter-spacing: -.03em; }
.hero-stats span { font-size: 13px; color: var(--muted); }
.hero-stage { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: center; }
.hero-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.stage-badge {
  position: absolute; z-index: 2; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px); box-shadow: var(--shadow); font-size: 13px; animation: bob 5s ease-in-out infinite;
}
.stage-badge b { display: block; font-family: var(--display); font-size: 15px; }
.stage-badge.b1 { left: 0; top: 18%; }
.stage-badge.b2 { right: 0; bottom: 16%; animation-delay: -2.5s; }
@keyframes bob { 50% { transform: translateY(-10px); } }
.progress-ring { display: flex; align-items: center; gap: 10px; }
.progress-ring .bar { width: 90px; height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; }
.progress-ring .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.stage-fallback {
  position: absolute; inset: 12%; border-radius: 40% 60% 55% 45% / 50% 40% 60% 50%;
  background: conic-gradient(from 90deg, var(--accent), var(--violet), var(--teal), var(--accent));
  animation: spin 18s linear infinite; filter: saturate(1.1);
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- marquee ---------- */
.marquee { border-block: 1px solid var(--line); background: var(--surface); overflow: hidden; padding: 18px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { display: flex; align-items: center; gap: 22px; padding-right: 22px; font-family: var(--display);
  font-size: 22px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; }
.marquee span::after { content: "✦"; color: var(--accent); font-size: 14px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(32px, 4vw, 48px); }
.section-head p { margin: 10px 0 0; color: var(--ink-2); max-width: 520px; }
.kicker { font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; display: block; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.link-arrow svg { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .45s var(--ease), box-shadow .45s var(--ease);
  transform-style: preserve-3d;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-media { position: relative; aspect-ratio: 1; background: linear-gradient(145deg, #efece5, #e5e1d6); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s, transform .8s var(--ease); }
.card-media img.alt { opacity: 0; }
.card:hover .card-media img { transform: scale(1.06); }
.card:hover .card-media img.alt { opacity: 1; }
.card-media .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.card-media .noimg svg { width: 64px; height: 64px; opacity: .5; }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2; padding: 5px 10px; border-radius: 999px; font-size: 12px;
  font-weight: 700; background: var(--ink); color: #fff;
}
.badge.sale { background: var(--accent); }
.badge.out { background: rgba(21, 22, 26, .65); }
.card-quick {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #fff; color: var(--ink); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow);
  transform: translateY(14px) scale(.8); opacity: 0; transition: all .35s var(--ease);
}
.card-quick svg { width: 20px; height: 20px; }
.card:hover .card-quick, .card-quick:focus-visible { transform: none; opacity: 1; }
.card-quick:hover { background: var(--accent); color: #fff; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.card-title { font-family: var(--display); font-weight: 600; font-size: 17px; line-height: 1.3; }
.card-price { margin-top: auto; padding-top: 8px; display: flex; gap: 8px; align-items: baseline; font-weight: 700; }
.card-price s { color: var(--muted); font-weight: 500; font-size: 14px; }
.swatches { display: flex; gap: 5px; margin-top: 6px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }

/* ---------- categories ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.cat-tile {
  position: relative; padding: 26px 24px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden; transition: transform .4s var(--ease), color .3s;
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--accent), var(--violet));
  opacity: 0; transition: opacity .4s; z-index: 0;
}
.cat-tile:hover { transform: translateY(-4px); color: #fff; }
.cat-tile:hover::before { opacity: 1; }
.cat-tile > * { position: relative; z-index: 1; }
.cat-tile h3 { font-size: 22px; }
.cat-tile span { font-size: 14px; opacity: .7; }
.cat-tile svg { position: absolute; right: 20px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); transition: transform .3s var(--ease); }
.cat-tile:hover svg { transform: translate(4px, -50%); }

/* ---------- process ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { padding: 32px 28px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.step::after {
  counter-increment: step; content: "0" counter(step); position: absolute; right: 20px; top: 14px;
  font-family: var(--display); font-size: 64px; font-weight: 700; color: rgba(21, 22, 26, .05);
}
.step h3 { font-size: 22px; margin: 18px 0 8px; }
.step p { margin: 0; color: var(--ink-2); }
.step-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.step:nth-child(2) .step-icon { background: linear-gradient(135deg, var(--violet), #a58bff); }
.step:nth-child(3) .step-icon { background: linear-gradient(135deg, var(--teal), #46d6c0); }
.step-icon svg { width: 26px; height: 26px; }
.layers { display: flex; flex-direction: column-reverse; gap: 3px; width: 26px; }
.layers i { height: 4px; border-radius: 2px; background: #fff; transform-origin: left; animation: layer 2.4s var(--ease) infinite; }
.layers i:nth-child(2) { animation-delay: .2s; width: 85%; } .layers i:nth-child(3) { animation-delay: .4s; width: 70%; }
.layers i:nth-child(4) { animation-delay: .6s; width: 55%; }
@keyframes layer { 0%, 10% { transform: scaleX(0); } 40%, 85% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- custom CTA ---------- */
.cta {
  position: relative; border-radius: 32px; padding: 64px; background: var(--ink); color: #fff; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center;
}
.cta::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 90, 31, .55), transparent); animation: float 10s ease-in-out infinite alternate;
}
.cta::after {
  content: ""; position: absolute; inset: 0; opacity: .08; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, #fff 0 1px, transparent 1px 8px);  /* layer lines */
}
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(32px, 4vw, 52px); }
.cta p { color: rgba(255, 255, 255, .72); font-size: 18px; margin: 16px 0 0; }
.cta .btn-primary { background: #fff; color: var(--ink); }
.cta-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cta-list li { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.cta-list svg { width: 20px; height: 20px; color: var(--accent-2); flex: none; }

/* ---------- shop ---------- */
.page-head { padding: 48px 0 28px; }
.page-head h1 { font-size: clamp(36px, 5vw, 60px); }
.page-head p { color: var(--ink-2); margin: 10px 0 0; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 14px; font-weight: 500; transition: all .2s; }
.chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.chip.on { background: var(--ink); color: #fff; box-shadow: none; }
.chip sup { font-size: 10px; opacity: .6; margin-left: 2px; }
.select { height: 42px; padding: 0 38px 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315161a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; appearance: none; cursor: pointer; }
.empty { text-align: center; padding: 80px 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.empty svg { width: 70px; height: 70px; color: var(--muted); margin: 0 auto 16px; }
.empty h3 { font-size: 24px; margin-bottom: 8px; }
.empty p { color: var(--ink-2); margin: 0 0 22px; }

/* ---------- product page ---------- */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; padding: 32px 0 80px; }
.gallery-main { position: relative; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: linear-gradient(145deg, #efece5, #e5e1d6); box-shadow: var(--shadow); cursor: zoom-in; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease-out, opacity .3s; }
.gallery-main.zoom img { transform: scale(1.9); }
.gallery-main .noimg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.gallery-main .noimg svg { width: 110px; height: 110px; opacity: .4; }
.thumbs { display: flex; gap: 10px; margin-top: 14px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #ece8df; transition: border-color .2s, transform .2s; }
.thumbs button:hover { transform: translateY(-2px); }
.thumbs button.on { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info { position: sticky; top: 100px; align-self: start; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--ink); }
.pdp h1 { font-size: clamp(32px, 4vw, 48px); }
.pdp-price { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; font-family: var(--display); font-size: 30px; font-weight: 700; }
.pdp-price s { font-size: 20px; color: var(--muted); font-weight: 500; }
.pdp-price .save { font-family: var(--body); font-size: 13px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 90, 31, .12); color: var(--accent); }
.pdp-short { font-size: 18px; color: var(--ink-2); margin: 0 0 24px; }
.opt-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; }
.opt-label span { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
.color-opts { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.color-opt { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 500; transition: border-color .2s; }
.color-opt .swatch { width: 22px; height: 22px; }
.color-opt.on { border-color: var(--ink); }
.buy-row { display: flex; gap: 12px; margin-bottom: 26px; }
.qty { display: flex; align-items: center; height: 50px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); }
.qty button { width: 44px; height: 100%; border: 0; background: none; cursor: pointer; font-size: 20px; }
.qty input { width: 36px; border: 0; background: none; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stock-note { font-size: 14px; margin: -14px 0 22px; color: var(--teal); font-weight: 600; }
.stock-note.low { color: var(--accent); }
.specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 26px; }
.spec { padding: 14px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.spec span { display: block; font-size: 12px; color: var(--muted); }
.spec b { font-size: 15px; }
.desc { color: var(--ink-2); white-space: pre-line; border-top: 1px solid var(--line); padding-top: 22px; }
.perks { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; font-size: 14px; color: var(--ink-2); }
.perks div { display: flex; gap: 10px; align-items: center; }
.perks svg { width: 18px; height: 18px; color: var(--teal); }

/* ---------- forms ---------- */
.form-card { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow); padding: 32px; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 13px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 4px rgba(21, 22, 26, .06); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.alert { padding: 14px 18px; border-radius: 14px; margin-bottom: 18px; background: rgba(255, 90, 31, .1); color: #b13a0c; font-weight: 500; }
.alert.ok { background: rgba(25, 179, 155, .12); color: #0d7a69; }
.checkout { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; padding-bottom: 80px; align-items: start; }
.summary { position: sticky; top: 100px; }
.sum-line { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.sum-line img, .sum-line .ph { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: #ece8df; flex: none; }
.sum-line .grow { flex: 1; min-width: 0; }
.sum-line .name { font-weight: 600; font-size: 15px; }
.sum-line .meta { font-size: 13px; color: var(--muted); }
.sum-total { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-2); }
.sum-total.big { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 14px; }

/* ---------- order done ---------- */
.done { max-width: 640px; margin: 40px auto 80px; text-align: center; }
.done-icon { width: 96px; height: 96px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), #46d6c0); color: #fff; animation: pop .6s var(--ease); }
.done-icon svg { width: 46px; height: 46px; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .6s .35s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done h1 { font-size: 44px; margin-bottom: 12px; }
.ref { display: inline-block; font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: .06em; padding: 10px 20px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); margin: 14px 0 24px; }
.btn-wa { background: #25d366; color: #fff; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 100; }

/* ---------- cart drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(15, 15, 20, .4); opacity: 0; pointer-events: none; transition: opacity .35s; backdrop-filter: blur(2px); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(440px, 100%); background: var(--bg);
  transform: translateX(100%); transition: transform .45s var(--ease), visibility 0s .45s; display: flex; flex-direction: column;
  visibility: hidden;  /* closed: no shadow on the page edge, nothing focusable */
}
.drawer-open .drawer { transform: none; visibility: visible; transition: transform .45s var(--ease);
  box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .35); }
.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 22px; }
.drawer-close { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--surface); cursor: pointer; font-size: 22px; box-shadow: var(--shadow); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 24px; }
.drawer-foot { padding: 20px 24px 24px; border-top: 1px solid var(--line); background: var(--surface); }
.drawer-foot .sum-total.big { border: 0; margin: 0 0 14px; padding: 0; }
.cart-line { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); animation: slidein .4s var(--ease); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
.cart-line img, .cart-line .ph { width: 74px; height: 74px; border-radius: 14px; object-fit: cover; background: #ece8df; flex: none; }
.cart-line .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cart-line .name { font-weight: 600; }
.cart-line .meta { font-size: 13px; color: var(--muted); }
.cart-line .qty { height: 34px; width: max-content; }
.cart-line .qty button { width: 32px; font-size: 16px; }
.cart-line .qty input { width: 28px; font-size: 14px; }
.cart-line .right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.cart-line .remove { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; }
.cart-empty { text-align: center; padding: 60px 10px; color: var(--ink-2); }
.cart-empty svg { width: 64px; height: 64px; margin: 0 auto 12px; color: var(--muted); }
.ship-note { font-size: 13px; color: var(--ink-2); margin: -6px 0 12px; }
.ship-note b { color: var(--accent); }

/* fly-to-cart dot */
.fly { position: fixed; z-index: 200; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); pointer-events: none; box-shadow: 0 0 0 6px rgba(255, 90, 31, .25); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 300; transform: translate(-50%, 30px); opacity: 0; padding: 14px 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 600; font-size: 14px; transition: all .4s var(--ease); pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- footer ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, .72); padding: 64px 0 32px; margin-top: 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
.footer .logo { color: #fff; margin-bottom: 14px; }
.footer h4 { color: #fff; font-family: var(--display); font-size: 16px; margin: 0 0 14px; }
.footer a { display: block; padding: 4px 0; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 24px; margin-top: 16px; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .search input { width: 170px; }
  .search input:focus { width: 210px; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; min-height: 0; }
  .hero-stage { max-width: 420px; order: -1; }
  .hero { padding-top: 20px; }
  .pdp, .checkout { grid-template-columns: 1fr; gap: 32px; }
  .pdp-info, .summary { position: static; }
  .steps { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; padding: 40px 28px; }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
  .footer .wrap > :first-child { grid-column: 1 / -1; }
  .nav { display: none; }
  .menu-btn { display: grid; }
  .nav.open { display: flex; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; padding: 12px 20px 20px; background: var(--bg); border-bottom: 1px solid var(--line); margin: 0; }
  .search { display: none; }
  .nav.open .m-search { display: block; }
}
@media (min-width: 901px) { .m-search { display: none; } }
@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .header .wrap { gap: 12px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px 12px 14px; }
  .card-title { font-size: 15px; }
  .card-quick { opacity: 1; transform: none; width: 38px; height: 38px; }
  .section { padding: 64px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .hero h1 { margin-top: 16px; }
  .hero-stats { gap: 24px; }
  .row-2 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr 1fr; }
  .form-card { padding: 22px; }
  .stage-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* keep the toast clear of the drawer's checkout button */
.drawer-open .toast { bottom: 130px; }
