:root {
  --color-1: #17141a;
  --color-2: #ffffff;
  --color-3: #efe9ec;
  --color-4: #c9b2c1;
  --color-5: #a37797;   /* brand mauve — still the anchor color, just louder now */
  --color-6: #8a8590;
  --color-7: #5c5763;
  --color-8: #17141a;
  --color-9: #2c2833;
  --color-10: #e3bcda;
  --color-5-text: #6e4d67;
  --focus-ring: #2f6fed;

  --grad-hero: linear-gradient(135deg, #a37797 0%, #c98fc4 35%, #8fb3e8 75%, #a3e0d8 100%);
  --grad-btn: linear-gradient(135deg, #a37797 0%, #7a5a9c 100%);
  --grad-btn-hover: linear-gradient(135deg, #b98aab 0%, #8f6bb3 100%);
  --grad-badge: linear-gradient(135deg, #e3bcda, #a37797);
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glow-mauve: 0 8px 32px rgba(163, 119, 151, 0.35);
  --glow-mauve-lg: 0 20px 60px rgba(163, 119, 151, 0.45);

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --shadow-xs: 0 2px 8px rgba(23, 20, 26, 0.06);
  --shadow-sm: 0 8px 24px rgba(23, 20, 26, 0.10);
  --shadow-md: 0 16px 40px rgba(23, 20, 26, 0.14);
  --shadow-lift: 0 24px 60px rgba(23, 20, 26, 0.18);
  --ease: 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
  /* Disables the default blue/gray tap-highlight rectangle mobile
     browsers draw on any tapped element (links, buttons, labels...).
     This is purely cosmetic touch feedback, not an accessibility
     feature — the real keyboard accessibility indicator is the
     :focus-visible outline defined below, which is untouched by this
     and still shows up for keyboard/switch-device navigation. */
  -webkit-tap-highlight-color: transparent;
}
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--color-1);
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(circle at 8% 0%, rgba(163,119,151,0.14), transparent 45%),
    radial-gradient(circle at 95% 10%, rgba(143,179,232,0.14), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(227,188,218,0.16), transparent 55%),
    #fffcfe;
  background-attachment: fixed;
}

h1, h2, h3, .brand-word {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--color-1);
}

a { color: var(--color-5-text); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-position: 0 100%; background-repeat: no-repeat; background-size: 0% 2px; transition: background-size var(--ease), color var(--ease); }
a:hover { background-size: 100% 2px; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--color-1); color: var(--color-2);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 12px; top: 12px; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Flash messages ---------- */
.flash { padding: 14px 22px; margin: 18px 0; border: 1px solid; font-size: 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-xs); backdrop-filter: blur(6px); }
.flash-success { background: rgba(238,246,238,0.85); border-color: #2f7a3d; color: #204f2a; }
.flash-error { background: rgba(251,235,234,0.85); border-color: #b3261e; color: #7c1b16; }

/* ---------- Top bar / header ---------- */
.topbar { background: linear-gradient(90deg, #17141a, #2c2833); color: var(--color-3); font-size: 12px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { color: var(--color-3); text-decoration: none; background: none; }
.topbar a:hover, .topbar a:focus-visible { color: var(--color-10); }

.sticky-top-group {
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header {
  background: var(--glass-bg);
  backdrop-filter: saturate(200%) blur(18px);
  -webkit-backdrop-filter: saturate(200%) blur(18px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 24px rgba(23,20,26,0.06);
}
.header-row { display: flex; align-items: center; gap: 24px; height: auto; padding: 16px 0; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; text-decoration: none; background: none; }
.logo img { height: 50px; width: 50px; object-fit: contain; padding-left: 5px; transition: transform var(--ease); filter: drop-shadow(0 4px 10px rgba(163,119,151,0.35)); }
.logo:hover img { transform: rotate(-6deg) scale(1.08); }
.logo .brand-word {
  display: block; font-size: 23px; line-height: 1.1;
  background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo .brand-sub { font-size: 9px; letter-spacing: 0.18em; color: var(--color-5-text); text-transform: uppercase; font-family: 'Jost', sans-serif; }

.search-form {
  flex: 1; min-width: 220px; max-width: 520px; display: flex;
  border: 1.5px solid var(--glass-border); border-radius: var(--radius-pill); overflow: hidden;
  transition: border-color var(--ease), box-shadow var(--ease);
  background: rgba(255,255,255,0.7); box-shadow: var(--shadow-xs);
}
.search-form:focus-within { border-color: var(--color-5); box-shadow: var(--glow-mauve); }
.search-form input { flex: 1; min-width: 0; border: none; padding: 12px 20px; font: inherit; font-size: 14px; background: transparent; }
.search-form input:focus-visible { outline: none; }
.search-form button {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; background: var(--grad-btn); color: var(--color-2); padding: 0 22px; cursor: pointer;
  font-size: 14px; white-space: nowrap; transition: filter var(--ease);
}
.search-form button:hover { filter: brightness(1.12); }

.header-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.header-actions a, .header-actions button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--color-7); background: none; border: none; cursor: pointer; font-family: inherit; text-decoration: none; padding: 0; transition: color var(--ease), transform var(--ease); }
.header-actions a:hover, .header-actions button:hover { color: var(--color-5-text); transform: translateY(-2px) scale(1.05); }
.header-actions .icon { font-size: 20px; }

.cat-nav { background: linear-gradient(90deg, #17141a, #362f42, #17141a); }
.cat-nav ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0 24px; height: 48px; align-items: center; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 1240px; margin: 0 auto; }
.cat-nav a { color: var(--color-3); font-size: 13px; letter-spacing: 0.03em; text-decoration: none; white-space: nowrap; background: none; position: relative; }
.cat-nav a:hover, .cat-nav a[aria-current="page"], .cat-nav a:focus-visible { color: var(--color-10); text-shadow: 0 0 12px rgba(227,188,218,0.6); }

.breadcrumb { font-size: 13px; color: var(--color-7); padding: 20px 0 0; }
.breadcrumb a { color: var(--color-5-text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 30px; background: var(--grad-btn); color: var(--color-2);
  font-size: 14px; font-weight: 500; text-align: center; cursor: pointer; border: none;
  text-decoration: none; font-family: inherit; border-radius: var(--radius-pill);
  box-shadow: var(--glow-mauve); transition: transform var(--ease), box-shadow var(--ease), filter var(--ease);
}
.btn:hover { background: var(--grad-btn-hover); transform: translateY(-3px) scale(1.02); box-shadow: var(--glow-mauve-lg); }
.btn:active { transform: translateY(-1px) scale(0.99); }
.btn-outline { background: rgba(255,255,255,0.6); backdrop-filter: blur(8px); color: var(--color-1); border: 1.5px solid var(--color-5); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--color-5); color: var(--color-2); box-shadow: var(--glow-mauve); }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 15px; }
.btn-danger-text { background: none; border: none; color: #a3261e; text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; font-family: inherit; }

/* ---------- Promo banner (hero) ---------- */
.promo-banner {
  position: relative; overflow: hidden;
  margin: 28px 0; background: var(--grad-hero);
  border: none; border-radius: var(--radius-lg);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 56px 48px; gap: 24px; box-shadow: var(--shadow-lift);
}
.promo-banner::before, .promo-banner::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(50px); opacity: 0.55;
  animation: float-blob 9s ease-in-out infinite;
}
.promo-banner::before { width: 260px; height: 260px; background: #fff; top: -100px; left: -60px; }
.promo-banner::after { width: 220px; height: 220px; background: #a3e0d8; bottom: -90px; right: 8%; animation-delay: -4s; }
.promo-banner > div, .promo-banner > img { position: relative; z-index: 1; }
.promo-banner .eyebrow { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.95); margin-bottom: 10px; display: block; font-weight: 600; }
.promo-banner h1 { font-size: 36px; margin-bottom: 12px; color: #fff; text-shadow: 0 2px 20px rgba(23,20,26,0.25); }
.promo-banner p { color: rgba(255,255,255,0.92); font-size: 15px; margin: 0 0 20px; }
.promo-banner img { width: 230px; height: 140px; object-fit: cover; flex-shrink: 0; border-radius: var(--radius-md); box-shadow: var(--shadow-md); border: 3px solid rgba(255,255,255,0.6); }

@keyframes float-blob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(14px, -18px) scale(1.08); }
}

/* ---------- Sections ---------- */
.section { margin: 64px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 8px; }
.section-head h2 { font-size: 26px; }
.view-all { font-size: 13px; color: var(--color-5-text); font-weight: 600; }

/* ---------- Category tiles ---------- */
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; list-style: none; margin: 0; padding: 0; }
.cat-tile {
  position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-md);
  display: block; text-decoration: none; box-shadow: var(--shadow-sm); border: 1px solid rgba(255,255,255,0.5);
  transition: transform var(--ease), box-shadow var(--ease);
}
.cat-tile:hover { transform: translateY(-6px) scale(1.02); box-shadow: var(--glow-mauve-lg); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 450ms var(--ease); }
.cat-tile:hover img { transform: scale(1.1) rotate(-1deg); }
.cat-tile span {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(23,20,26,0.8), rgba(23,20,26,0));
  color: var(--color-2); font-size: 13px; font-weight: 500; text-align: center; padding: 28px 4px 12px;
}

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; margin: 0; padding: 0; }
.product-card {
  border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.72);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}
