/* ==========================================================
   AVALI EYEWEAR
   Maison-style: white pages, warm near-black type, pale stone
   product plates, one geometric sans throughout, pill buttons.
   ========================================================== */

:root {
  --paper:     #FFFFFF;
  --plate:     #F6F5F3;
  --plate-2:   #EFEDE9;
  --ink:       #19110B;
  --ink-soft:  #3A3330;
  --muted:     #6F6A66;
  --line:      #E1DFDB;
  --line-soft: #EFEDEA;

  --font: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Helvetica, sans-serif;

  --shell:   min(1440px, calc(100vw - 2 * var(--pad)));
  --pad:     clamp(20px, 4vw, 64px);
  --gutter:  clamp(64px, 7vw, 112px);
  --header:  72px;
  --ease:    cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }

/* Clear keyboard focus everywhere — the design removes default outlines
   on inputs, so this keeps the site usable without a mouse. */
:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Anchored sections land below the header, not underneath it. */
[id] { scroll-margin-top: calc(var(--header) + 16px); }

.shell { width: var(--shell); margin-inline: auto; }

.section { padding-block: var(--gutter); }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 400; letter-spacing: 0.01em; }

h1 {
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.12;
  margin: 0.25em 0 0.5em;
}

h2 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.2;
  margin: 0.3em 0 0;
}

h3 { font-size: 16px; line-height: 1.35; margin: 0 0 8px; font-weight: 500; }

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0;
}

.lede {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto;
}

.section-head {
  margin: 0 auto clamp(36px, 4vw, 56px);
  max-width: 60ch;
  padding-inline: var(--pad);
  text-align: center;
}

.section-head .lede { margin-top: 14px; }

/* Underlined text link, the main call to action on editorial blocks. */
.text-link {
  display: inline-block;
  padding-bottom: 3px;
  color: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 1px no-repeat;
  transition: background-size 0.45s var(--ease);
}

.text-link:hover { background-size: 0 1px; background-position: right bottom; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

/* On the homepage the header floats over the hero in white, then turns
   solid once the page scrolls or the pointer moves onto it. */
.site-header.overlay {
  position: fixed;
  left: 0; right: 0;
}

.site-header.overlay:not(.scrolled):not(:hover):not(:focus-within) {
  background: transparent;
  color: #fff;
  border-bottom-color: transparent;
}

.header-inner {
  width: var(--shell);
  margin-inline: auto;
  height: var(--header);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.header-left  { display: flex; align-items: center; gap: 28px; }
.header-right { display: flex; align-items: center; justify-content: flex-end; gap: 28px; }

.logo {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  /* letter-spacing trails the last letter; pull it back so the word centres. */
  margin-right: -0.34em;
}

.logo-mark { width: 1.9em; height: auto; flex-shrink: 0; }

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border: none;
  background: none;
  color: inherit;
  font-family: var(--font);
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
}

.header-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.header-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Menu toggle: two lines that cross into an X. */
.nav-toggle .bars {
  position: relative;
  width: 20px; height: 10px;
}

.nav-toggle .bars span {
  position: absolute;
  left: 0;
  width: 100%; height: 1.5px;
  background: currentColor;
  transition: transform 0.4s var(--ease), top 0.4s var(--ease);
}

.nav-toggle .bars span:first-child { top: 0; }
.nav-toggle .bars span:last-child  { top: 8.5px; }

.nav-toggle[aria-expanded="true"] .bars span:first-child { top: 4.25px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars span:last-child  { top: 4.25px; transform: rotate(-45deg); }

/* Side drawer, used at every width. Slides in from the left over a dim
   backdrop; visibility keeps the links out of the tab order when shut. */
.nav-mobile {
  position: fixed;
  top: var(--header);
  left: 0;
  bottom: 0;
  z-index: 99;
  width: min(420px, 100vw);
  display: flex;
  flex-direction: column;
  padding: 24px var(--pad) 40px;
  overflow-y: auto;
  background: var(--paper);
  color: var(--ink);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.55s var(--ease), visibility 0s linear 0.55s;
}

.nav-mobile.open {
  transform: none;
  visibility: visible;
  transition: transform 0.55s var(--ease), visibility 0s;
}

body::after {
  content: "";
  position: fixed;
  inset: var(--header) 0 0 0;
  z-index: 98;
  background: rgba(25, 17, 11, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}

body.nav-open::after { opacity: 1; pointer-events: auto; }
body.nav-open .site-header.overlay { background: var(--paper); color: var(--ink); border-bottom-color: var(--line-soft); }

@media (prefers-reduced-motion: reduce) {
  .nav-mobile,
  .nav-mobile.open { transition-duration: 0s; }
}

.nav-mobile a {
  padding: 14px 0;
  font-size: 20px;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.3s var(--ease);
}

.nav-mobile a:hover { color: var(--muted); }

.nav-mobile-wa {
  margin-top: auto;
  padding: 15px 24px !important;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper) !important;
  text-align: center;
  font-size: 14px !important;
  font-weight: 500;
  letter-spacing: 0.04em !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 32px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.btn-solid { background: var(--ink); color: var(--paper); border: 1px solid var(--ink); }
.btn-solid:hover { background: var(--ink-soft); border-color: var(--ink-soft); }

.btn-line { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--ink); }

.btn-light { background: #fff; color: var(--ink); border: 1px solid #fff; }
.btn-light:hover { background: transparent; color: #fff; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  text-align: center;
}

.hero-visual { position: absolute; inset: 0; }

.hero-visual img {
  width: 100%; height: 100%;
  object-fit: cover;
  animation: heroSettle 2s var(--ease) both;
}

/* Bottom shade so the white copy stays readable on any photo. */
.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0) 55%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0) 22%);
}

