/* ==========================================================================
   VERITY SCENTS — Sistema visual
   Mobile-first. Tokens → base → componentes → secciones → páginas.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Color de marca */
  --ink: #080808;          /* negro profundo */
  --carbon: #151515;       /* negro carbón */
  --paper: #f8f6f1;        /* blanco cálido */
  --ivory: #eee9df;        /* marfil */
  --photo: #ffffff;        /* fondo de las fotos de producto */
  --gold: #c6a56b;         /* dorado champaña: acento, solo sobre oscuro o como línea */
  --stone: #85817b;        /* gris neutro: texto grande o decorativo */
  --line: #dedad2;         /* divisores */

  /* Derivados para accesibilidad (contraste AA sobre --paper) */
  --gold-deep: #85652f;    /* dorado legible sobre fondos claros */
  --stone-ink: #5f5b55;    /* texto secundario sobre fondos claros */
  --line-dark: #2b2926;    /* divisores sobre fondos oscuros */
  --paper-dim: #b9b4ab;    /* texto secundario sobre fondos oscuros */

  /* Tipografía */
  --serif: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Escala tipográfica (base 16px, razón ~1.25) */
  --fs-2xs: 0.6875rem;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: clamp(1.625rem, 1.4rem + 1vw, 2rem);
  --fs-2xl: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem);
  --fs-3xl: clamp(2.75rem, 1.9rem + 4vw, 4.75rem);

  /* Espaciado (base 4px) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  --gutter: 1rem;
  --container: 80rem;
  --radius: 2px;
  --radius-sheet: 6px;
  --header-h: 60px;

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 520ms;

  --focus: var(--ink);
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
    --header-h: 72px;
  }
}
@media (min-width: 80rem) {
  :root { --gutter: 3rem; }
}

/* ---------- 2. Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.on-dark { --focus: var(--gold); color: var(--paper); }

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

.skip-link {
  position: fixed;
  top: var(--s-2); left: var(--s-2);
  z-index: 200;
  padding: var(--s-3) var(--s-4);
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-200%);
  transition: transform var(--t-fast) var(--ease);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. Tipografía ---------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--fs-2xl);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.lede {
  font-size: var(--fs-md);
  line-height: 1.55;
  color: var(--stone-ink);
  max-width: 36rem;
}
.on-dark .lede { color: var(--paper-dim); }

.brandline {
  font-family: var(--sans);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone-ink);
}

.prose p + p { margin-top: var(--s-4); }

/* ---------- 4. Logotipo ----------
   Se usa el archivo oficial sin redibujarlo. Para el encabezado se recortan
   zonas del mismo archivo (wordmark y monograma) con background-position.
   mix-blend-mode: screen integra el fondo negro del PNG sobre superficies oscuras. */
.logo {
  display: block;
  background-image: url("../img/logo/verity-scents-logo.png");
  background-repeat: no-repeat;
  mix-blend-mode: screen;
}
/* Wordmark "VERITY SCENTS" — región 825×215 px del original */
.logo--wordmark {
  width: 132px;
  aspect-ratio: 825 / 215;
  background-size: 152% auto;
  background-position: 50.1% 63%;
}
/* Logotipo completo sin márgenes negros — región 855×715 px */
.logo--full {
  width: 100%;
  aspect-ratio: 855 / 715;
  background-size: 146.7% auto;
  background-position: 50.1% 46.4%;
}
@media (min-width: 48rem) {
  .logo--wordmark { width: 156px; }
}