.product-card:hover { transform: translateY(-8px) scale(1.015); box-shadow: var(--glow-mauve-lg); }
.product-card a.card-link { text-decoration: none; color: inherit; display: block; background: none; }
.product-card .thumb { aspect-ratio: 1/1; overflow: hidden; position: relative; background: var(--color-3); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 450ms var(--ease); }
.product-card:hover .thumb img { transform: scale(1.08); }
.badge { position: absolute; top: 12px; left: 12px; background: var(--grad-badge); color: var(--color-2); font-size: 11px; font-weight: 600; padding: 5px 12px; border-radius: var(--radius-pill); box-shadow: 0 4px 14px rgba(163,119,151,0.4); }
.product-info { padding: 16px 18px 20px; }
.product-cat { font-size: 11px; color: var(--color-7); text-transform: uppercase; letter-spacing: 0.05em; }
.product-name { font-size: 15px; margin: 6px 0 10px; color: var(--color-1); font-weight: 600; line-height: 1.35; }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price { font-size: 16px; font-weight: 700; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.price-old { font-size: 13px; color: var(--color-7); text-decoration: line-through; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--color-7); border: 1.5px dashed var(--color-4); border-radius: var(--radius-md); background: rgba(255,255,255,0.5); }

/* ---------- Trust strip ---------- */
.trust-strip { background: linear-gradient(135deg, rgba(163,119,151,0.12), rgba(143,179,232,0.12)); padding: 44px 0; margin-top: 70px; }
.trust-strip ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.trust-item .icon {
  font-size: 22px; margin: 0 auto 12px; width: 56px; height: 56px; border-radius: 50%;
  background: var(--grad-btn); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--glow-mauve);
}
.trust-item .t { font-size: 14px; font-weight: 600; }
.trust-item .s { font-size: 12px; color: var(--color-7); }

