/* KLOORA brand theme, mobile-first */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root {
  /* Soft pastel Gen-Z palette: blush pink / lilac / sage pastels as base,
     warm charcoal-plum for headings, nav/footer, and CTA contrast. */
  --blush: #F8E4EC;
  --blush-light: #FCEFF4;
  --lilac: #E9DFF7;
  --lilac-light: #F4EEFB;
  --sage: #DCEEDD;
  --sage-light: #EEF7EE;
  --plum: #3A2036;
  --plum-soft: #5A2A45;
  --white: #FFFFFF;
  --gradient: linear-gradient(135deg, #3A2036, #5A2A45);

  /* Legacy alias names, kept because a handful of call sites (admin,
     product.html inline styles) still reference the old brand tokens;
     all resolve into the pastel system above. */
  --navy: var(--plum);
  --royal: var(--plum-soft);
  --cyan: var(--sage);
  --offwhite: var(--blush-light);
  --charcoal: var(--plum);

  --accent: var(--plum-soft);
  --accent-soft: var(--sage);
  --accent-rgb: 58, 32, 54;
  --radius: 18px;
  --radius-sm: 10px;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --heading-weight: 600;
  --btn-radius: 999px;
  --card-radius: var(--radius);

  /* Per-category accents (small UI only: dots, swatch outline, badges) */
  --accent-women: #C9548A;
  --accent-men: #2B2230;
  --accent-unisex: #8B6BB8;
  --accent-kids: #3F9E7A;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 14px;
  --space-4: 20px;
  --space-5: 32px;
  --space-6: 48px;

  --shadow-sm: 0 1px 3px rgba(58, 32, 54, .07), 0 1px 2px rgba(58, 32, 54, .05);
  --shadow-md: 0 8px 24px rgba(58, 32, 54, .12);
  --shadow-lg: 0 18px 40px rgba(58, 32, 54, .18);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--blush-light);
  color: var(--plum);
  font-family: var(--font-body);
  line-height: 1.6;
  letter-spacing: .1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--heading-weight);
  margin: 0 0 .5em;
  color: var(--plum);
  line-height: 1.2;
  letter-spacing: -.01em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Navbar ---------- */
.site-header {
  background: var(--plum);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.site-header .logo img { height: 30px; }
.site-header nav { display: none; }
.site-header nav a { position: relative; padding: 4px 0; transition: color .15s ease; }
.site-header .cart-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--plum);
  background: var(--sage);
  padding: 6px 12px;
  border-radius: 999px;
  letter-spacing: .02em;
}
@media (min-width: 720px) {
  .site-header nav { display: flex; gap: 28px; font-size: 14px; font-weight: 600; }
  .site-header nav a:hover { color: var(--sage); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--btn-radius);
  border: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform .15s ease, box-shadow .2s ease, filter .15s ease, background .2s ease;
}
.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(var(--accent-rgb), .32);
}
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 10px 26px rgba(var(--accent-rgb), .4); transform: translateY(-1px); }
.btn-primary:active { transform: scale(.98) translateY(0); }
.btn-outline {
  background: transparent;
  color: var(--plum);
  border: 2px solid var(--plum);
}
.btn-outline:hover { background: var(--plum); color: var(--white); }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 26px; font-size: 17px; }