@keyframes heroSettle {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: var(--shell);
  padding-bottom: clamp(48px, 9vh, 96px);
}

/* The frames mark, large and white in the centre of the hero. */
.hero-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  width: clamp(240px, 38vw, 560px);
  height: auto;
  color: #fff;
  translate: -50% -50%;
}

.hero .eyebrow { color: rgba(255, 255, 255, 0.82); }
.hero h1 { margin: 14px auto 28px; max-width: 20ch; }

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero .text-link { color: #fff; font-size: 15px; }

/* ---------- New in (carousel) ---------- */
.marquee-section { padding-block: var(--gutter) 0; overflow: hidden; }

.marquee-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}

.marquee-viewport::-webkit-scrollbar { display: none; }
.marquee-viewport.dragging { cursor: grabbing; scroll-behavior: auto; }

.marquee-track { display: flex; gap: 4px; width: max-content; }

.marquee-item { width: 320px; flex-shrink: 0; }

.marquee-item a {
  display: block;
  color: inherit;
  text-decoration: none;
  -webkit-user-drag: none;
}

.marquee-plate {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  overflow: hidden;
}

.marquee-item img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12%;
  pointer-events: none;
  user-select: none;
  mix-blend-mode: multiply;
  transition: transform 0.8s var(--ease);
}

.marquee-item a:hover img { transform: scale(1.04); }

.marquee-caption {
  display: block;
  padding: 14px 16px 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.marquee-caption small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }

/* ---------- Houses ---------- */
.house-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 42vw), 320px));
  justify-content: center;
  gap: 28px 4px;
}

.house-chip {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  font-family: var(--font);
  text-align: center;
  cursor: pointer;
}

.house-plate {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  overflow: hidden;
  outline: 1px solid transparent;
  outline-offset: -1px;
  transition: outline-color 0.35s var(--ease);
}

.house-plate img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 14%;
  mix-blend-mode: multiply;
  transition: transform 0.8s var(--ease);
}

.house-chip:hover .house-plate img { transform: scale(1.05); }
.house-chip[aria-pressed="true"] .house-plate { outline-color: var(--ink); }

.house-name {
  margin-top: 14px;
  font-size: 15px;
  letter-spacing: 0.02em;
}

