/* =========================================================
   Omny Nails — Base Stylesheet
   Aesthetic: majestic blue, clouds, soft glow, glassmorphism
   ========================================================= */

:root {
  --sky-top: #5b8fd6;
  --sky-mid: #84b2e8;
  --sky-low: #b9d6f5;
  --sky-pale: #e8f2fd;
  --cloud: #ffffff;
  --ink: #1b2c47;
  --ink-soft: #3c5277;
  --accent: #2f6fd0;
  --accent-deep: #1d4e9e;
  --gold: #f4e2b8;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.75);
  --shadow: 0 18px 50px rgba(27, 44, 71, 0.18);
  --radius: 22px;
  --maxw: 1180px;
  --font: "Fredoka", "Segoe UI", system-ui, sans-serif;
  --serif: "Bagel Fat One", "Fredoka", system-ui, sans-serif;  /* puffy cloud display */
  --display: "Bagel Fat One", "Fredoka", system-ui, sans-serif;
  --hand: "Gloria Hallelujah", "Comic Sans MS", cursive;       /* handwritten grunge accent */
  --ink-line: #14233f;                                         /* sticker outline */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--sky-pale);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.05; color: var(--ink); letter-spacing: -0.5px; }
h3 { font-family: var(--font); font-weight: 700; line-height: 1.15; color: var(--ink); }
.eyebrow {
  font-family: var(--hand);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--accent-deep);
  transform: rotate(-1.5deg);
  display: inline-block;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.95em 1.8em;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff;
  box-shadow: 0 12px 30px rgba(29, 78, 158, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 38px rgba(29, 78, 158, 0.45); }
.btn-ghost {
  background: var(--glass);
  color: var(--accent-deep);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover { transform: translateY(-3px); background: rgba(255,255,255,0.8); }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(232, 242, 253, 0.65);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand { display: flex; align-items: center; gap: 0.5em; font-family: var(--serif); font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.brand .logo-cloud { font-size: 1.7rem; }
.brand-cloud { width: 38px; height: 27px; flex: none; display: block; }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-weight: 500; font-size: 0.95rem; color: var(--ink-soft); transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-deep); }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.4em; font-weight: 600 !important; color: var(--accent-deep) !important; }
.cart-count {
  background: var(--accent-deep);
  color: #fff;
  border-radius: 999px;
  font-size: 0.72rem;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 42%, var(--sky-low) 78%, var(--sky-pale) 100%);
  overflow: hidden;
}