/* ---------- Hero (CSS/SVG graphic, no photography) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--plum);
  background-image:
    radial-gradient(circle at 12% 15%, rgba(233,223,247,.22), transparent 55%),
    radial-gradient(circle at 88% 10%, rgba(220,238,221,.18), transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(248,228,236,.16), transparent 60%);
  padding: 46px 20px 40px;
  text-align: center;
}
.hero-blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  opacity: .55;
}
.hero-blob.b1 { width: 220px; height: 220px; top: -60px; left: -50px; background: var(--blush); opacity: .35; }
.hero-blob.b2 { width: 180px; height: 180px; bottom: -70px; right: -40px; background: var(--lilac); opacity: .3; }
.hero-blob.b3 { width: 140px; height: 140px; top: 30%; right: 8%; background: var(--sage); opacity: .25; }
.hero-content { position: relative; z-index: 1; max-width: 480px; margin: 0 auto; }
.hero-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--plum);
  background: var(--sage-light);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.hero-content h1 {
  color: var(--white);
  font-size: 30px;
  margin-bottom: 10px;
}
.hero-content p {
  color: rgba(255,255,255,.82);
  font-size: 15px;
  margin-bottom: 22px;
}
.hero-cta-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hero-shape-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}
.hero-shape {
  width: 54px; height: 54px;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  box-shadow: var(--shadow-md);
}
.hero-shape.s1 { background: var(--blush); transform: rotate(-6deg); }
.hero-shape.s2 { background: var(--lilac); transform: translateY(-8px) rotate(4deg); }
.hero-shape.s3 { background: var(--sage); transform: rotate(7deg); }
.hero-shape.s4 { background: var(--white); transform: translateY(-4px) rotate(-4deg); }

/* ---------- Category tiles ---------- */
.category-tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: var(--space-5) 0;
}
.category-tile {
  background: var(--white);
  border-radius: var(--card-radius);
  padding: 26px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--plum);
  border: 1px solid rgba(58,32,54,.06);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.category-tile:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: rgba(90,42,69,.25); }
.category-tile .emoji { font-size: 30px; display: block; margin-bottom: 10px; }
.category-tile.cat-women { background: var(--blush-light); }
.category-tile.cat-men { background: var(--lilac-light); }
.category-tile.cat-unisex { background: var(--sage-light); }
.category-tile.cat-kids { background: var(--blush-light); }
.category-tile .cat-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-top: 8px; }
.category-tile.cat-women .cat-dot { background: var(--accent-women); }
.category-tile.cat-men .cat-dot { background: var(--accent-men); }
.category-tile.cat-unisex .cat-dot { background: var(--accent-unisex); }
.category-tile.cat-kids .cat-dot { background: var(--accent-kids); }
@media (min-width: 640px) {
  .category-tiles { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Section heading ---------- */
.section { padding: var(--space-5) 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: var(--space-4); }
.section-title h2 { margin: 0; font-size: 22px; }
.section-title a { font-size: 13px; color: var(--plum-soft); font-weight: 700; }

/* ---------- Product grid / cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(58,32,54,.05);
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s ease, transform .25s ease;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.product-card .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--blush-light); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 12px 14px 16px; }
.product-card .title { font-size: 13px; font-weight: 600; color: var(--plum); margin-bottom: 8px; min-height: 34px; }
.product-card .price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price-now { font-weight: 800; color: var(--plum); font-size: 15px; }
.price-was { text-decoration: line-through; color: #94a3b8; font-size: 12px; }
.badge-off {
  background: var(--sage);
  color: var(--plum);
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

/* ---------- Empty state ---------- */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-6) var(--space-4);
  background: var(--white);
  border-radius: var(--radius);
  border: 1px dashed rgba(58,32,54,.18);
  box-shadow: var(--shadow-sm);
}
.empty-state .empty-icon {
  width: 64px; height: 64px; margin: 0 auto var(--space-3);
  border-radius: 50%;
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.empty-state h3 { margin-bottom: 6px; font-size: 19px; }
.empty-state p { color: #64748b; font-size: 14px; max-width: 320px; margin: 0 auto; }

/* ---------- Trust bar ---------- */
.trust-bar {
  background: var(--white);
  border-top: 1px solid rgba(58,32,54,.08);
  border-bottom: 1px solid rgba(58,32,54,.08);
}
.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 22px 16px;
}
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color: var(--plum); }
.trust-item .icon {
  font-size: 17px;
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--blush-light);
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 640px) { .trust-bar .container { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--plum);
  background-image: radial-gradient(circle at 85% 0%, rgba(90,42,69,.35), transparent 55%);
  color: rgba(255,255,255,.8);
  padding: 40px 0 90px;
  margin-top: var(--space-5);
  text-align: center;
}
.site-footer img { height: 28px; margin: 0 auto 14px; }
.site-footer p { font-size: 12px; color: rgba(255,255,255,.55); }

/* =========================================================
   PRODUCT PAGE
   ========================================================= */
.product-page { padding-bottom: 90px; }

.gallery { position: relative; background: var(--white); }
.gallery-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  perspective: 900px;
}
.gallery-slide img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .2s ease-out;
  will-change: transform;
}
.gallery-dots {
  position: absolute;
  bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.gallery-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(58,32,54,.25); }