/* ---------- Footer ---------- */
.site-footer { background: linear-gradient(160deg, #17141a 0%, #2c2833 55%, #4a3450 100%); color: var(--color-3); margin-top: 70px; padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 34px; }
.footer-grid h2 { font-family: 'Jost', sans-serif; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-10); margin-bottom: 16px; font-weight: 600; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-grid a { font-size: 13px; color: var(--color-3); text-decoration: none; background: none; }
.footer-grid a:hover { color: var(--color-10); }
.footer-grid p { font-size: 13px; color: var(--color-3); margin: 0 0 9px; }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo img { height: 38px; width: 38px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(227,188,218,0.4)); }
.footer-logo .brand-word { color: var(--color-2); font-size: 19px; background: none; -webkit-text-fill-color: initial; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 16px 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 12px; color: var(--color-6); }

/* ---------- Forms ---------- */
.form-page { max-width: 480px; margin: 48px auto; background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow-md); border: 1px solid rgba(255,255,255,0.6); }
.form-page.wide { max-width: 720px; }
fieldset { border: 1px solid var(--color-3); border-radius: var(--radius-md); padding: 20px; margin: 0 0 22px; background: rgba(255,255,255,0.4); }
legend { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-7); padding: 0 8px; font-weight: 600; }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: 14px; margin-bottom: 7px; color: var(--color-1); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--color-4); font: inherit; font-size: 15px;
  background: rgba(255,255,255,0.8); color: var(--color-1); border-radius: var(--radius-sm);
  transition: border-color var(--ease), box-shadow var(--ease);
}
/* Checkboxes/radios must NOT inherit the text-input sizing above (that
   was the cause of the misaligned, oversized checkboxes) — they get
   their own compact, fixed-size treatment instead. */
