/* ============================================================
   PAKD — Pacific Modernism / City Pop design system
   ============================================================ */

:root {
  /* palette (from Stitch DESIGN.md + video sky sample) */
  --sand: #fcf9f2;
  --sand-dim: #f1eee7;
  --ink: #14242f;
  --navy: #006388;
  --navy-deep: #004c6a;
  --teal: #006a62;
  --turquoise: #4fdbcc;
  --turquoise-bright: #70f8e8;
  --coral: #b25b56;
  --coral-deep: #93433f;
  --pink-soft: #ffdad7;
  --blue-soft: #c4e7ff;
  --video-sky: #3a8896;      /* sampled from top edge of hero video */

  --font-display: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-label: "Space Grotesk", monospace;

  --shadow-hard: 6px 6px 0 0 var(--teal);
  --shadow-hard-ink: 4px 4px 0 0 var(--ink);
  --container: 1280px;
  --header-h: 76px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  background: var(--video-sky); /* overscroll at top blends with video */
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  -webkit-font-smoothing: antialiased;
}

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 64px;
}

/* ---------- typography helpers ---------- */
.label-caps {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ============================================================
   Header — transparent over the video, sky-colored after
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  color: var(--sand);
  transition: background-color 0.35s ease;
}

.site-header.scrolled {
  background: var(--video-sky);
}

.site-header .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: 0.02em;
}

.main-nav {
  display: flex;
  gap: 36px;
}

.main-nav a {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.main-nav a:hover { border-bottom-color: var(--sand); }

/* ---------- shop dropdown ---------- */
.nav-item.has-dropdown { position: relative; }

.shop-toggle { display: inline-flex; align-items: center; gap: 6px; }
.shop-toggle svg { width: 14px; height: 14px; transition: transform 0.2s; }
.has-dropdown.open .shop-toggle svg { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 260px;
  background: var(--sand);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-ink);
  padding: 6px 0 8px;
  display: none;
  z-index: 120;
}

.has-dropdown:hover .dropdown,
.has-dropdown.open .dropdown { display: block; }

.dropdown-title {
  display: block;
  padding: 12px 18px 8px;
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-deep);
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: none;
}

.dropdown a img { width: 30px; height: 30px; background: var(--sand-dim); border: 2px solid var(--ink); padding: 2px; }
.dropdown a:hover { background: var(--turquoise-bright); border-bottom: none; }

.header-actions { display: flex; align-items: center; gap: 18px; }

.cart-btn {
  position: relative;
  background: none;
  border: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn svg { width: 24px; height: 24px; }

.cart-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--coral-deep);
  color: var(--sand);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
}

.nav-toggle { display: none; }

/* animated burger → X */
.nav-toggle-box {
  position: relative;
  display: block;
  width: 26px;
  height: 18px;
}

.nav-toggle-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition:
    transform 0.42s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease,
    top 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-toggle-line:nth-child(1) { top: 0; }
.nav-toggle-line:nth-child(2) { top: 8px; }
.nav-toggle-line:nth-child(3) { top: 16px; }

body.nav-open .nav-toggle-line:nth-child(1) {
  top: 8px;
  transform: rotate(45deg);
}

body.nav-open .nav-toggle-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0.4);
}

body.nav-open .nav-toggle-line:nth-child(3) {
  top: 8px;
  transform: rotate(-45deg);
}

/* mobile nav overlay + side drawer (styles apply at breakpoint below) */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(20, 36, 47, 0.52);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ============================================================
   Hero — pinned video, text reveals with scroll
   ============================================================ */
.hero { height: 320vh; position: relative; }

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 24px;
}

.hero-stage {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(28px);
  will-change: opacity, transform;
  pointer-events: none;
}

.hero-stage.on { pointer-events: auto; }

.hero-chip {
  display: inline-block;
  background: var(--teal);
  color: var(--sand);
  padding: 10px 18px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  color: var(--sand);
  text-shadow: 5px 5px 0 var(--navy-deep);
  text-transform: uppercase;
}

.hero-sub {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--sand);
  text-shadow: 2px 2px 0 var(--navy-deep);
  max-width: 560px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.hero-cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--sand);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.scroll-hint::after {
  content: "";
  width: 2px;
  height: 34px;
  background: var(--sand);
  animation: hint 1.6s ease-in-out infinite;
}