.house-chip[aria-pressed="true"] .house-name { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- Filters ---------- */
.filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 16px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  padding-left: 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 400;
  color: var(--ink);
  transition: border-color 0.3s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}

.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: right 25px center, right 20px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 44px;
  cursor: pointer;
}

.field input:hover,
.field select:hover { border-color: var(--muted); }

.field input:focus,
.field select:focus { outline: none; border-color: var(--ink); }

.field input::placeholder { color: var(--muted); }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 20px 0 28px;
  min-height: 36px;
}

.result-count {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.clear-filters {
  padding: 8px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}
.clear-filters:hover { border-color: var(--ink); }
.clear-filters[hidden] { display: none; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 4px;
}

.product-card { display: flex; flex-direction: column; }

.product-plate {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--plate);
  overflow: hidden;
}

.product-plate img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12%;
  mix-blend-mode: multiply;
  transition: transform 0.85s var(--ease);
}

.product-card:hover .product-plate img { transform: scale(1.045); }

.product-card.is-out .product-plate img { opacity: 0.42; }

.stock-badge {
  position: absolute;
  top: 14px; left: 14px;
  z-index: 2;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.product-meta {
  padding: 16px 16px 0;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-head { display: flex; flex-direction: column; gap: 4px; }

.product-house {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.product-title { text-decoration: none; color: inherit; }

.product-title h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 400;
}

.product-title:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

.price-block { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }

.price { font-size: 14px; }

.price-was {
  font-size: 13px;
  color: var(--muted);
  text-decoration: line-through;
}

.product-tags {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.product-tags span:not(:last-child)::after {
  content: "\00B7";
  margin: 0 6px;
}

.card-cta {
  align-self: flex-start;
  margin-top: auto;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
}

/* Spacer above the button that still lets cards in a row line up. */
.product-tags { margin-bottom: 16px; }

.card-cta:hover:not(:disabled) { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.card-cta:disabled { color: var(--muted); cursor: not-allowed; }

/* ---------- Skeleton / empty ---------- */
.skeleton .sk-plate {
  aspect-ratio: 1 / 1;
  background: var(--plate);
}

.skeleton .sk-line {
  height: 11px;
  margin: 14px 16px 0;
  background: var(--plate);
}

.skeleton .sk-line.short { width: 42%; }
.skeleton .sk-plate, .skeleton .sk-line { animation: pulse 1.7s ease-in-out infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.grid-message {
  grid-column: 1 / -1;
  padding: clamp(56px, 8vw, 104px) 0;
  text-align: center;
  background: var(--plate);
}

.grid-message h3 { font-size: 20px; font-weight: 400; margin-bottom: 10px; }
.grid-message p { color: var(--muted); margin: 0 auto; max-width: 48ch; padding-inline: 20px; }
.grid-message .btn { margin-top: 24px; }

/* ---------- Story ---------- */
.story { background: var(--plate); text-align: center; }

.story .section-head { margin-bottom: clamp(40px, 5vw, 64px); }

.spec-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.spec-list > div {
  padding: clamp(28px, 3vw, 44px) clamp(20px, 2vw, 32px);
  background: var(--paper);
}

.spec-list dt {
  margin-bottom: 10px;
  font-size: 16px;
  font-weight: 500;
}

.spec-list dd { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* ---------- Ordering ---------- */
.ordering { text-align: center; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 3vw, 48px);
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 14px;
  font-weight: 500;
}

.steps p { margin: 0 auto; color: var(--muted); font-size: 14px; max-width: 32ch; }

.ordering-cta { margin-top: clamp(40px, 4vw, 56px); text-align: center; }

/* ---------- Coming soon (stands in for the collection before launch) ---------- */
.coming-soon { background: var(--plate); text-align: center; }
.coming-soon h2 { font-size: clamp(32px, 5vw, 56px); }
.coming-soon .section-head { margin-bottom: clamp(28px, 3vw, 40px); }
.coming-soon-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--paper);
  color: var(--ink);
  border-top: 1px solid var(--line);
  padding-block: clamp(48px, 6vw, 80px) 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.3fr;
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: clamp(48px, 6vw, 80px);
}

.footer-col h4 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s var(--ease);
}

.footer-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

.footer-brand p { margin: 0 0 18px; max-width: 34ch; color: var(--muted); font-size: 14px; }

.footer-wordmark {
  display: block;
  padding-block: clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-wordmark .logo { font-size: clamp(22px, 2.6vw, 34px); }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-base p { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(25, 17, 11, 0.2);
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.wa-float:hover { background: var(--ink-soft); transform: translateY(-2px); }
.wa-float svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.95s var(--ease) var(--d, 0s), transform 0.95s var(--ease) var(--d, 0s);
}

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-visual img { animation: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
  .field-search { grid-column: 1 / -1; }
  .spec-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  :root { --header: 60px; }
  .header-link .label,
  .header-link.hide-sm { display: none; }
  .header-left, .header-right { gap: 18px; }
  .logo { font-size: 18px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .marquee-item { width: 260px; }
}

@media (max-width: 560px) {
  .product-grid { gap: 32px 2px; }
  .product-meta { padding: 12px 10px 0; }
  .product-title h3 { font-size: 14px; }
  .product-tags { font-size: 12px; }
  .product-tags span:last-child { display: none; }
  .product-tags span:nth-last-child(2)::after { content: none; }
  .card-cta { padding: 8px 14px; font-size: 12px; }
  .filters { gap: 12px; padding-bottom: 20px; }
  .results-bar { margin: 14px 0 22px; }
  .spec-list { grid-template-columns: 1fr; }
  .marquee-item { width: 210px; }
  .hero-actions .btn { flex: 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-base { justify-content: center; text-align: center; }
  .wa-float { right: 14px; bottom: 14px; padding: 14px; }
  .wa-float span { display: none; }
}

/* ==========================================================
   Accounts, saved pairs, AI stylist and forms
   ========================================================== */

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

[hidden] { display: none !important; }

.form-status { margin: 10px 0 0; min-height: 1.4em; font-size: 14px; color: var(--ink-soft); }

/* ---------- Save (heart) ---------- */
.product-card { position: relative; }

.fav-btn {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease);
}
.fav-btn:hover { transform: scale(1.06); background: #fff; }

.fav-btn svg,
.detail-save svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  transition: fill 0.25s var(--ease);
}
.fav-btn.is-saved svg,
.detail-save.is-saved svg { fill: currentColor; }

/* ---------- Write to us ---------- */
.enquire { border-top: 1px solid var(--line); }

.enquire-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
  max-width: 820px;
  margin: 0 auto;
}

.field-wide { grid-column: 1 / -1; }

.field textarea {
  width: 100%;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.3s var(--ease);
}
.field textarea:hover { border-color: var(--muted); }
.field textarea:focus { outline: none; border-color: var(--ink); }

.enquire-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.enquire-actions .form-status { margin: 0; }

/* ---------- Newsletter ---------- */
.newsletter-form { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

.newsletter-form input,
.restock-row input {
  flex: 1 1 200px;
  min-height: 48px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
}
.newsletter-form input:focus,
.restock-row input:focus { outline: none; border-color: var(--ink); }
.newsletter-form .form-status { flex-basis: 100%; margin: 0; }

/* ---------- Restock request (product page) ---------- */
.restock-form {
  margin-top: 22px;
  padding: 20px;
  background: var(--plate);
  border-radius: 24px;
}
.restock-title { margin: 0 0 12px; font-weight: 500; }
.restock-row { display: flex; flex-wrap: wrap; gap: 10px; }
.restock-form.is-sent .restock-row { display: none; }

/* ---------- Account page ---------- */
.account-page { padding-block: clamp(40px, 6vw, 88px) var(--gutter); }

.account-notice {
  max-width: 560px;
  margin: 0 auto 28px;
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--plate);
  text-align: center;
  font-size: 14px;
}

.auth-card { max-width: 460px; margin: 0 auto; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
}
.auth-tabs button {
  padding: 14px 0;
  border: none;
  border-bottom: 1.5px solid transparent;
  margin-bottom: -1px;
  background: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
}
.auth-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--ink); }

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form h1 { margin: 0; }
.auth-form .btn { margin-top: 8px; }
.auth-sub { margin: 0 0 8px; color: var(--muted); }

.auth-switch {
  align-self: center;
  border: none;
  background: none;
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.account-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}
.account-head h1 { margin-bottom: 0.2em; }
.account-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.account-section-title { margin: 48px 0 24px; }

.profile-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; max-width: 560px; }
.profile-form .field { flex: 1 1 260px; }
.profile-form .form-status { flex-basis: 100%; margin: 0; }