.field input[type="checkbox"], .field input[type="radio"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  border-radius: 5px;
  accent-color: var(--color-5);
  vertical-align: middle;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  margin-bottom: 12px;
  cursor: pointer;
}
.checkbox-row:last-child { margin-bottom: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-5); box-shadow: var(--glow-mauve); }
.field input:invalid[data-touched], .field.has-error input, .field.has-error select { border-color: #b3261e; }
.field .error-text { color: #a3261e; font-size: 13px; margin-top: 7px; }
.field .hint { color: var(--color-7); font-size: 13px; margin-top: 7px; }
.form-footer-note { font-size: 14px; color: var(--color-7); margin-top: 20px; text-align: center; }

/* ---------- Shop layout ---------- */
.shop-content { margin: 28px 0 52px; }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; margin: 28px 0 52px; align-items: start; }
.filters { border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); position: sticky; top: 110px; }
.filters h2 { font-size: 15px; margin-bottom: 16px; }
.filter-group { margin-bottom: 20px; }
.filter-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-7); margin-bottom: 10px; font-weight: 600; }
.filter-group ul { list-style: none; margin: 0; padding: 0; }
.filter-group li { margin-bottom: 4px; }
.filter-group a { font-size: 14px; text-decoration: none; color: var(--color-1); display: block; padding: 8px 12px; border-radius: var(--radius-pill); transition: background var(--ease), color var(--ease); background-image: none; }
.filter-group a:hover { background: rgba(163,119,151,0.12); }
.filter-group a[aria-current="true"] { color: #fff; font-weight: 600; background: var(--grad-btn); }
.shop-toolbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 14px; color: var(--color-7); }
.shop-toolbar .sort-form { display: flex; gap: 10px; align-items: center; }
.shop-toolbar select { border: 1.5px solid var(--color-4); border-radius: var(--radius-pill); padding: 10px 16px; font: inherit; font-size: 13px; background: rgba(255,255,255,0.8); }
.shop-toolbar .sort-submit { padding: 10px 20px; font-size: 13px; }

/* ---------- Product page ---------- */
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; margin: 28px 0 60px; }