/* ---------- 5. Botones y enlaces ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: 0 var(--s-5);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled,
.btn[aria-disabled="true"] { opacity: 0.38; cursor: not-allowed; }

.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover:not(:disabled) { background: var(--carbon); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover:not(:disabled) { background: var(--ink); color: var(--paper); }

.on-dark .btn--primary { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.on-dark .btn--primary:hover:not(:disabled) { background: var(--ivory); }
.on-dark .btn--ghost { color: var(--paper); border-color: rgba(248, 246, 241, 0.35); }
.on-dark .btn--ghost:hover:not(:disabled) { background: transparent; border-color: var(--gold); color: var(--gold); }

.btn--sm { min-height: 40px; padding: 0 var(--s-4); font-size: var(--fs-xs); }
.btn--block { width: 100%; }

.link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: var(--fs-sm);
  font-weight: 500;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + 0.8em) / 100% 1px no-repeat;
  transition: background-size var(--t-base) var(--ease), color var(--t-fast);
}
.link:hover { background-size: 40% 1px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  position: relative;
  transition: color var(--t-fast);
}
.icon-btn svg { width: 22px; height: 22px; }
.on-dark .icon-btn:hover { color: var(--gold); }

/* ---------- 6. Etiquetas ---------- */
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; margin: 0; }
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--paper);
}
.tag--gender { border-color: var(--ink); }
.tag--muted { color: var(--stone-ink); }

/* Disponibilidad */
.avail {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-xs);
  color: var(--stone-ink);
}
.avail::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1px solid currentColor;
}
.avail--disponible { color: var(--ink); }
.avail--disponible::before { background: var(--gold-deep); border-color: var(--gold-deep); }
.avail--vendido { color: var(--stone-ink); }
.avail--vendido::before { background: transparent; border-style: dashed; }

.price {
  font-family: var(--serif);
  font-size: var(--fs-lg);
  line-height: 1.2;
}
.price--pending { font-family: var(--sans); font-size: var(--fs-sm); color: var(--stone-ink); }

/* ---------- 7. Cabecera ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--header-h);
}
.brand-link { justify-self: center; padding: var(--s-2) 0; }
.header-actions { justify-self: end; display: flex; gap: var(--s-1); margin-right: -10px; }
.menu-btn { justify-self: start; margin-left: -10px; }
.main-nav { display: none; }

.bag-count {
  position: absolute;
  top: 6px; right: 4px;
  min-width: 17px; height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--gold);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}
.bag-count:empty { display: none; }
.bag-count.is-bumping { animation: bump 420ms var(--ease); }
@keyframes bump {
  40% { transform: scale(1.35); }
}

@media (min-width: 64rem) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: var(--s-6); }
  .menu-btn { display: none; }
  .brand-link { justify-self: start; }
  .main-nav { display: block; justify-self: center; }
  .main-nav ul { display: flex; gap: var(--s-6); list-style: none; padding: 0; }
  .main-nav a {
    font-size: var(--fs-sm);
    color: var(--paper-dim);
    padding: var(--s-2) 0;
    transition: color var(--t-fast);
  }
  .main-nav a:hover,
  .main-nav a[aria-current="page"] { color: var(--paper); }
}

/* Buscador */
.search-panel {
  border-top: 1px solid var(--line-dark);
  background: var(--ink);
}
.search-panel[hidden] { display: none; }
.search-form {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding-block: var(--s-3);
}
.search-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 var(--s-4);
  background: var(--carbon);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  color: var(--paper);
  font-size: var(--fs-base);
}
.search-form input::placeholder { color: var(--stone); }
.search-form input:focus { outline: none; border-color: var(--gold); }

/* Menú móvil */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
}
.mobile-nav.is-open { visibility: visible; }
.mobile-nav__panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(86vw, 360px);
  background: var(--ink);
  padding: var(--s-4) var(--gutter) var(--s-7);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--t-slow) var(--ease);
  overflow-y: auto;
}
.mobile-nav.is-open .mobile-nav__panel { transform: none; }
.mobile-nav__list { list-style: none; padding: 0; margin-top: var(--s-6); }
.mobile-nav__list a {
  display: block;
  padding: var(--s-3) 0;
  font-family: var(--serif);
  font-size: var(--fs-xl);
  line-height: 1.2;
  border-bottom: 1px solid var(--line-dark);
}
.mobile-nav__list a:hover { color: var(--gold); }
.mobile-nav__foot { margin-top: auto; padding-top: var(--s-7); font-family: var(--serif); font-style: italic; color: var(--gold); font-size: var(--fs-md); }

.scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 8, 0.55);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease);
}
.is-open > .scrim { opacity: 1; }