/* ---------- AI stylist ---------- */
.stylist-launch {
  position: fixed;
  right: 20px;
  bottom: 84px;
  z-index: 91;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px 13px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(25, 17, 11, 0.12);
  cursor: pointer;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.stylist-launch:hover { transform: translateY(-2px); border-color: var(--ink); }
.stylist-launch svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Pages without the WhatsApp button keep the stylist in the corner. */
body:not(:has(.wa-float)) .stylist-launch { bottom: 20px; }

.stylist-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 40px));
  height: min(600px, calc(100vh - 40px));
  height: min(600px, calc(100dvh - 40px));
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--paper);
  box-shadow: 0 24px 64px rgba(25, 17, 11, 0.18);
  overflow: hidden;
}

body.stylist-open .stylist-launch,
body.stylist-open .wa-float { visibility: hidden; }

.stylist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.stylist-head strong { display: block; font-weight: 500; }
.stylist-head small { display: block; font-size: 12px; color: var(--muted); }

.stylist-close {
  width: 36px; height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--plate);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.stylist-log {
  flex: 1;
  overflow-y: auto;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stylist-msg { max-width: 88%; font-size: 14px; line-height: 1.55; }
.stylist-msg p { margin: 0 0 6px; }
.stylist-msg p:last-of-type { margin-bottom: 0; }
.stylist-msg strong { font-weight: 500; }

.stylist-msg.assistant { align-self: flex-start; padding: 12px 16px; border-radius: 18px 18px 18px 4px; background: var(--plate); }
.stylist-msg.user { align-self: flex-end; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--ink); color: var(--paper); }
.stylist-msg.typing p { letter-spacing: 0.2em; color: var(--muted); animation: stylist-pulse 1.2s ease-in-out infinite; }