@keyframes hint {
  0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ============================================================
   Buttons — sharp, hard shadow, physical press
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 28px;
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-ink);
  transition: transform 0.12s, box-shadow 0.12s;
}

.btn:hover, .btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
}

.btn-primary { background: var(--teal); color: var(--sand); }
.btn-light { background: var(--sand); color: var(--ink); }
.btn-coral { background: var(--coral-deep); color: var(--sand); }

.btn-block { width: 100%; justify-content: center; }

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 96px 0; }

.section-head { margin-bottom: 48px; }

.eyebrow {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--coral-deep);
  margin-bottom: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* ---------- product carousel: small / BIG / small ---------- */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.carousel-stage {
  position: relative;
  flex: 1;
  height: 640px;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.c-card {
  position: absolute;
  width: min(400px, 78%);
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s;
  cursor: pointer;
}

.c-card .thumb {
  position: relative;
  background: var(--sand-dim);
  aspect-ratio: 1.15;
  display: grid;
  place-items: center;
  border-bottom: 2px solid var(--ink);
  overflow: hidden;
}

.thumb-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.c-card .thumb img {
  width: 62%;
  height: 82%;
  object-fit: contain;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.thumb-link:hover img { transform: scale(1.04); }

.c-card[data-id="jar-icy"] .thumb img { width: 48%; height: 68%; }

.card-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--navy);
  color: var(--sand);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  padding: 6px 10px;
  text-transform: uppercase;
}

.c-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  align-items: center;
}

.c-body h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; }

.c-desc { font-size: 14px; line-height: 1.55; color: #4a5560; max-width: 34ch; }

.c-foot { display: flex; align-items: center; gap: 20px; margin-top: 6px; }

.price { font-family: var(--font-label); font-weight: 600; font-size: 18px; }

.c-btn { padding: 12px 22px; }

/* side cards: image + name only */
.c-card:not(.is-center) .c-desc,
.c-card:not(.is-center) .c-foot { display: none; }
.c-card:not(.is-center) { box-shadow: 4px 4px 0 0 var(--teal); }
.c-card:not(.is-center) .c-body { padding: 18px; }

.carousel-arrow {
  flex: none;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: var(--sand);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard-ink);
  transition: transform 0.12s, box-shadow 0.12s;
  z-index: 3;
}

.carousel-arrow svg { width: 22px; height: 22px; }

.carousel-arrow:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--ink);
  background: var(--turquoise-bright);
}

/* ---------- collective split ---------- */
.split {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
}

.panel {
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 48px;
}

.panel-turquoise { background: var(--turquoise-bright); }
.panel-pink { background: var(--pink-soft); box-shadow: 6px 6px 0 0 var(--coral-deep); }
.panel-blue { background: var(--blue-soft); box-shadow: 6px 6px 0 0 var(--navy-deep); }

.panel h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 3.4vw, 42px);
  color: var(--navy);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 18px;
}

.panel h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  margin-bottom: 10px;
}

.panel p { line-height: 1.6; max-width: 42ch; }

.split-stack { display: flex; flex-direction: column; gap: 32px; }
.split-stack .panel { flex: 1; padding: 36px 40px; }

.panel-turquoise .btn { margin-top: 40px; }

/* ============================================================
   Product page
   ============================================================ */
.product-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  grid-template-areas:
    "head ."
    "preview config";
  column-gap: 64px;
  row-gap: 28px;
  align-items: start;
  align-content: start;
  padding-top: calc(var(--header-h) + 56px);
  padding-bottom: 96px;
}

.product-head { grid-area: head; max-width: 52ch; }
.preview-panel { grid-area: preview; align-self: start; width: 100%; }
.product-config { grid-area: config; align-self: start; }

.preview-panel {
  position: relative;
  background: var(--turquoise);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
}

.preview-panel canvas,
.preview-panel .preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8%;
}

.preview-panel canvas { padding: 0; }

.preview-chip {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 2;
  background: var(--coral-deep);
  color: var(--sand);
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 14px;
}

.viewer-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--navy-deep);
  font-family: var(--font-label);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: opacity 0.4s;
}

.viewer-loading.done { opacity: 0; pointer-events: none; }

.product-head h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(36px, 4.4vw, 56px);
  line-height: 1.02;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin: 10px 0 16px;
}