/* Los paneles permanecen visibles hasta terminar su animación de cierre */
.mobile-nav,
.drawer,
.sheet { transition: visibility 0s linear var(--t-slow); }
.mobile-nav.is-open,
.drawer.is-open,
.sheet.is-open { transition-delay: 0s; }

/* ---------- 8. Hero ---------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100svh - var(--header-h));
  padding: var(--s-8) var(--gutter) var(--s-8);
  background:
    radial-gradient(ellipse 55% 45% at 50% 36%, rgba(198, 165, 107, 0.09), transparent 70%),
    var(--ink);
  text-align: center;
  overflow: hidden;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
.hero__logo { width: min(76vw, 440px); }
.hero__drop {
  position: relative;
  width: 1px;
  height: 56px;
  margin: var(--s-5) 0 var(--s-5);
  background: linear-gradient(var(--gold), rgba(198, 165, 107, 0.15));
  transform-origin: top;
}
.hero__drop::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -3px;
  width: 5px; height: 5px;
  margin-left: -2.5px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--gold);
}
.hero__claim {
  font-family: var(--serif);
  font-size: var(--fs-xl);
  font-weight: 400;
  line-height: 1.25;
  color: var(--paper);
  max-width: 22ch;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  width: 100%;
  max-width: 320px;
  margin-top: var(--s-7);
}
@media (min-width: 36rem) {
  .hero__actions { flex-direction: row; max-width: none; width: auto; }
}

/* Secuencia de entrada: un único momento orquestado */
/* La animación va sobre el propio logotipo: un contenedor animado aislaría el mix-blend-mode */
.hero__logo .logo { animation: hero-logo 1600ms var(--ease) both; }
.hero__drop { animation: hero-drop 900ms var(--ease-in-out) 1100ms both; }
.hero__drop::after { animation: hero-dot 500ms var(--ease) 1850ms both; }
.hero__claim { animation: hero-fade 900ms var(--ease) 1900ms both; }
.hero__actions { animation: hero-fade 900ms var(--ease) 2150ms both; }

