/* ==========================================================================
   Liora Essence — components
   Naming: .block__element--modifier. Each block owns its own spacing so
   section padding and component margin never fight over specificity.
   ========================================================================== */

/* --------------------------------------------------------------- Buttons */
.btn {
  --btn-bg: var(--accent-fill);
  --btn-fg: var(--text-on-accent);
  --btn-bd: transparent;
  appearance: none;
  padding: var(--sp-3) var(--sp-5);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius-input);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease);
}
.btn:hover  { --btn-bg: var(--accent-press); color: var(--btn-fg); }
.btn:active { --btn-bg: var(--accent-press); }
.btn[disabled], .btn.is-disabled { opacity: 0.5; cursor: not-allowed; }

.btn--secondary {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--border-input);
}
.btn--secondary:hover { --btn-bg: var(--surface-sunken); --btn-fg: var(--text); }

.btn--inverse {
  --btn-bg: var(--surface-raised);
  --btn-fg: var(--liora-espresso);
}
.btn--inverse:hover { --btn-bg: var(--liora-ivory); --btn-fg: var(--liora-espresso); }

.btn--block { width: 100%; }
.btn--lg { padding: var(--sp-4) var(--sp-6); font-size: var(--step-0); }

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__bar {
  display: flex; align-items: center; gap: var(--sp-4);
  min-height: 64px;
}
.site-header__brand { margin-inline-end: auto; display: flex; align-items: center; }
.site-header__brand a { text-decoration: none; }
.brand-wordmark {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}
.site-header__actions { display: flex; align-items: center; gap: var(--sp-1); }

.icon-btn {
  width: 44px; height: 44px;
  background: none; border: 0; cursor: pointer;
  color: var(--text); border-radius: var(--radius-input);
}
.icon-btn:hover { background: var(--surface-sunken); }
.icon-btn svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.4; }

.cart-count {
  position: absolute; transform: translate(12px, -12px);
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--accent-fill); color: var(--text-on-accent);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Primary nav — desktop */
.nav { display: none; }
@media (min-width: 900px) {
  .nav { display: block; }
  .nav__list { display: flex; gap: var(--sp-5); align-items: center; }
  .nav__link {
    text-decoration: none;
    font-size: var(--step--1);
    letter-spacing: 0.04em;
    color: var(--text);
    padding-block: var(--sp-2);
    border-bottom: 1px solid transparent;
  }
  .nav__link:hover,
  .current-menu-item > .nav__link { border-bottom-color: var(--accent); color: var(--text); }
}

/* Mobile drawer */
.nav-toggle { display: inline-flex; }
@media (min-width: 900px) { .nav-toggle { display: none; } }

.drawer {
  position: fixed; inset: 0; z-index: 200;
  background: var(--surface);
  padding: var(--sp-4);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform var(--dur) var(--ease);
}
.drawer[data-open="true"] { transform: translateX(0); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-6); }
.drawer__list > li + li { border-top: 1px solid var(--border); }
.drawer__list a {
  display: flex; align-items: center; min-height: 52px;
  text-decoration: none; font-size: var(--step-1);
  font-family: var(--font-display);
}

/* ------------------------------------------------------- Product cards
   Two deliberately different treatments. Fragrance sells on mood and
   bottle silhouette; skincare sells on ingredient and specificity.
   ---------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-4) var(--sp-3);
}
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(3, 1fr); gap: var(--sp-6) var(--sp-4); } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.pcard { position: relative; display: flex; flex-direction: column; }
.pcard__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-raised);
  overflow: hidden;
  margin-bottom: var(--sp-3);
}
.pcard__media img {
  width: 100%; height: 100%; object-fit: contain;
  padding: var(--sp-4);
  transition: transform var(--dur) var(--ease);
}
.pcard:hover .pcard__media img { transform: scale(1.03); }
.pcard__brand {
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--sp-1);
}
.pcard__title {
  font-family: var(--font-display);
  font-size: var(--step-0);
  line-height: 1.25;
  margin-bottom: var(--sp-2);
}
.pcard__title a { text-decoration: none; }
/* Whole card clickable, but the link text stays the accessible name */
.pcard__title a::after { content: ""; position: absolute; inset: 0; }
.pcard__price { margin-top: auto; font-size: var(--step-0); font-weight: 500; }