.product-head > p { font-size: 17px; line-height: 1.65; color: #3e484f; margin: 0; }

.config-box {
  background: #fff;
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.config-box .label-caps { color: var(--ink); margin-bottom: 10px; display: block; }

.option-row { display: flex; gap: 10px; flex-wrap: wrap; }

.option-pill {
  border: 2px solid var(--ink);
  background: var(--sand);
  padding: 11px 18px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.option-pill.active { background: var(--navy); color: var(--sand); }

.text-input {
  width: 100%;
  border: none;
  border-bottom: 3px solid var(--coral-deep);
  background: var(--sand);
  padding: 13px 14px;
  font-family: var(--font-label);
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink);
  outline: none;
}

.text-input:focus { background: #ffedb8; }

.qty-row { display: flex; align-items: center; gap: 0; width: max-content; border: 2px solid var(--ink); }

.qty-row button {
  width: 44px;
  height: 44px;
  background: var(--sand);
  border: none;
  font-family: var(--font-label);
  font-size: 20px;
}

.qty-row button:hover { background: var(--turquoise-bright); }

.qty-row span {
  width: 56px;
  text-align: center;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 16px;
  border-left: 2px solid var(--ink);
  border-right: 2px solid var(--ink);
  line-height: 44px;
}

.subtotal-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-top: 2px solid var(--sand-dim);
  padding-top: 20px;
}

.subtotal-row .price { font-size: 26px; color: var(--navy); }

.pricing-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5a6670;
}

.price-breakdown {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(20, 36, 47, 0.18);
  display: grid;
  gap: 8px;
}

.price-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.price-breakdown-row.is-muted {
  color: #6b7780;
  font-size: 13px;
}

.tier-pill {
  flex: 1 1 100%;
  text-align: left;
}

.ship-note {
  margin-top: 22px;
  background: var(--pink-soft);
  border: 2px solid var(--coral-deep);
  padding: 14px 18px;
  font-size: 13.5px;
  color: var(--coral-deep);
  display: flex;
  gap: 10px;
  align-items: center;
  line-height: 1.45;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}

/* solid header variant for product page (no hero) */
body.solid-header .site-header { background: var(--video-sky); }

/* ============================================================
   Cart drawer
   ============================================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(20, 36, 47, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  width: min(420px, 100vw);
  background: var(--sand);
  border-left: 3px solid var(--ink);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

body.cart-open .cart-drawer { transform: translateX(0); }
body.cart-open .cart-overlay { opacity: 1; pointer-events: auto; }

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 2px solid var(--ink);
}

.cart-head h2 { font-family: var(--font-display); font-size: 22px; font-weight: 800; text-transform: uppercase; }

.cart-close { background: none; border: none; font-size: 26px; line-height: 1; }

.cart-items { flex: 1; overflow-y: auto; padding: 20px 28px; display: flex; flex-direction: column; gap: 18px; }

.cart-empty { color: #6e7880; font-size: 15px; text-align: center; margin-top: 40px; }

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--pink-soft);
  padding-bottom: 16px;
}

.cart-item img { width: 64px; height: 64px; object-fit: contain; background: var(--sand-dim); border: 2px solid var(--ink); }

.cart-item h4 { font-family: var(--font-display); font-size: 15px; font-weight: 700; }
.cart-item .meta { font-size: 12.5px; color: #6e7880; margin-top: 3px; }

.cart-item .remove {
  background: none;
  border: none;
  color: var(--coral-deep);
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 6px;
  padding: 0;
}

.cart-foot { padding: 24px 28px; border-top: 2px solid var(--ink); }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-label);
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 18px;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: var(--ink);
  color: var(--sand);
  padding: 72px 0 48px;
  border-top: 4px solid var(--coral-deep);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.site-footer .logo { font-size: 30px; color: var(--turquoise); }

.site-footer p { color: #9fb0ba; font-size: 14.5px; line-height: 1.6; margin-top: 14px; max-width: 34ch; }

.site-footer h4 {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 18px;
}

.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.site-footer ul a { font-size: 14.5px; color: #d7dee2; }
.site-footer ul a:hover { color: var(--turquoise-bright); }

.footer-bottom {
  border-top: 1px solid #2c3f4c;
  padding-top: 28px;
  font-family: var(--font-label);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: #7d909c;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
  /* longhands only — a `padding` shorthand here would wipe out
     .product-layout's top padding and shove it under the fixed header */
  .container { padding-left: 20px; padding-right: 20px; }
  .split { grid-template-columns: 1fr; }
  .product-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "preview"
      "config";
    gap: 24px;
    padding-top: calc(var(--header-h) + 28px);
    padding-bottom: 64px;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 64px 0; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 120;
    width: min(320px, 88vw);
    flex-direction: column;
    gap: 0;
    padding: calc(var(--header-h) + 12px) 0 calc(24px + env(safe-area-inset-bottom));
    background: var(--sand);
    color: var(--ink);
    border-left: 2px solid var(--ink);
    box-shadow: -12px 0 0 0 var(--teal);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    transform: translateX(108%) scale(0.96);
    transform-origin: right center;
    visibility: hidden;
    pointer-events: none;
    transition:
      transform 0.52s cubic-bezier(0.22, 1, 0.36, 1),
      visibility 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .main-nav.open {
    transform: translateX(0) scale(1);
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav > .nav-item,
  .main-nav > a {
    opacity: 0;
    transform: translateX(28px);
    transition:
      opacity 0.38s cubic-bezier(0.22, 1, 0.36, 1),
      transform 0.48s cubic-bezier(0.22, 1, 0.36, 1),
      border-color 0.2s,
      background 0.2s;
  }

  body.nav-open .main-nav > .nav-item,
  body.nav-open .main-nav > a {
    opacity: 1;
    transform: translateX(0);
  }

  body.nav-open .main-nav > *:nth-child(1) { transition-delay: 0.1s; }
  body.nav-open .main-nav > *:nth-child(2) { transition-delay: 0.16s; }
  body.nav-open .main-nav > *:nth-child(3) { transition-delay: 0.22s; }
  body.nav-open .main-nav > *:nth-child(4) { transition-delay: 0.28s; }

  .main-nav a {
    padding: 16px 24px;
    border-bottom: 2px solid var(--sand-dim);
    color: var(--ink);
  }

  .main-nav a:hover { border-bottom-color: var(--sand-dim); background: var(--turquoise-bright); }

  /* shop dropdown inside drawer */
  .nav-item.has-dropdown { display: flex; flex-direction: column; }
  .shop-toggle { justify-content: space-between; width: 100%; }
  .shop-toggle svg { color: var(--teal); }

  .dropdown {
    position: static;
    display: block;
    min-width: 0;
    border: none;
    box-shadow: none;
    background: var(--sand-dim);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
      max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1),
      opacity 0.35s ease,
      padding 0.35s ease;
  }

  .has-dropdown:hover .dropdown {
    max-height: 0;
    opacity: 0;
    padding: 0;
  }

  .has-dropdown.open .dropdown {
    max-height: 520px;
    opacity: 1;
    padding: 6px 0 10px;
  }

  .dropdown-title {
    color: var(--coral-deep);
    padding: 10px 24px 6px;
  }

  .dropdown a {
    color: var(--ink);
    border-bottom: none;
    padding: 12px 24px 12px 32px;
    transform: none;
    opacity: 1;
  }

  .dropdown a:hover { background: var(--turquoise-bright); }

  .nav-toggle {
    display: grid;
    place-items: center;
    position: relative;
    z-index: 130;
    background: none;
    border: none;
    color: inherit;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: -6px -8px -6px 0;
    cursor: pointer;
  }

  .site-header { z-index: 125; }

  /* carousel: arrows overlay the stage so cards get full width */
  .carousel { gap: 0; }
  .carousel-stage { height: 500px; }
  .c-card { width: 74%; }
  .carousel-arrow { position: absolute; width: 46px; height: 46px; }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }

  .hero-title { text-shadow: 3px 3px 0 var(--navy-deep); }
  .panel { padding: 32px 24px; }

  /* product page: tighter preview + info column */
  .preview-panel { aspect-ratio: 1 / 0.95; }
  .preview-chip { top: 12px; left: 12px; font-size: 11px; padding: 6px 10px; }
  .preview-controls { bottom: 12px; }
  .preview-ctrl { padding: 9px 14px; font-size: 12px; }
  .product-info h1 { font-size: clamp(30px, 9vw, 40px); margin: 8px 0 12px; }
  .product-info > p { font-size: 15.5px; margin-bottom: 24px; }
  .config-box { padding: 22px 18px; gap: 22px; }
  .ship-note { font-size: 13px; }
  .text-input { font-size: 16px; } /* ≥16px stops iOS zooming in on focus */

  /* design studio bar: full-width action buttons */
  .jc-bar-actions { width: 100%; }
  .jc-bar-actions .btn { flex: 1; justify-content: center; }
  .jc-btn-sm { font-size: 12px; padding: 10px 12px; white-space: nowrap; }
}