@keyframes hero-logo {
  from { opacity: 0; filter: blur(8px); transform: scale(0.985); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@keyframes hero-drop { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes hero-dot { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes hero-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- 9. Secciones ---------- */
.section { padding-block: var(--s-8); }
@media (min-width: 48rem) { .section { padding-block: var(--s-9); } }

.section-head { display: grid; gap: var(--s-3); margin-bottom: var(--s-6); }
@media (min-width: 64rem) {
  .section-head--split { grid-template-columns: 1fr 1fr; align-items: end; gap: var(--s-6); }
  .section-head--split .lede { justify-self: end; }
}

/* Descubrir mi aroma */
.finder { background: var(--carbon); }
.finder__grid {
  display: grid;
  gap: 1px;
  background: var(--line-dark);
  border: 1px solid var(--line-dark);
  list-style: none;
  padding: 0;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 64rem) { .finder__grid { grid-template-columns: repeat(4, 1fr); } }
.finder__option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  width: 100%;
  height: 100%;
  min-height: 132px;
  padding: var(--s-4);
  background: var(--carbon);
  text-align: left;
  transition: background-color var(--t-base) var(--ease);
}
@media (min-width: 40rem) { .finder__option { padding: var(--s-5); } }
.finder__option:hover { background: #1c1b19; }
.finder__title {
  font-family: var(--serif);
  font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem);
  line-height: 1.1;
  color: var(--paper);
}
.finder__desc { font-size: var(--fs-sm); color: var(--paper-dim); }
.finder__go {
  margin-top: auto;
  padding-top: var(--s-3);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--gold);
}
.finder__option:hover .finder__title { color: var(--gold); }
.finder__title { transition: color var(--t-base); }

/* ---------- 10. Colección y filtros ---------- */
.toolbar {
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  margin-inline: calc(var(--gutter) * -1);
  padding: var(--s-3) var(--gutter);
  background: rgba(248, 246, 241, 0.94);
  backdrop-filter: saturate(1.2) blur(10px);
  -webkit-backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar__row { display: flex; align-items: center; gap: var(--s-3); }
.toolbar__row + .toolbar__row { margin-top: var(--s-3); }
.toolbar__families { display: none; }
.toolbar__search { display: none; }

.segmented {
  display: flex;
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.segmented button {
  flex: 1;
  min-height: 44px;
  padding: 0 var(--s-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--stone-ink);
  border-right: 1px solid var(--line);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.segmented button:last-child { border-right: 0; }
.segmented button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.segmented button:hover:not([aria-pressed="true"]) { color: var(--ink); }

.filter-trigger { flex: none; position: relative; }
.filter-trigger .dot {
  position: absolute; top: 9px; right: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold-deep);
}

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: 0 var(--s-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 500;
  background: var(--paper);
  transition: border-color var(--t-fast), background-color var(--t-fast), color var(--t-fast);
}
.chip:hover:not(:disabled) { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip:disabled { opacity: 0.4; cursor: not-allowed; }
.chip__count { color: var(--stone); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__count { color: var(--paper-dim); }

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 44px;
  margin-top: var(--s-4);
  font-size: var(--fs-sm);
  color: var(--stone-ink);
}
.results-bar strong { color: var(--ink); font-weight: 600; }
.clear-btn { font-size: var(--fs-sm); text-decoration: underline; text-underline-offset: 4px; min-height: 44px; }
.clear-btn[hidden] { display: none; }

.field {
  height: 44px;
  width: 100%;
  padding: 0 var(--s-4) 0 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f5b55' stroke-width='1.5'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m20 20-4.2-4.2'/%3E%3C/svg%3E") 12px 50% / 18px no-repeat;
  font-size: var(--fs-base);
}
.field:focus { outline: none; border-color: var(--ink); }

@media (min-width: 64rem) {
  .toolbar { position: static; margin-inline: 0; padding-inline: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .filter-trigger { display: none; }
  .segmented { flex: none; width: 420px; }
  .toolbar__search { display: block; margin-left: auto; width: 300px; }
  .toolbar__families { display: flex; align-items: center; gap: var(--s-4); }
  .toolbar__label { font-size: var(--fs-xs); color: var(--stone-ink); flex: none; }
}

/* Rejilla de productos */
.grid {
  display: grid;
  list-style: none;
  padding: 0;
  margin-top: var(--s-2);
}
@media (min-width: 40rem) {
  .grid { grid-template-columns: repeat(2, 1fr); column-gap: var(--s-5); row-gap: var(--s-7); }
}
@media (min-width: 64rem) { .grid { grid-template-columns: repeat(3, 1fr); column-gap: var(--s-6); } }
@media (min-width: 90rem) { .grid { grid-template-columns: repeat(4, 1fr); } }

.grid > li.is-entering { animation: card-in 420ms var(--ease) both; }
@keyframes card-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 11. Tarjeta de producto ---------- */
.card {
  display: grid;
  grid-template-columns: minmax(118px, 40%) 1fr;
  gap: var(--s-4);
  padding-block: var(--s-5);
  border-bottom: 1px solid var(--line);
  height: 100%;
}
.card__media {
  position: relative;
  display: block;
  align-self: start;
  aspect-ratio: 4 / 5;
  background: var(--photo);
  overflow: hidden;
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 900ms var(--ease);
}
.card__flag {
  position: absolute;
  top: var(--s-2); left: var(--s-2);
  padding: 3px var(--s-2);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: 0.06em;
}
.card__body { display: flex; flex-direction: column; min-width: 0; }
.card__name {
  margin-top: var(--s-1);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-weight: 500;
  line-height: 1.1;
}
.card__name a::after { content: ""; }
.card__spec { margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--stone-ink); }
.card .tags { margin-top: var(--s-3); }
.card__desc {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  line-height: 1.5;
  color: var(--stone-ink);
}
.card__meta {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
  margin-top: var(--s-3);
}
.card__meta .price { font-size: var(--fs-md); }
.card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2) var(--s-4);
  margin-top: auto;
  padding-top: var(--s-4);
}
.card.is-sold .card__media img { filter: grayscale(0.7); opacity: 0.6; }

@media (min-width: 40rem) {
  .card {
    grid-template-columns: 1fr;
    gap: var(--s-4);
    padding-block: 0;
    border-bottom: 0;
  }
  .card__name { font-size: var(--fs-xl); }
}
@media (hover: hover) {
  .card:hover .card__media img { transform: scale(1.035); }
}

/* Estado vacío */
.empty {
  padding: var(--s-9) var(--s-4);
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-top: var(--s-5);
}
.empty[hidden] { display: none; }
.empty__title { font-family: var(--serif); font-size: var(--fs-xl); }
.empty p { margin-top: var(--s-3); color: var(--stone-ink); }
.empty .btn { margin-top: var(--s-5); }

/* ---------- 12. Cómo comprar ---------- */
.steps {
  display: grid;
  gap: var(--s-6);
  list-style: none;
  padding: 0;
  counter-reset: step;
}
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); gap: var(--s-6); } }
.steps li { counter-increment: step; border-top: 1px solid var(--ink); padding-top: var(--s-4); }
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  line-height: 1;
  color: var(--gold-deep);
}
.steps h3 { margin-top: var(--s-4); font-family: var(--serif); font-size: var(--fs-lg); font-weight: 500; }
.steps p { margin-top: var(--s-2); font-size: var(--fs-sm); color: var(--stone-ink); max-width: 34ch; }