@keyframes stylist-pulse { 50% { opacity: 0.35; } }

.stylist-picks { display: grid; gap: 8px; margin-top: 10px; }

.stylist-pick {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px;
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow 0.3s var(--ease);
}
.stylist-pick:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.stylist-pick img { width: 64px; height: 64px; object-fit: contain; background: var(--plate); border-radius: 10px; mix-blend-mode: multiply; }
.stylist-pick span { display: flex; flex-direction: column; font-size: 14px; line-height: 1.35; }
.stylist-pick small { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stylist-pick em { font-style: normal; color: var(--ink-soft); }

.stylist-suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 20px 12px; }
.stylist-suggest button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
}
.stylist-suggest button:hover { border-color: var(--ink); }

.stylist-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); }
.stylist-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--ink);
}
.stylist-form input:focus { outline: none; border-color: var(--ink); }
.stylist-form .btn { min-height: 44px; padding: 10px 20px; }

@media (max-width: 900px) {
  /* Clear the sticky order bar on product pages. */
  body:has(.order-bar) .stylist-launch { bottom: 96px; }
}

@media (max-width: 560px) {
  .enquire-form { grid-template-columns: 1fr; }
  .stylist-launch { right: 14px; bottom: 76px; padding: 14px; }
  .stylist-launch span { display: none; }
  body:not(:has(.wa-float)) .stylist-launch { bottom: 14px; }
  .stylist-panel { right: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: none; }
}