/* ============================================================
   Jar Design Studio (AI customizer)
   ============================================================ */
.jar-viewer-mount {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.jar-viewer-mount.is-interactive-3d { cursor: grab; touch-action: none; }
.jar-viewer-mount.is-dragging-3d { cursor: grabbing; }
.jar-viewer-mount canvas { width: 100% !important; height: 100% !important; padding: 0 !important; }

.preview-controls {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 10px;
}

.preview-ctrl {
  padding: 10px 18px;
  font-size: 13px;
  box-shadow: 4px 4px 0 0 var(--ink);
}

.preview-ctrl.active { background: var(--turquoise-bright); }

.jc-bar {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--sand-dim);
  margin-bottom: 4px;
}

.jc-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.jc-bar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.jc-btn-sm { padding: 10px 16px; font-size: 13px; }

.jc-status {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--teal);
  font-weight: 600;
}

.jc-downloads {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--sand-dim);
}

.jc-downloads[hidden] { display: none; }

.jc-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.jc-download-btn[hidden] { display: none; }

.jc-download-btn::before {
  content: "↓ ";
  font-weight: 700;
}

body.design-modal-open { overflow: hidden; }

.jc-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.jc-modal[hidden] { display: none; }

.jc-modal-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(20, 36, 47, 0.55);
  cursor: pointer;
}