/* ---------- 13. Pie de página ---------- */
.site-footer { background: var(--ink); padding-block: var(--s-8) var(--s-6); }
.footer-grid { display: grid; gap: var(--s-7); }
.footer-logo { width: 200px; }
.footer-col h2 {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--paper-dim);
  margin-bottom: var(--s-3);
}
.footer-col ul { list-style: none; padding: 0; display: grid; gap: var(--s-1); }
.footer-col a { display: inline-block; padding: var(--s-1) 0; font-size: var(--fs-sm); color: var(--paper); transition: color var(--t-fast); }
.footer-col a:hover { color: var(--gold); }
.footer-col[hidden] { display: none; }
.footer-legal {
  margin-top: var(--s-8);
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-dark);
  font-size: var(--fs-xs);
  color: var(--stone);
}
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}

/* ---------- 14. Paneles: bolsa y filtros ---------- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  visibility: hidden;
}
.drawer.is-open { visibility: visible; }
.drawer__panel {
  position: absolute;
  inset: 0 0 0 auto;
  width: min(100vw, 440px);
  display: flex;
  flex-direction: column;
  background: var(--paper);
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  padding: 0 var(--s-2) 0 var(--gutter);
  border-bottom: 1px solid var(--line);
}
.drawer__title { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 500; }
.drawer__body { flex: 1; overflow-y: auto; padding: var(--s-2) var(--gutter); overscroll-behavior: contain; }
.drawer__foot { padding: var(--s-4) var(--gutter) calc(var(--s-4) + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }

.line-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: var(--s-4);
  padding-block: var(--s-4);
  border-bottom: 1px solid var(--line);
}
.line-item__img { aspect-ratio: 4 / 5; background: var(--photo); overflow: hidden; }
.line-item__img img { width: 100%; height: 100%; object-fit: contain; }
.line-item__name { font-family: var(--serif); font-size: var(--fs-md); font-weight: 500; line-height: 1.2; }
.line-item__spec { font-size: var(--fs-xs); color: var(--stone-ink); }
.line-item__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-3); }
.line-item__warn { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--gold-deep); }
.line-item .price { font-size: var(--fs-md); }
.remove-btn { font-size: var(--fs-xs); color: var(--stone-ink); text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.remove-btn:hover { color: var(--ink); }

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stepper button { width: 40px; height: 40px; display: grid; place-items: center; }
.stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper svg { width: 14px; height: 14px; }
.stepper output { min-width: 28px; text-align: center; font-variant-numeric: tabular-nums; font-size: var(--fs-sm); }

.summary-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); }
.summary-row .price { font-size: var(--fs-xl); }
.note { margin-top: var(--s-2); font-size: var(--fs-xs); color: var(--stone-ink); line-height: 1.5; }
.drawer__foot .btn { margin-top: var(--s-4); }

.order-preview {
  margin-top: var(--s-4);
  padding: var(--s-4);
  background: var(--ivory);
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  white-space: pre-wrap;
  word-break: break-word;
}
.back-btn { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; font-size: var(--fs-sm); }
.back-btn svg { width: 16px; height: 16px; }

.drawer-empty { padding: var(--s-8) 0; text-align: center; }
.drawer-empty p:first-child { font-family: var(--serif); font-size: var(--fs-xl); }
.drawer-empty p + p { margin-top: var(--s-2); color: var(--stone-ink); font-size: var(--fs-sm); }
.drawer-empty .btn { margin-top: var(--s-5); }

/* Hoja de filtros (móvil) */
.sheet { position: fixed; inset: 0; z-index: 100; visibility: hidden; }
.sheet.is-open { visibility: visible; }
.sheet__panel {
  position: absolute;
  inset: auto 0 0 0;
  max-height: 86svh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  transform: translateY(100%);
  transition: transform var(--t-slow) var(--ease);
}
.sheet.is-open .sheet__panel { transform: none; }
.sheet__grip { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: var(--s-3) auto 0; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-2) var(--s-2) var(--s-2) var(--gutter); }
.sheet__body { overflow-y: auto; padding: 0 var(--gutter) var(--s-5); overscroll-behavior: contain; }
.sheet__group + .sheet__group { margin-top: var(--s-6); }
.sheet__label { font-size: var(--fs-xs); font-weight: 600; color: var(--stone-ink); margin-bottom: var(--s-3); }
.sheet__foot {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.sheet__foot .btn--primary { flex: 1; }

/* Aviso flotante */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
  z-index: 120;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  width: max-content;
  max-width: calc(100vw - 2rem);
  padding: var(--s-3) var(--s-3) var(--s-3) var(--s-5);
  background: var(--ink);
  color: var(--paper);
  font-size: var(--fs-sm);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(8, 8, 8, 0.18);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { color: var(--gold); font-weight: 600; min-height: 36px; padding: 0 var(--s-2); }
.has-buybar .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }

/* ---------- 15. Ficha de producto ---------- */
.crumbs { padding-block: var(--s-4); font-size: var(--fs-xs); color: var(--stone-ink); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: var(--s-2); list-style: none; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--stone); }
.crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs a:hover { color: var(--ink); }

.pdp { display: grid; gap: var(--s-6); padding-bottom: var(--s-8); }
.pdp__media { margin-inline: calc(var(--gutter) * -1); }
.pdp__figure { position: relative; aspect-ratio: 4 / 5; background: var(--photo); overflow: hidden; }
.pdp__figure img { width: 100%; height: 100%; object-fit: contain; animation: pdp-img 1100ms var(--ease) both; }
@keyframes pdp-img { from { opacity: 0; transform: scale(1.02); } to { opacity: 1; transform: none; } }
.pdp__caption { padding: var(--s-2) var(--gutter) 0; font-size: var(--fs-2xs); color: var(--stone-ink); }

.pdp__name {
  margin-top: var(--s-2);
  font-family: var(--serif);
  font-size: var(--fs-2xl);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.pdp__spec { margin-top: var(--s-3); font-size: var(--fs-sm); color: var(--stone-ink); }
.pdp__spec small { display: block; margin-top: var(--s-1); font-size: var(--fs-xs); color: var(--gold-deep); }
.pdp .tags { margin-top: var(--s-4); }
.pdp__price { margin-top: var(--s-5); }
.pdp__price .price { font-size: var(--fs-xl); }
.pdp__lede {
  margin-top: var(--s-5);
  font-family: var(--serif);
  font-size: var(--fs-lg);
  font-style: italic;
  line-height: 1.4;
  max-width: 34ch;
}

.pdp-block { margin-top: var(--s-7); padding-top: var(--s-5); border-top: 1px solid var(--line); }
.pdp-block h2 { font-family: var(--serif); font-size: var(--fs-xl); font-weight: 500; line-height: 1.15; }
.pdp-block > p,
.pdp-block .prose { margin-top: var(--s-3); max-width: 62ch; font-size: var(--fs-base); line-height: 1.7; }
.pdp-block .fine { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--stone-ink); }