/* full-bleed real-cloud photo background */
.hero-photo-bg {
  background-image: url("../assets/hero-hands.jpeg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
}
/* dark scrim so the white headline + buttons stay readable over the photo */
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      rgba(15, 28, 52, 0.72) 0%,
      rgba(15, 28, 52, 0.45) 30%,
      rgba(15, 28, 52, 0.12) 52%,
      rgba(15, 28, 52, 0.00) 72%),
    linear-gradient(180deg,
      rgba(15, 28, 52, 0.35) 0%,
      rgba(15, 28, 52, 0.00) 28%,
      rgba(15, 28, 52, 0.00) 62%,
      rgba(15, 28, 52, 0.45) 100%);
}
.hero-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  width: 100%;
}
.hero-copy h1 { font-size: clamp(2.8rem, 6vw, 5rem); color: #fff; text-shadow: 0 4px 30px rgba(15, 28, 52, 0.55); margin-bottom: 1.8rem; }
.hero-copy .eyebrow { color: #eaf3ff; }
.hero-copy p { color: #f1f7ff; font-size: 1.12rem; max-width: 30em; margin: 1.2rem 0 2rem; text-shadow: 0 2px 14px rgba(27,44,71,0.25); }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-art { position: relative; display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 560px; filter: drop-shadow(0 30px 50px rgba(27,44,71,0.3)); }
.hero-photo {
  width: 100%;
  max-width: 440px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 30px 60px rgba(27, 44, 71, 0.35);
  border: 4px solid rgba(255, 255, 255, 0.55);
}

/* ---------- Clouds ---------- */
.cloud {
  position: absolute;
  background: var(--cloud);
  border-radius: 100px;
  filter: blur(4px);
  opacity: 0.92;
  z-index: 1;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: var(--cloud);
  border-radius: 50%;
}
.cloud-1 { width: 220px; height: 60px; top: 16%; left: -6%; animation: drift 60s linear infinite; }
.cloud-1::before { width: 90px; height: 90px; top: -42px; left: 36px; }
.cloud-1::after { width: 120px; height: 120px; top: -64px; left: 96px; }
.cloud-2 { width: 300px; height: 70px; top: 54%; left: 70%; opacity: 0.8; animation: drift 90s linear infinite reverse; }
.cloud-2::before { width: 110px; height: 110px; top: -52px; left: 50px; }
.cloud-2::after { width: 150px; height: 150px; top: -80px; left: 130px; }
.cloud-3 { width: 160px; height: 46px; top: 30%; left: 38%; opacity: 0.7; filter: blur(6px); animation: drift 75s linear infinite; }
.cloud-3::before { width: 70px; height: 70px; top: -32px; left: 28px; }
.cloud-3::after { width: 90px; height: 90px; top: -46px; left: 70px; }
.cloud-4 { width: 240px; height: 64px; top: 74%; left: 8%; opacity: 0.85; animation: drift 100s linear infinite reverse; }
.cloud-4::before { width: 95px; height: 95px; top: -46px; left: 40px; }
.cloud-4::after { width: 130px; height: 130px; top: -70px; left: 110px; }

@keyframes drift {
  from { transform: translateX(-10vw); }
  to { transform: translateX(120vw); }
}

/* soft sun glow (suppressed when a real photo is the background) */
.hero::after {
  content: "";
  position: absolute;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 60%);
  z-index: 1;
}
.hero-photo-bg::after { display: none; }

/* wave divider */
.hero-wave { position: absolute; bottom: -1px; left: 0; width: 100%; z-index: 2; line-height: 0; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 40em; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--ink-soft); margin-top: 0.8rem; font-size: 1.08rem; }

/* ---------- Steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.step-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 38px 30px;
  text-align: center;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}
.step-card:hover { transform: translateY(-8px); }
.step-num {
  width: 56px; height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 22px rgba(29,78,158,0.35);
}
.step-card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.step-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------- Sizing kit highlight ---------- */
.kit {
  background: linear-gradient(135deg, var(--sky-mid), var(--accent-deep));
  border-radius: 32px;
  color: #fff;
  padding: 60px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.kit h2 { color: #fff; font-size: clamp(2rem, 4vw, 2.8rem); }
.kit p { color: #eaf3ff; margin: 1rem 0 1.8rem; }
.kit .price-tag { font-family: var(--serif); font-size: 3.4rem; font-weight: 700; }
.kit .price-tag small { font-size: 1rem; font-family: var(--font); opacity: 0.85; }
.kit-visual { text-align: center; font-size: 8rem; filter: drop-shadow(0 14px 30px rgba(0,0,0,0.25)); }

/* ---------- Product grid ---------- */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 26px 60px rgba(27,44,71,0.22); }
.product-thumb {
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  font-size: 4.5rem;
  background: linear-gradient(160deg, var(--sky-low), var(--sky-pale));
  position: relative;
}
.product-badge {
  position: absolute; top: 14px; left: 14px;
  background: rgba(255,255,255,0.85);
  color: var(--accent-deep);
  font-size: 0.7rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px;
}
.product-body { padding: 22px; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-body h3 { font-size: 1.35rem; }
.product-body .desc { color: var(--ink-soft); font-size: 0.92rem; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 0.8rem; }
.product-foot .btn { padding: 0.55em 1.05em; font-size: 0.82rem; border-radius: 11px; box-shadow: 3px 3px 0 var(--ink-line); }
.product-foot .btn:hover { box-shadow: 4px 4px 0 var(--ink-line); }
.product-price { font-family: var(--serif); font-size: 1.6rem; font-weight: 700; color: var(--accent-deep); }

/* ---------- Sizing page ---------- */
.size-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.size-panel {
  background: #fff;
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}
.size-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.size-table th, .size-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e6eefb; }
.size-table th { color: var(--accent-deep); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.size-table tr:hover td { background: var(--sky-pale); }
.size-pick { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.2rem; }
.size-chip {
  padding: 10px 16px; border-radius: 12px;
  border: 1.5px solid #cfe0f6; background: #fff;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.size-chip:hover, .size-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1.6fr 0.9fr; gap: 36px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-row {
  display: grid; grid-template-columns: 70px 1fr auto auto; gap: 18px; align-items: center;
  background: #fff; border-radius: 16px; padding: 16px 20px; box-shadow: var(--shadow);
}
.cart-row .thumb { font-size: 2.4rem; text-align: center; }
.cart-row .meta h4 { font-family: var(--serif); font-size: 1.2rem; }
.cart-row .meta span { color: var(--ink-soft); font-size: 0.85rem; }
.qty { display: inline-flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #cfe0f6; background: #fff; cursor: pointer; font-size: 1rem; }
.cart-remove { background: none; border: none; color: #b54b58; cursor: pointer; font-size: 0.85rem; }
.cart-summary {
  background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); position: sticky; top: 100px;
}
.cart-summary h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--ink-soft); }
.summary-row.total { border-top: 1px solid #e6eefb; margin-top: 8px; padding-top: 16px; color: var(--ink); font-weight: 700; font-size: 1.2rem; }
.empty-cart { text-align: center; padding: 80px 20px; color: var(--ink-soft); }
.empty-cart .big { font-size: 4rem; margin-bottom: 1rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff; padding: 14px 26px; border-radius: 999px;
  box-shadow: var(--shadow); z-index: 100; opacity: 0; transition: all 0.35s ease;
  font-weight: 500; font-size: 0.95rem;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cdd9ee; padding: 60px 0 30px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h4 { color: #fff; font-family: var(--serif); font-size: 1.3rem; margin-bottom: 0.8rem; }
.footer a { display: block; color: #aebfdc; padding: 4px 0; font-size: 0.92rem; }
.footer a:hover { color: #fff; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; color: #8fa3c7; }

/* ---------- Page header (inner pages) ---------- */
.page-head {
  background: linear-gradient(180deg, var(--sky-mid), var(--sky-pale));
  padding: 80px 0 70px; text-align: center; position: relative; overflow: hidden;
}
.page-head h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); color: #fff; text-shadow: 0 4px 20px rgba(27,44,71,0.25); position: relative; z-index: 2; }
.page-head p { color: #f1f7ff; margin-top: 0.6rem; position: relative; z-index: 2; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; background: rgba(232,242,253,0.97); padding: 24px; gap: 1rem; transform: translateY(-150%); transition: transform 0.3s; box-shadow: var(--shadow); }
  .nav-links.open { transform: translateY(0); }
  .nav-toggle { display: block; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .hero-copy p { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .hero-art { order: -1; }
  /* on narrow screens the photo focal point + a fuller dark scrim keep text legible */
  .hero-photo-bg { background-position: center 45%; }
  .hero-scrim {
    background: linear-gradient(180deg,
      rgba(15, 28, 52, 0.60) 0%,
      rgba(15, 28, 52, 0.30) 45%,
      rgba(15, 28, 52, 0.62) 100%);
  }
  .steps { grid-template-columns: 1fr; }
  .kit { grid-template-columns: 1fr; text-align: center; padding: 40px 28px; }
  .kit-visual { font-size: 5rem; }
  .size-flow { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================================
   GRUNGE / BUBBLE LAYER
   Grain texture, sticker outlines, hard shadows, hand-drawn tilt.
   Layered on top so the base stays intact.
   ========================================================= */

/* gritty film grain over the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* brand: puffy + slight tilt like a sticker */
.brand { font-family: var(--display); font-weight: 400; transform: rotate(-2deg); }

/* sticker buttons — chunky outline + hard offset shadow, no soft glow */
.btn {
  border: 2.5px solid var(--ink-line);
  border-radius: 14px;
  box-shadow: 4px 4px 0 var(--ink-line);
  text-transform: lowercase;
  letter-spacing: 0.2px;
}
.btn-primary { box-shadow: 4px 4px 0 var(--ink-line); }
.btn-primary:hover,
.btn-ghost:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink-line);
}
.btn-primary:active,
.btn-ghost:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink-line); }
.btn-ghost { border: 2.5px solid var(--ink-line); background: #fff; }

/* cards become hand-cut stickers: outline + hard shadow + tiny tilt */
.step-card,
.product-card,
.size-panel,
.cart-row,
.cart-summary {
  border: 2.5px solid var(--ink-line);
  box-shadow: 6px 6px 0 var(--ink-line);
  background: #fbfdff;
}
.step-card:nth-child(2) { transform: rotate(1.2deg); }
.step-card:nth-child(1) { transform: rotate(-1.4deg); }
.step-card:nth-child(3) { transform: rotate(0.8deg); }
.step-card:hover,
.product-card:hover { transform: translate(-3px, -3px) rotate(0); box-shadow: 9px 9px 0 var(--ink-line); }

/* puffy round step numbers with outline */
.step-num { border: 2.5px solid var(--ink-line); box-shadow: 3px 3px 0 var(--ink-line); font-family: var(--display); font-weight: 400; }

/* badges look like slapped-on stickers */
.product-badge {
  font-family: var(--hand);
  text-transform: none;
  letter-spacing: 0;
  border: 2px solid var(--ink-line);
  box-shadow: 2px 2px 0 var(--ink-line);
  transform: rotate(-5deg);
  background: var(--gold);
  color: var(--ink-line);
}

/* kit + page headers: keep the cloud photo energy but add a hard outline */
.kit { border: 3px solid var(--ink-line); box-shadow: 10px 10px 0 var(--ink-line); border-radius: 18px; }

/* size chips as little stickers */
.size-chip { border: 2px solid var(--ink-line); box-shadow: 2px 2px 0 var(--ink-line); border-radius: 10px; }
.size-chip:hover, .size-chip.active { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink-line); }

/* section headings tilt a touch so nothing feels machine-perfect */
.section-head h2 { transform: rotate(-1deg); }
.product-price { font-family: var(--display); font-weight: 400; }

/* hand-drawn doodle icon sizing */
.doodle { display: block; }
.product-thumb { font-size: 0; }            /* drop any leftover emoji sizing */
.product-thumb .doodle { width: 130px; height: 130px; }
.cart-row .thumb .doodle { width: 56px; height: 56px; margin: 0 auto; }
.kit-visual .doodle { width: 100%; max-width: 260px; margin: 0 auto; height: auto; }
.product-thumb-link { display: block; }

/* =========================================================
   PRODUCT DETAIL PAGE — picture of the set + per-finger size chart
   ========================================================= */
.product-detail {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: start;
}
.product-photo {
  position: relative;
  background: linear-gradient(160deg, var(--sky-low), var(--sky-pale));
  border: 2.5px solid var(--ink-line);
  box-shadow: 6px 6px 0 var(--ink-line);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  position: sticky;
  top: 100px;
}
.product-photo .doodle { width: 62%; height: auto; }
.product-info h1 { margin-top: 0.2rem; }

/* per-finger size chart */
.finger-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid #e6eefb;
  flex-wrap: wrap;
}
.finger-name {
  font-weight: 600;
  font-size: 0.9rem;
  width: 78px;
  flex: none;
}
.finger-row .size-pick { margin-top: 0; gap: 7px; }
.finger-row .size-chip { padding: 6px 11px; }

.add-row { display: flex; align-items: center; gap: 16px; margin-top: 1.6rem; flex-wrap: wrap; }
.size-note { color: #b54b58; font-size: 0.9rem; font-weight: 500; }

/* compact size chips (used in cart + dashboard) */
.sizes-chip {
  display: inline-block;
  background: var(--sky-pale);
  border: 1.5px solid #cfe0f6;
  border-radius: 8px;
  padding: 3px 9px;
  font-size: 0.78rem;
  margin: 2px;
}
.cart-sizes { margin-top: 6px; line-height: 1.8; }

@media (max-width: 860px) {
  .product-detail { grid-template-columns: 1fr; }
  .product-photo { position: relative; top: 0; max-width: 320px; margin: 0 auto; }
}

/* =========================================================
   CHECKOUT MODAL
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 28, 52, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow: auto;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff;
  border: 2.5px solid var(--ink-line);
  box-shadow: 8px 8px 0 var(--ink-line);
  border-radius: var(--radius);
  width: 100%; max-width: 520px; padding: 30px; position: relative;
}
.modal h2 { font-size: 2rem; }
.modal-close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 1.9rem; cursor: pointer;
  color: var(--ink-soft); line-height: 1;
}
.demo-banner {
  background: var(--gold); border: 2px solid var(--ink-line); border-radius: 10px;
  padding: 8px 12px; font-size: 0.82rem; margin: 12px 0 18px;
}
#checkout-form fieldset { border: none; padding: 0; margin: 0 0 16px; }
#checkout-form legend { font-family: var(--hand); color: var(--accent-deep); margin-bottom: 6px; font-size: 0.95rem; }
#checkout-form label { display: block; font-weight: 600; font-size: 0.82rem; margin-bottom: 10px; }
#checkout-form input:not([type="checkbox"]) {
  width: 100%; margin-top: 4px; padding: 10px 12px;
  border: 2px solid #cfe0f6; border-radius: 10px;
  font-family: var(--font); font-size: 0.95rem; font-weight: 400; color: var(--ink);
}
#checkout-form input:focus { outline: none; border-color: var(--accent); }
#checkout-form .row { display: flex; gap: 10px; }
#checkout-form .row label { flex: 1; }
.check { display: flex !important; align-items: flex-start; gap: 8px; font-weight: 500 !important; font-size: 0.84rem; margin: 6px 0 16px; }
.check input { width: auto !important; margin-top: 3px; flex: none; }
.form-total { font-family: var(--display); font-size: 1.5rem; color: var(--accent-deep); margin-bottom: 14px; }
.modal .error { color: #b54b58; font-size: 0.9rem; margin-top: 10px; min-height: 1.2em; font-weight: 500; }
.legal-note { font-size: 0.76rem; color: var(--ink-soft); margin-top: 14px; line-height: 1.55; }
.order-meta { font-size: 0.86rem; color: var(--ink-soft); margin: 8px 0; line-height: 1.5; }
.order-meta strong { color: var(--ink); }

/* =========================================================
   HERO INTRO ANIMATION (seamless — single photo, no split)
   The whole photo is ONE continuous layer that gently un-stretches into
   place on load, so the hands ease together with no cut or seam anywhere.
   A light blooms where the fingers meet; the headline + buttons grow.
   Plays once, then holds.
   ========================================================= */
.hero-photo-layer {
  position: absolute; inset: 0; z-index: 0;
  background-image: url("../assets/hero-hands.jpeg");
  background-size: cover;
  background-position: center 45%;
  background-repeat: no-repeat;
  transform-origin: center center;
  will-change: transform;
  backface-visibility: hidden;
}

/* the divine light at the fingertip meeting point */
.hero-flash {
  position: absolute; top: 47%; left: 50%; z-index: 1; pointer-events: none;
  width: 32vmax; height: 32vmax;
  transform: translate(-50%, -50%) scale(.25);
  background: radial-gradient(circle,
    rgba(255, 255, 255, 1) 0%,
    rgba(246, 251, 255, 0.78) 18%,
    rgba(214, 234, 255, 0.34) 40%,
    rgba(255, 255, 255, 0.00) 66%);
  mix-blend-mode: screen;
  opacity: 0;
}

/* play once on load, hold the final frame (forwards) */
.hero-intro .hero-photo-layer { animation: handsSettle 2.6s cubic-bezier(.2,.7,.25,1) forwards; }
.hero-intro .hero-flash       { animation: flashBloom  2.6s ease-in forwards; }
.hero-intro .hero-copy        { animation: heroGrow    2.6s cubic-bezier(.2,.7,.25,1) forwards; transform-origin: center; }

/* whole image starts gently stretched (hands spread), eases to true size
   (hands together) — one continuous layer, so there is never a seam */
@keyframes handsSettle {
  from { transform: scaleX(1.16); }
  to   { transform: scaleX(1); }
}
@keyframes flashBloom {
  0%   { opacity: .15; transform: translate(-50%, -50%) scale(.5); }  /* visible right away */
  70%  { opacity: 1;   transform: translate(-50%, -50%) scale(1); }   /* brightest as hands meet */
  100% { opacity: .6;  transform: translate(-50%, -50%) scale(1.08); }/* settle, hands stay visible */
}
@keyframes heroGrow {
  0%   { opacity: .25; transform: scale(.64); }
  100% { opacity: 1;   transform: scale(1); }
}

/* respect users who prefer no motion — show the finished frame instantly */
@media (prefers-reduced-motion: reduce) {
  .hero-intro .hero-photo-layer { animation: none; transform: none; }
  .hero-intro .hero-flash { animation: none; opacity: .6; transform: translate(-50%, -50%) scale(1.08); }
  .hero-intro .hero-copy { animation: none; opacity: 1; transform: none; }
}

/* product photos (real set images, with cloud fallback) */
.product-thumb .thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-photo { overflow: hidden; }
.product-photo .thumb-img { width: 100%; height: 100%; object-fit: cover; }
.cart-row .thumb .thumb-img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }

/* =========================================================
   CUSTOM SET PAGE (customizer)
   ========================================================= */
.custom-flow { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.upload-box {
  display: block; cursor: pointer; text-align: center;
  border: 2.5px dashed #b9c8db; border-radius: 16px;
  padding: 30px; background: #fbfdff; transition: border-color 0.2s, background 0.2s;
}
.upload-box:hover { border-color: var(--accent); background: #fff; }
#upload-empty { display: flex; flex-direction: column; gap: 6px; align-items: center; color: var(--ink-soft); }
#inspo-preview { max-width: 100%; max-height: 320px; border-radius: 12px; margin: 0 auto; }
.complexity { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.cx {
  flex: 1; min-width: 96px; display: flex; flex-direction: column; gap: 3px; align-items: center;
  padding: 16px 10px; border: 2.5px solid var(--ink-line); border-radius: 12px;
  background: #fff; cursor: pointer; transition: transform 0.15s, background 0.15s, color 0.15s;
  box-shadow: 2px 2px 0 var(--ink-line); font-family: var(--font);
}
.cx:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink-line); }
.cx.active { background: var(--accent); color: #fff; border-color: var(--ink-line); }
.cx-lvl { font-weight: 700; }
.cx-name { font-size: 0.85rem; opacity: 0.85; }
.cx-price { font-weight: 700; font-size: 1.05rem; }
@media (max-width: 860px) { .custom-flow { grid-template-columns: 1fr; gap: 30px; } }

/* ensure [hidden] wins over img{display:block} */
[hidden] { display: none !important; }