.jc-modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: min(90vh, 820px);
  background: var(--sand);
  border: 2px solid var(--ink);
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.jc-modal-head,
.jc-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 2px solid var(--ink);
}

.jc-modal-foot {
  border-bottom: none;
  border-top: 2px solid var(--ink);
  background: var(--sand-dim);
}

.jc-modal-sub {
  margin: 6px 0 0;
  font-size: 14px;
  color: #3e484f;
}

.jc-modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.jc-progress {
  height: 4px;
  background: var(--sand-dim);
}

.jc-progress-fill {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--teal);
  transition: width 0.25s ease;
}

.jc-step-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 2px solid var(--sand-dim);
}

.jc-step-pill {
  border: 2px solid var(--ink);
  background: var(--sand);
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

.jc-step-pill.active { background: var(--navy); color: var(--sand); }
.jc-step-pill.done:not(.active) { background: var(--turquoise-bright); }
.jc-step-pill:disabled { opacity: 0.4; cursor: not-allowed; }

.jc-error {
  margin: 0;
  padding: 10px 18px;
  background: #ffe8e4;
  color: var(--coral-deep);
  font-size: 14px;
  font-weight: 600;
}

.jc-error[hidden] { display: none; }

.jc-modal-body {
  padding: 20px 22px;
  overflow-y: auto;
  flex: 1;
}

.jc-lead {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px;
}

.jc-hint {
  margin: 0 0 16px;
  font-size: 14px;
  color: #3e484f;
  line-height: 1.5;
}

.jc-source-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.jc-source-card {
  text-align: left;
  border: 2px solid var(--ink);
  background: #fff;
  padding: 16px;
  cursor: pointer;
  box-shadow: 4px 4px 0 0 var(--teal);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jc-source-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  margin: 8px 0 6px;
}

.jc-source-card span:last-child {
  font-size: 13px;
  color: #3e484f;
  line-height: 1.45;
}

.jc-source-badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--coral-deep);
  color: var(--sand);
  padding: 4px 8px;
}

.jc-source-card:hover,
.jc-source-card.active {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 0 var(--navy);
}

.jc-source-card.active { background: var(--turquoise-bright); }

.jc-upload {
  display: grid;
  place-items: center;
  gap: 8px;
  padding: 28px 20px;
  border: 2px dashed var(--ink);
  background: #fff;
  cursor: pointer;
  text-align: center;
  font-weight: 600;
}

.jc-upload.is-complete { border-style: solid; background: var(--turquoise-bright); }
.jc-upload-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 20px;
  background: var(--sand);
}