/* Pirámide olfativa: secuencia temporal real (salida → corazón → fondo) */
.pyramid { list-style: none; padding: 0; margin-top: var(--s-5); position: relative; }
.pyramid::before {
  content: "";
  position: absolute;
  left: 4px; top: 10px; bottom: 10px;
  width: 1px;
  background: var(--line);
}
.pyramid li { position: relative; padding-left: var(--s-6); }
.pyramid li + li { margin-top: var(--s-5); }
.pyramid li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--gold-deep);
}
.pyramid li:nth-child(2)::before { background: rgba(198, 165, 107, 0.45); }
.pyramid li:nth-child(3)::before { background: var(--gold-deep); }
.pyramid__stage { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--s-3); }
.pyramid__stage strong { font-size: var(--fs-sm); font-weight: 600; }
.pyramid__stage span { font-size: var(--fs-xs); color: var(--stone-ink); }
.pyramid__notes { margin-top: var(--s-1); font-family: var(--serif); font-size: var(--fs-lg); line-height: 1.35; }

.family { margin-top: var(--s-4); display: grid; gap: var(--s-5); }
.family dt { font-size: var(--fs-xs); font-weight: 600; color: var(--stone-ink); }
.family dd { margin-top: var(--s-2); }
.family__main { font-family: var(--serif); font-size: var(--fs-xl); line-height: 1.1; }
.family__hint { margin-top: var(--s-1); font-size: var(--fs-sm); color: var(--stone-ink); }

.buy { margin-top: var(--s-7); padding: var(--s-5); background: var(--ivory); border-radius: var(--radius); }
.buy__row { display: flex; align-items: center; gap: var(--s-3); margin-top: var(--s-4); }
.buy__row .btn--primary { flex: 1; }
.buy .note { margin-top: var(--s-3); }
.buy__consult { margin-top: var(--s-3); }

.pending-box { margin-top: var(--s-3); padding: var(--s-4); border: 1px dashed var(--line); font-size: var(--fs-sm); color: var(--stone-ink); }

@media (min-width: 64rem) {
  .pdp { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
  .pdp__media { margin-inline: 0; position: sticky; top: calc(var(--header-h) + var(--s-5)); }
  .pdp__caption { padding-inline: 0; }
  .pdp__info { padding-top: var(--s-4); }
}

/* Barra de compra fija (móvil) */
.buybar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-3) var(--gutter) calc(var(--s-3) + env(safe-area-inset-bottom));
  background: rgba(248, 246, 241, 0.97);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform var(--t-base) var(--ease);
}
.buybar.is-visible { transform: none; }
.buybar__info { flex: 1; min-width: 0; }
.buybar__name { font-family: var(--serif); font-size: var(--fs-md); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buybar__price { font-size: var(--fs-xs); color: var(--stone-ink); }
@media (min-width: 64rem) { .buybar { display: none; } }

.related { padding-block: var(--s-8); border-top: 1px solid var(--line); }

/* Estados de carga y error */
.state { padding: var(--s-10) 0; text-align: center; }
.state h1 { font-family: var(--serif); font-size: var(--fs-2xl); font-weight: 400; }
.state p { margin-top: var(--s-3); color: var(--stone-ink); }
.state .btn { margin-top: var(--s-5); }
.skeleton { background: linear-gradient(90deg, var(--ivory), #f4f0e8, var(--ivory)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Aparición discreta al entrar en pantalla (solo encabezados de sección) */
[data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity 900ms var(--ease), transform 900ms var(--ease); }
[data-reveal].is-revealed { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* El precio pendiente siempre se muestra discreto, en cualquier contexto */
.price.price--pending {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--stone-ink);
}
.pdp__price .price.price--pending { font-size: var(--fs-md); }

/* ---------- 16. Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