.gallery { position: relative; }
.gallery input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.gallery figure { display: none; margin: 0; border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.6); aspect-ratio: 1/1; overflow: hidden; box-shadow: var(--shadow-md); }
.gallery figure img { width: 100%; height: 100%; object-fit: cover; }
.gallery input:nth-of-type(1):checked ~ figure:nth-of-type(1),
.gallery input:nth-of-type(2):checked ~ figure:nth-of-type(2),
.gallery input:nth-of-type(3):checked ~ figure:nth-of-type(3),
.gallery input:nth-of-type(4):checked ~ figure:nth-of-type(4),
.gallery input:nth-of-type(5):checked ~ figure:nth-of-type(5),
.gallery input:nth-of-type(6):checked ~ figure:nth-of-type(6),
.gallery input:nth-of-type(7):checked ~ figure:nth-of-type(7) { display: block; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs label { width: 76px; height: 76px; border-radius: var(--radius-sm); border: 1px solid var(--color-3); overflow: hidden; cursor: pointer; display: block; transition: border-color var(--ease), transform var(--ease); }
.gallery-thumbs label:hover { transform: translateY(-2px); }
.gallery-thumbs label img { width: 100%; height: 100%; object-fit: cover; }
.gallery input:nth-of-type(1):checked ~ .gallery-thumbs label:nth-of-type(1),
.gallery input:nth-of-type(2):checked ~ .gallery-thumbs label:nth-of-type(2),
.gallery input:nth-of-type(3):checked ~ .gallery-thumbs label:nth-of-type(3),
.gallery input:nth-of-type(4):checked ~ .gallery-thumbs label:nth-of-type(4),
.gallery input:nth-of-type(5):checked ~ .gallery-thumbs label:nth-of-type(5),
.gallery input:nth-of-type(6):checked ~ .gallery-thumbs label:nth-of-type(6),
.gallery input:nth-of-type(7):checked ~ .gallery-thumbs label:nth-of-type(7) { border-color: var(--color-5); border-width: 2px; box-shadow: var(--glow-mauve); }
.gallery input:focus-visible ~ .gallery-thumbs label { outline: none; }

/* Prev/next arrows — cycle through images by clicking, no JavaScript.
   Each arrow is a <label> targeting a specific image's radio input (the
   "next"/"previous" index, wrapping around, is computed server-side in
   the view since it depends on how many images this particular product
   actually has). Every arrow for every index lives in the markup at
   once; only the pair belonging to the currently-checked image is made
   visible, via the same :checked sibling-selector pattern as the
   figures/thumbnails above. */
.gallery-arrows label {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(23, 20, 26, 0.55);
  backdrop-filter: blur(4px);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background var(--ease), transform var(--ease);
}
.gallery-arrows label:hover { background: rgba(23, 20, 26, 0.8); }
.gallery-arrows label:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.gallery-arrows .gallery-prev { left: 14px; }
.gallery-arrows .gallery-next { right: 14px; }
.gallery input:nth-of-type(1):checked ~ .gallery-arrows .gallery-prev-1,
.gallery input:nth-of-type(1):checked ~ .gallery-arrows .gallery-next-1,
.gallery input:nth-of-type(2):checked ~ .gallery-arrows .gallery-prev-2,
.gallery input:nth-of-type(2):checked ~ .gallery-arrows .gallery-next-2,
.gallery input:nth-of-type(3):checked ~ .gallery-arrows .gallery-prev-3,
.gallery input:nth-of-type(3):checked ~ .gallery-arrows .gallery-next-3,
.gallery input:nth-of-type(4):checked ~ .gallery-arrows .gallery-prev-4,
.gallery input:nth-of-type(4):checked ~ .gallery-arrows .gallery-next-4,
.gallery input:nth-of-type(5):checked ~ .gallery-arrows .gallery-prev-5,
.gallery input:nth-of-type(5):checked ~ .gallery-arrows .gallery-next-5,
.gallery input:nth-of-type(6):checked ~ .gallery-arrows .gallery-prev-6,
.gallery input:nth-of-type(6):checked ~ .gallery-arrows .gallery-next-6,
.gallery input:nth-of-type(7):checked ~ .gallery-arrows .gallery-prev-7,
.gallery input:nth-of-type(7):checked ~ .gallery-arrows .gallery-next-7 { display: flex; }

@media (max-width: 600px) {
  .gallery-arrows label { width: 38px; height: 38px; font-size: 17px; }
}

.pd-cat { font-size: 12px; color: var(--color-5-text); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.pd-title { font-size: 32px; margin: 8px 0 14px; line-height: 1.2; }
.pd-price-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.pd-price { font-size: 27px; font-weight: 700; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Per-size pricing: one price span per size is rendered (see product.ejs),
   all hidden by default, and :has() reveals only the one matching
   whichever size radio is currently checked anywhere in the info column
   — this works regardless of DOM order between the price row and the
   size selector below it, unlike a plain ~ sibling selector. Capped at
   12 to match the admin form's maximum size count (csvListField(12)). */
.product-info-col .pd-price { display: none; }
.product-info-col:has(#size-0:checked) .price-for-size-0,
.product-info-col:has(#size-1:checked) .price-for-size-1,
.product-info-col:has(#size-2:checked) .price-for-size-2,
.product-info-col:has(#size-3:checked) .price-for-size-3,
.product-info-col:has(#size-4:checked) .price-for-size-4,
.product-info-col:has(#size-5:checked) .price-for-size-5,
.product-info-col:has(#size-6:checked) .price-for-size-6,
.product-info-col:has(#size-7:checked) .price-for-size-7,
.product-info-col:has(#size-8:checked) .price-for-size-8,
.product-info-col:has(#size-9:checked) .price-for-size-9,
.product-info-col:has(#size-10:checked) .price-for-size-10,
.product-info-col:has(#size-11:checked) .price-for-size-11 { display: inline; }
.pd-price-old { font-size: 15px; color: var(--color-7); text-decoration: line-through; }
.pd-desc { color: var(--color-7); font-size: 15px; margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--color-3); }
.opt-block { margin-bottom: 22px; }
.opt-block > legend, .opt-block .opt-label { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-9); margin-bottom: 11px; font-weight: 600; }
.radio-pill-group { display: flex; gap: 10px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.radio-pill-group input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pill-group label { display: inline-block; padding: 11px 20px; border: 1.5px solid var(--color-4); border-radius: var(--radius-pill); font-size: 13px; cursor: pointer; transition: all var(--ease); background: rgba(255,255,255,0.6); }
.radio-pill-group label:hover { border-color: var(--color-5); transform: translateY(-2px); }
.radio-pill-group input:checked + label { background: var(--grad-btn); color: #fff; border-color: transparent; box-shadow: var(--glow-mauve); }
.radio-pill-group input:focus-visible + label { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.qty-field { display: flex; align-items: center; gap: 10px; }
.qty-field input[type="number"] { width: 90px; padding: 12px; border: 1.5px solid var(--color-4); border-radius: var(--radius-sm); font: inherit; font-size: 15px; }
.add-cart-row { margin: 26px 0 18px; }
.pd-meta { font-size: 13px; color: var(--color-7); list-style: none; margin: 0; padding: 0; }
.pd-meta li { margin-bottom: 7px; }
.specs-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.specs-table th, .specs-table td { padding: 11px 0; border-bottom: 1px solid var(--color-3); text-align: left; }
.specs-table th { color: var(--color-7); width: 220px; font-weight: 500; }

/* ---------- Cart ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; margin: 28px 0 60px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; font-size: 12px; text-transform: uppercase; color: var(--color-7); border-bottom: 1px solid var(--color-3); padding-bottom: 12px; font-weight: 600; }
.cart-table td { padding: 20px 10px 20px 0; border-bottom: 1px solid var(--color-3); vertical-align: middle; }
.cart-item-info { display: flex; gap: 16px; align-items: center; }
.cart-item-info img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-3); box-shadow: var(--shadow-xs); }
.cart-item-info .name { font-size: 14px; margin-bottom: 4px; font-weight: 600; }
.cart-item-info .name a { color: var(--color-1); text-decoration: none; background: none; }
.cart-item-info .variant { font-size: 12px; color: var(--color-7); }
.cart-qty-input { width: 68px; padding: 9px; border: 1.5px solid var(--color-4); border-radius: var(--radius-sm); font: inherit; }
.summary-box { border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.65); backdrop-filter: blur(10px); border-radius: var(--radius-md); padding: 26px; box-shadow: var(--shadow-sm); }
.summary-box h2 { font-size: 17px; margin-bottom: 18px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 11px; color: var(--color-7); }
.summary-row.total { color: var(--color-1); font-size: 18px; font-weight: 700; border-top: 1px solid var(--color-3); padding-top: 13px; margin-top: 13px; }
.continue-shopping { display: block; margin-top: 18px; font-size: 13px; }

.order-summary-list { list-style: none; margin: 0 0 20px; padding: 0; border: 1px solid var(--color-3); border-radius: var(--radius-md); overflow: hidden; }
.order-summary-list li { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid var(--color-3); font-size: 14px; }
.order-summary-list li:last-child { border-bottom: none; }

.confirmation-box { max-width: 640px; margin: 56px auto; text-align: center; background: rgba(255,255,255,0.7); backdrop-filter: blur(10px); border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow-md); }
.confirmation-box .order-number { font-size: 27px; font-weight: 700; margin: 14px 0 26px; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }

table.orders-table { width: 100%; border-collapse: collapse; margin-top: 22px; }
table.orders-table th, table.orders-table td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--color-3); font-size: 14px; }

@media (max-width: 900px) {
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-layout, .product-layout, .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .trust-strip ul { grid-template-columns: 1fr 1fr; }
  .cart-table thead { display: none; }
  .cart-table, .cart-table tbody, .cart-table tr, .cart-table td { display: block; width: 100%; }
  .cart-table tr { padding: 14px 0; }
  .filters { position: static; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .admin-form-layout { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }

  .promo-banner { padding: 36px 28px; }
  .promo-banner h1 { font-size: 28px; }
  .section-head h2 { font-size: 22px; }
  .pd-title { font-size: 26px; }
}

/* ---------- Phone-specific refinements ---------- */
@media (max-width: 600px) {
  .container { padding: 0 28px; }

  /* Two clean rows instead of one cramped, wrapping one: logo + actions
     on top, full-width search bar below. */
  .header-row { gap: 12px; padding: 12px 0; }
  .logo { order: 1; }
  .header-actions { order: 2; }
  .search-form { order: 3; flex-basis: 100%; max-width: 100%; min-width: 0; }

  .logo img { height: 38px; width: 38px; }
  .logo .brand-word { font-size: 18px; }
  .logo .brand-sub { display: none; }

  .header-actions { gap: 14px; }
  .header-actions .action-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .header-actions .icon { font-size: 21px; }

  .search-form button .btn-search-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
  }
  .search-form button { padding: 0 18px; }
  .search-form input { padding: 12px 16px; }

  .cat-nav ul { gap: 18px; padding: 0 16px; height: 44px; }
  .cat-nav a { font-size: 12.5px; }

  .promo-banner { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
  .promo-banner img { width: 100%; height: 160px; }
  .promo-banner h1 { font-size: 24px; }

  .section { margin: 44px 0; }
  .section-head h2 { font-size: 20px; }
  .product-grid, .cat-tiles { gap: 14px; }
  .product-info { padding: 12px 14px 14px; }

  .pd-title { font-size: 23px; }
  .confirmation-box { padding: 28px 20px; }
  .form-page { padding: 24px; margin: 32px auto; }

  .admin-stats { grid-template-columns: 1fr 1fr; gap: 12px; }
  .admin-stat-value { font-size: 26px; }
  .back-to-top { right: 16px; bottom: 16px; width: 46px; height: 46px; font-size: 18px; }
}


/* ---------- Admin ---------- */
.admin-nav { background: linear-gradient(90deg, #2c2833, #4a3450); }
.admin-nav-inner { display: flex; align-items: center; gap: 22px; height: 46px; flex-wrap: wrap; }
.admin-nav a { color: var(--color-3); font-size: 13px; text-decoration: none; background: none; transition: color var(--ease); }
.admin-nav a:hover { color: var(--color-10); }
.admin-nav-brand { font-weight: 700; color: var(--color-2) !important; }
.admin-nav-exit { margin-left: auto; }

.admin-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.admin-stat-card { border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.65); backdrop-filter: blur(10px); border-radius: var(--radius-md); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); transition: box-shadow var(--ease), transform var(--ease); }
.admin-stat-card:hover { box-shadow: var(--glow-mauve); transform: translateY(-4px); }
.admin-stat-value { display: block; font-size: 32px; font-weight: 700; font-family: 'Cormorant Garamond', serif; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.admin-stat-label { display: block; font-size: 13px; color: var(--color-7); margin-top: 5px; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.admin-table th, .admin-table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid var(--color-3); font-size: 14px; vertical-align: middle; }
.admin-table th { font-size: 12px; text-transform: uppercase; color: var(--color-7); font-weight: 600; }
.admin-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-3); }
.admin-actions { display: flex; gap: 16px; white-space: nowrap; }
.mini-badge { display: inline-block; font-size: 10px; background: var(--grad-badge); color: #fff; padding: 3px 10px; margin-left: 6px; border-radius: var(--radius-pill); }

.status-pill { display: inline-block; padding: 5px 14px; font-size: 12px; text-transform: capitalize; border: none; border-radius: var(--radius-pill); font-weight: 600; }
.status-pending { background: #fdf3e2; color: #7a5310; }
.status-confirmed { background: #eef6ee; color: #204f2a; }
.status-cancelled { background: #fbebea; color: #7c1b16; }

.admin-form-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; margin: 22px 0 52px; align-items: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-image-panel { border: 1px solid rgba(255,255,255,0.6); background: rgba(255,255,255,0.6); backdrop-filter: blur(10px); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.admin-current-image { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--color-3); }

/* ---------- Motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Scroll effects ---------- */
/* Default state: fully visible. The .js class is only added by
   scroll-effects.js, so with JavaScript disabled or failed, .reveal
   elements are never hidden in the first place — this is additive
   polish, not a dependency for seeing the page's content. */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

.site-header.is-scrolled {
  box-shadow: 0 8px 32px rgba(23,20,26,0.12);
  background: rgba(255,255,255,0.82);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--grad-btn);
  color: #fff;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--glow-mauve-lg);
  opacity: 0;
  transform: translateY(16px) scale(0.9);
  pointer-events: none;
  transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
  z-index: 60;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover { transform: translateY(-4px) scale(1.06); box-shadow: 0 26px 60px rgba(163,119,151,0.55); }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .back-to-top { transition: opacity 1ms, transform 1ms; }
}