.jc-logo-controls {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.jc-logo-controls label { display: grid; gap: 6px; }
.jc-logo-controls input[type="range"] { width: 100%; accent-color: var(--teal); }

.jc-modal-body textarea {
  width: 100%;
  margin: 8px 0 14px;
  padding: 12px 0;
  border: none;
  border-bottom: 3px solid var(--coral-deep);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
  resize: vertical;
  min-height: 96px;
}

.jc-text-input {
  display: block;
  width: 100%;
  margin: 8px 0 18px;
  padding: 12px 0;
  border: none;
  border-bottom: 3px solid var(--coral-deep);
  background: transparent;
  font-family: var(--font-body);
  font-size: 16px;
}

.jc-text-input:focus {
  outline: none;
  background: #ffedb8;
}

.jc-focus-label {
  margin-top: 4px;
  margin-bottom: 10px;
}

.jc-finish-label {
  margin-top: 18px;
  margin-bottom: 10px;
}

.jc-focus-grid,
.jc-finish-grid {
  margin-top: 0;
}

.jc-modal-body textarea:focus {
  outline: none;
  background: #ffedb8;
}

.jc-presets { margin-top: 4px; }

.jc-color-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.jc-color-swatch {
  border: 2px solid var(--ink);
  background: var(--swatch);
  min-height: 52px;
  cursor: pointer;
  position: relative;
  box-shadow: 3px 3px 0 0 var(--ink);
}

.jc-color-swatch span {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sand);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.jc-color-swatch.active {
  outline: 3px solid var(--coral-deep);
  outline-offset: 2px;
}

.jc-free-color { margin-bottom: 12px; }

.jc-custom-color[hidden] { display: none; }

.jc-custom-color {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 2px solid var(--ink);
}

.jc-custom-color input[type="color"] {
  width: 48px;
  height: 36px;
  border: 2px solid var(--ink);
  padding: 0;
  cursor: pointer;
}

.jc-summary {
  background: #fff;
  border: 2px solid var(--ink);
  padding: 14px 16px;
  margin-bottom: 18px;
}

.jc-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--sand-dim);
  font-size: 14px;
}

.jc-summary-row:last-child { border-bottom: none; }

.jc-summary-row span {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3e484f;
}

.jc-summary-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink);
  background: var(--swatch);
  vertical-align: -2px;
  margin-right: 6px;
}

.jc-step-label {
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3e484f;
}

.jc-generating {
  position: absolute;
  inset: 0;
  background: rgba(252, 249, 242, 0.92);
  display: grid;
  place-items: center;
  z-index: 5;
}

.jc-generating[hidden] { display: none; }

.jc-generating-card {
  text-align: center;
  padding: 28px;
  border: 2px solid var(--ink);
  background: var(--turquoise-bright);
  box-shadow: var(--shadow-hard);
  max-width: 280px;
}

.jc-generating-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  margin: 14px 0 8px;
}

.jc-generating-card p {
  margin: 0;
  font-size: 14px;
  color: #3e484f;
  line-height: 1.5;
}

.jc-spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  border: 3px solid var(--ink);
  border-top-color: var(--coral-deep);
  border-radius: 50%;
  animation: jc-spin 0.8s linear infinite;
}

@keyframes jc-spin { to { transform: rotate(360deg); } }

/* designer becomes a full-screen sheet on phones */
@media (max-width: 640px) {
  .jc-modal { padding: 0; place-items: stretch; }

  .jc-modal-panel {
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: none;
    box-shadow: none;
  }

  .jc-modal-head { padding: 14px 18px; }
  .jc-modal-sub { font-size: 13px; margin-top: 3px; }

  /* step pills scroll in one row instead of wrapping */
  .jc-step-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px 14px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .jc-step-nav::-webkit-scrollbar { display: none; }
  .jc-step-pill { flex: none; padding: 8px 12px; }

  .jc-modal-body { padding: 18px; }
  .jc-lead { font-size: 18px; }

  .jc-modal-foot {
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  }
  .jc-modal-foot .btn { padding: 12px 18px; font-size: 13px; }

  .jc-source-grid { grid-template-columns: 1fr; }
  .jc-source-card { padding: 14px; }
  .jc-color-grid { grid-template-columns: repeat(3, 1fr); }
  .jc-color-swatch { min-height: 60px; }
  .jc-upload { padding: 22px 16px; }
}