/* Fragrance: dark plinth, bottle floats, name in display type */
.pcard--fragrance .pcard__media { background: var(--surface-inverse); }
.pcard--fragrance .pcard__media img { padding: var(--sp-5); }

/* Skincare: light, and the concern it treats is the information that matters */
.pcard--skincare .pcard__media { background: var(--surface-sunken); }
.pcard__concern {
  font-size: var(--step--1);
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
}

.badge {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 2;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  background: var(--surface-inverse); color: var(--text-inverse);
}
.badge--sale { background: var(--error); color: #fff; }
.badge--out  { background: var(--border-strong); color: var(--liora-espresso); }

/* ------------------------------------------------------------------ Forms */
.field { display: block; margin-bottom: var(--sp-4); }
.field__label {
  display: block; margin-bottom: var(--sp-2);
  font-size: var(--step--1); font-weight: 500;
}
.field__hint { display: block; margin-top: var(--sp-2); font-size: var(--step--1); color: var(--text-muted); }
.field__error { display: block; margin-top: var(--sp-2); font-size: var(--step--1); color: var(--error); font-weight: 500; }

input[type=text], input[type=email], input[type=tel], input[type=password],
input[type=search], input[type=number], textarea, select {
  width: 100%;
  min-height: 48px;                 /* comfortable on a 360px Android screen */
  padding: var(--sp-3);
  background: var(--surface-raised);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-input);
  font-size: 16px;                  /* below 16px iOS zooms the viewport on focus */
}
textarea { min-height: 120px; padding: var(--sp-3); }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--focus-ring); outline-offset: 1px;
  border-color: var(--focus-ring);
}
.field--invalid input, .field--invalid textarea { border-color: var(--error); border-width: 2px; }

/* --------------------------------------------------------------- Notices */
.notice {
  padding: var(--sp-4);
  border-left: 3px solid var(--notice);
  background: var(--surface-sunken);
  font-size: var(--step--1);
}
.notice--error   { border-left-color: var(--error);   }
.notice--success { border-left-color: var(--success); }

/* ------------------------------------------------------------------ Footer */
.site-footer {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  padding-block: var(--sp-8) var(--sp-5);
}
.site-footer a { color: var(--text-inverse); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: var(--text-inverse); }
.site-footer__grid {
  display: grid; gap: var(--sp-6);
  grid-template-columns: 1fr;
}
@media (min-width: 700px)  { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1000px) { .site-footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.site-footer__heading {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
  color: var(--text-inverse);
}
.site-footer__list li + li { margin-top: var(--sp-3); }
.site-footer__list a { font-size: var(--step--1); }
.site-footer__bottom {
  margin-top: var(--sp-7); padding-top: var(--sp-5);
  border-top: 1px solid rgba(250,247,244,0.18);
  display: flex; flex-wrap: wrap; gap: var(--sp-3) var(--sp-5);
  align-items: center; justify-content: space-between;
  font-size: var(--step--1);
}
.social { display: flex; gap: var(--sp-2); }
.social a {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(250,247,244,0.25);
  border-radius: var(--radius-pill);
}
.social svg { width: 18px; height: 18px; fill: currentColor; }

/* ------------------------------------------------------- WhatsApp float */
.wa-float {
  position: fixed; right: var(--sp-4); bottom: var(--sp-4); z-index: 90;
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #25D366; color: #04301A;
  border-radius: var(--radius-pill);
  box-shadow: 0 3px 14px rgba(44,26,14,0.28);
  text-decoration: none;
}
.wa-float svg { width: 27px; height: 27px; fill: currentColor; }

/* ==========================================================================
   Front page
   ========================================================================== */

/* Hero: espresso ground, image-first.
   With a portrait set on the Home page the hero runs two columns and the
   picture carries the section. Without one it collapses to a single centred
   column so there is no visible gap where the image belongs. */
.hero {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  border-bottom: 1px solid var(--rule-gold);
  padding-block: var(--sp-8);
}
@media (min-width: 768px) { .hero { padding-block: var(--sp-9); } }

.hero__inner { display: grid; gap: var(--sp-6); align-items: center; }

@media (min-width: 900px) {
  .hero--with-image .hero__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    gap: var(--sp-8);
  }
}