.gallery-dots span.active { background: var(--plum-soft); width: 16px; border-radius: 4px; }

/* Thumbnail strip under the primary gallery image */
.gallery-thumbs { display: flex; gap: 8px; padding: 10px 16px 4px; overflow-x: auto; background: var(--white); }
.gallery-thumbs .thumb-btn {
  width: 56px; height: 56px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  border: 2px solid transparent;
  background: var(--blush-light);
  padding: 0; cursor: pointer;
}
.gallery-thumbs .thumb-btn.active { border-color: var(--plum-soft); }
.gallery-thumbs .thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Intentional empty gallery state, styled rather than a blank box, for
   products with no photos uploaded yet */
.gallery-empty {
  aspect-ratio: 1 / 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  background:
    radial-gradient(circle at 20% 20%, var(--blush) 0%, transparent 45%),
    radial-gradient(circle at 80% 30%, var(--lilac) 0%, transparent 45%),
    radial-gradient(circle at 50% 85%, var(--sage) 0%, transparent 50%),
    var(--blush-light);
}
.gallery-empty .gallery-empty-icon {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.gallery-empty p { color: var(--plum-soft); font-size: 13px; font-weight: 700; margin: 0; }

.product-info { padding: 18px 16px 0; }
.product-title { font-size: 22px; margin-bottom: 6px; }
.product-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.product-price-now { font-size: 26px; font-weight: 800; color: var(--plum); }
.product-price-was { font-size: 15px; text-decoration: line-through; color: #94a3b8; }
.product-off { background: var(--sage); color: var(--plum); font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.product-tags { font-size: 12px; color: #64748b; margin-bottom: 14px; }

.color-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 18px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--white);
  outline: 1px solid rgba(58,32,54,.2);
  cursor: pointer;
  position: relative;
}
.swatch.active { outline: 2px solid var(--plum-soft); outline-offset: 2px; }
.swatch-label { font-size: 12px; color: var(--plum); margin-top: 4px; text-align: center; }
.color-swatch-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }

.cta-row { display: flex; gap: 10px; margin: 16px 0; }
.cta-row .btn { flex: 1; }

.benefit-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.benefit-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: var(--white); padding: 10px 12px; border-radius: 10px; box-shadow: 0 1px 6px rgba(58,32,54,.06); }
.benefit-list .icon { font-size: 18px; flex-shrink: 0; }

.trust-badges { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
.trust-badge { font-size: 11px; font-weight: 700; color: var(--plum); background: var(--blush-light); border: 1px solid rgba(58,32,54,.1); padding: 6px 10px; border-radius: 999px; }

.accordion { border-top: 1px solid rgba(58,32,54,.1); }
.accordion-item { border-bottom: 1px solid rgba(58,32,54,.1); }
.accordion-item summary {
  padding: 14px 2px;
  font-weight: 700;
  color: var(--plum);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::after { content: '+'; font-size: 20px; color: var(--plum-soft); }
.accordion-item[open] summary::after { content: '\2212'; }
.accordion-item .content { padding: 0 2px 16px; font-size: 14px; color: var(--plum); }
.accordion-item .content ul { padding-left: 18px; }

.mid-cta {
  margin: 28px 16px;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--gradient);
  color: var(--white);
  text-align: center;
}
.mid-cta h3 { color: var(--white); margin-bottom: 6px; }
.mid-cta p { color: rgba(255,255,255,.9); font-size: 13px; margin-bottom: 14px; }
.mid-cta .btn { background: var(--white); color: var(--plum); }

/* Bottom trust / reviews block, ahead of the final CTA */
.trust-block {
  margin: 8px 16px 28px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--lilac-light);
  border: 1px solid rgba(58,32,54,.06);
}
.trust-block h3 { font-size: 16px; margin-bottom: 12px; }
.trust-block .trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.trust-block .trust-grid-item { text-align: center; }
.trust-block .trust-grid-item .icon { font-size: 22px; display: block; margin-bottom: 6px; }
.trust-block .trust-grid-item span { font-size: 11px; font-weight: 700; color: var(--plum); display: block; }
.trust-block .btn { width: 100%; }