/* Type-only fallback: one column, generous measure, nothing pretending to be
   a design element in the empty half. */
.hero--type-only .hero__inner { max-width: 46rem; }
.hero--type-only .hero__title { max-width: 18ch; }

.hero__title {
  color: var(--text-inverse);
  font-size: var(--step-6);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 15ch;
  margin-bottom: var(--sp-5);
  animation: liora-rise 620ms var(--ease) both;
}
.hero__lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: 42ch;
  color: var(--liora-ivory);
  margin-bottom: var(--sp-6);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-bottom: var(--sp-6); }

/* Brand names as a plain line of running text — information, not a panel. */
.hero__brands {
  font-size: var(--step--1);
  line-height: 1.9;
  color: var(--liora-gold);
  max-width: 48ch;
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(201, 168, 76, 0.35);
}

/* Ghost button reads as secondary on the dark ground without adding a fill. */
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--liora-ivory);
  --btn-bd: rgba(245, 239, 230, 0.42);
}
.btn--ghost:hover { --btn-bg: rgba(245, 239, 230, 0.1); --btn-fg: var(--liora-ivory); }

/* Portrait slot. The source is delivered at 4:5 by the liora-portrait size,
   so the desktop frame matches it exactly and no second crop occurs. */
.hero__media { margin: 0; }
.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

/* On a phone a full 4:5 portrait pushes the buttons off screen, so the frame
   squares up. Cropping from the top keeps the face — a centre crop on a
   head-and-shoulders portrait cuts the forehead. */
@media (max-width: 899px) {
  .hero__media { max-width: 26rem; margin-inline: auto; }
  .hero__media img { aspect-ratio: 1 / 1; object-position: center top; }
}

@keyframes liora-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__title { animation: none; }
}

/* The two doors: a genuine structural split, so they are sized as equals
   and separated by a rule rather than boxed into cards. */
.doors__grid { display: grid; gap: var(--sp-6); }
@media (min-width: 800px) {
  .doors__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .door + .door { border-left: 1px solid var(--border); padding-left: var(--sp-8); }
}
.door__title { font-size: var(--step-3); margin-bottom: var(--sp-3); }
.door__copy { max-width: 42ch; color: var(--text-muted); margin-bottom: var(--sp-4); }
.door__link {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: var(--step--1); font-weight: 500;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.35em;
}

/* Concerns: a list of real customer language, set as a rule-separated index */
.concerns { display: grid; gap: 0; max-width: 62ch; }
.concerns__item { border-top: 1px solid var(--border-strong); }
.concerns__item:last-child { border-bottom: 1px solid var(--border-strong); }
.concerns__item a {
  display: flex; align-items: center; min-height: 60px;
  font-family: var(--font-display);
  font-size: var(--step-1);
  text-decoration: none;
  transition: padding-left var(--dur) var(--ease), color var(--dur) var(--ease);
}
.concerns__item a:hover { padding-left: var(--sp-3); color: var(--accent-fill); }

/* Assurances */
.assurances { display: grid; gap: var(--sp-6); }
@media (min-width: 800px) { .assurances { grid-template-columns: repeat(3, 1fr); gap: var(--sp-7); } }
.assurance__title {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.assurance p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.65; max-width: 38ch; }