/* Sticky bottom bar */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--white);
  border-top: 1px solid rgba(58,32,54,.1);
  box-shadow: 0 -4px 16px rgba(58,32,54,.1);
  padding: 10px 12px;
  display: flex; align-items: center; gap: 10px;
  z-index: 50;
}
.qty-stepper { display: flex; align-items: center; border: 2px solid var(--plum); border-radius: 999px; overflow: hidden; flex-shrink: 0; }
.qty-stepper button { background: none; border: none; width: 34px; height: 36px; font-size: 16px; font-weight: 700; color: var(--plum); }
.qty-stepper span { width: 26px; text-align: center; font-weight: 700; }
.sticky-cta .btn { flex: 1; }

/* Checkout modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(58,32,54,.55);
  display: none; align-items: flex-end; justify-content: center; z-index: 60;
}
.modal-overlay.open { display: flex; }
.modal-sheet {
  background: var(--white);
  width: 100%; max-width: 480px;
  border-radius: 18px 18px 0 0;
  padding: 20px;
  max-height: 88vh;
  overflow-y: auto;
}
@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: 18px; }
}
.modal-sheet h3 { margin-bottom: 4px; }
.modal-sheet .close-btn { float: right; background: none; border: none; font-size: 22px; color: var(--plum); }
.form-field { margin-bottom: 12px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--plum); margin-bottom: 4px; }
.form-field input, .form-field textarea, .form-field select {
  width: 100%; padding: 11px 12px; border-radius: 10px;
  border: 1px solid rgba(58,32,54,.2); font-size: 15px; font-family: inherit; background: var(--blush-light);
}
.form-field textarea { resize: vertical; min-height: 60px; }
.order-summary { background: var(--blush-light); border-radius: 10px; padding: 12px; margin-bottom: 14px; font-size: 14px; }
.confirm-screen { text-align: center; padding: 20px 0; }
.confirm-screen .big-check { font-size: 48px; margin-bottom: 10px; }
.error-text { color: #c62828; font-size: 13px; margin-top: 4px; }

/* =========================================================
   THEME VARIANTS (set on <body class="theme-...">)
   ========================================================= */
body.theme-women {
  --accent: var(--accent-women);
  --accent-rgb: 201, 84, 138;
  --font-heading: 'Fraunces', Georgia, serif;
  --heading-weight: 600;
  --card-radius: 22px;
  --btn-radius: 999px;
}
body.theme-women .btn-primary { background: var(--gradient); }
body.theme-women .product-title { font-style: italic; }

body.theme-men {
  --accent: var(--accent-men);
  --accent-rgb: 43, 34, 48;
  --font-heading: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --heading-weight: 800;
  --card-radius: 6px;
  --btn-radius: 6px;
}
body.theme-men .btn-primary { background: var(--plum); box-shadow: 0 8px 20px rgba(58,32,54,.4); }
body.theme-men h1, body.theme-men h2, body.theme-men h3 { text-transform: uppercase; letter-spacing: .04em; }
body.theme-men .swatch { border-radius: 6px; }

body.theme-unisex {
  --accent: var(--accent-unisex);
  --accent-rgb: 139, 107, 184;
  --card-radius: 14px;
  --btn-radius: 10px;
}

body.theme-kids {
  --accent: var(--accent-kids);
  --accent-rgb: 63, 158, 122;
  --font-heading: 'Fraunces', 'Manrope', sans-serif;
  --heading-weight: 700;
  --card-radius: 28px;
  --btn-radius: 999px;
}
body.theme-kids .btn-primary { background: var(--gradient); font-size: 17px; padding: 16px 24px; }
body.theme-kids .swatch { width: 40px; height: 40px; }
body.theme-kids .product-title { font-size: 24px; }

/* Per-product theme accent override (from admin "Page Theme Color").
   product.html/preview.html set --accent and --accent-rgb inline on
   <body> from the product's theme_color; everything below reads --accent. */
.product-price-now,
.price-now { color: var(--plum); }
.product-off,
.badge-off { background: var(--accent-soft, var(--sage)); }
.gallery-dots span.active { background: var(--accent); }
.swatch.active { outline-color: var(--accent); }

/* 3D tilt gallery */
.gallery.tilt-3d .gallery-slide { transform-style: preserve-3d; }
