/* Fuentes de Fontshare (ITF Free Font License), servidas desde el sitio */
@font-face{font-family:'Gambetta';src:url('/fonts/gambetta-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Gambetta';src:url('/fonts/gambetta-400i.woff2') format('woff2');font-weight:400;font-style:italic;font-display:swap}
@font-face{font-family:'Gambetta';src:url('/fonts/gambetta-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'Gambetta';src:url('/fonts/gambetta-600.woff2') format('woff2');font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:'Satoshi';src:url('/fonts/satoshi-400.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Satoshi';src:url('/fonts/satoshi-500.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'Satoshi';src:url('/fonts/satoshi-700.woff2') format('woff2');font-weight:700;font-style:normal;font-display:swap}

/* Alma Joyería — editorial, lujoso y silencioso. Solo modo claro. */
:root {
  --ivory: #F7F3EC;
  --ivory-2: #FBF9F5;
  --stone: #E8E1D6;
  --stone-2: #D9CFC0;
  --ink: #1C1A17;
  --ink-2: #4F483F;      /* texto secundario: 7,6:1 sobre marfil */
  --ink-3: #6E6559;      /* notas: 5,1:1 sobre marfil */
  --gold: #B8955A;       /* solo decoración, nunca texto */
  --gold-text: #7D5F2E;  /* dorado legible: 5,6:1 */
  --emerald: #1E4D3E;
  --emerald-2: #163A2F;
  --line: rgba(28, 26, 23, 0.14);
  --serif: 'Gambetta', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Satoshi', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --header-h: 64px;
  --gutter: clamp(16px, 4vw, 56px);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: text-decoration-color 160ms ease; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-color: currentColor; } }
::selection { background: color-mix(in srgb, var(--gold) 38%, transparent); color: var(--ink); }
:focus-visible { outline: 2px solid var(--emerald); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.num { font-variant-numeric: tabular-nums lining-nums; }
button { font: inherit; color: inherit; }
html { scrollbar-color: var(--stone-2) var(--ivory); scrollbar-width: thin; }
input { caret-color: var(--emerald); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--ivory); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: calc(12px + var(--safe-t)); }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  height: calc(var(--header-h) + var(--safe-t));
  padding: var(--safe-t) calc(var(--gutter) + var(--safe-r)) 0 calc(var(--gutter) + var(--safe-l));
  display: flex; align-items: center; gap: 24px;
  background: color-mix(in srgb, var(--ivory) 0%, transparent);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.site-header.is-scrolled { background: color-mix(in srgb, var(--ivory) 92%, transparent); box-shadow: 0 1px 0 var(--line); backdrop-filter: saturate(1.2) blur(10px); -webkit-backdrop-filter: saturate(1.2) blur(10px); }
.brand { display: inline-flex; align-items: baseline; gap: 8px; text-decoration: none; }
.brand__name { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; line-height: 1; }
.brand__sub { font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--ink-2); }
.site-nav { margin-left: auto; display: flex; gap: 28px; font-size: 14px; }
.site-nav a { text-decoration: none; color: var(--ink-2); padding: 8px 0; transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .site-nav a:hover { color: var(--ink); } }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--ivory-2); cursor: pointer;
  font-size: 14px; transition: transform 160ms var(--ease-out), border-color 160ms ease;
}
.cart-btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .cart-btn:hover { border-color: color-mix(in srgb, var(--ink) 35%, transparent); } }
.cart-btn__count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: var(--ivory); font-size: 12px; display: inline-grid; place-items: center; }
.cart-btn.is-bump .cart-btn__count { animation: bump 420ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.25); } }

/* ---------- Viaje: anillo fijo + contenido ---------- */
.journey { position: relative; }
.stage {
  position: sticky; top: 0; height: 100svh; z-index: 1;
  overflow: hidden; pointer-events: none;
}
.stage__glow {
  position: absolute; inset: -10% -10% auto; height: 120%;
  background:
    radial-gradient(42% 38% at 50% 44%, rgba(255, 252, 245, 0.95), rgba(255, 252, 245, 0) 70%);
}
.stage__inner { position: absolute; inset: 0; transform-origin: 50% 50%; will-change: transform; }
.stage__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; transition: opacity 500ms ease, filter 500ms ease; }
.stage__poster.is-hidden { opacity: 0; filter: blur(6px); }
.stage__poster { transform: scale(0.8); }
@media (min-width: 900px) { .stage__poster { transform: scale(0.786); } }
model-viewer:not(:defined) > * { display: none; }
.stage model-viewer, .stage .sparkle { pointer-events: auto; }
model-viewer {
  width: 100%; height: 100%;
  --poster-color: transparent;
  --progress-bar-color: transparent;
  background: transparent;
}
model-viewer::part(default-progress-bar) { display: none; }
.mv-progress { position: absolute; left: 50%; bottom: 18%; width: 120px; height: 1px; margin-left: -60px; background: var(--line); overflow: hidden; transition: opacity 400ms ease; }
.mv-progress span { display: block; height: 100%; width: 100%; background: var(--gold); transform: scaleX(var(--p, 0)); transform-origin: left; transition: transform 200ms ease; }
.mv-progress.is-done { opacity: 0; }
.ar-btn {
  position: absolute; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--ivory-2) 92%, transparent);
  font-size: 14px; cursor: pointer; transition: transform 160ms var(--ease-out);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.ar-btn:active { transform: translateX(-50%) scale(0.97); }
.sparkle {
  position: absolute; left: 50%; top: 32%; width: 34vmin; height: 34vmin; margin: -17vmin 0 0 -17vmin;
  pointer-events: none !important; opacity: 0;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 2%, rgba(255, 255, 255, 0) 16%),
    conic-gradient(from 0deg, transparent 0 22%, rgba(255, 255, 255, 0.7) 24.5%, transparent 27% 47%, rgba(255, 255, 255, 0.7) 49.5%, transparent 52% 72%, rgba(255, 255, 255, 0.7) 74.5%, transparent 77% 97%, rgba(255, 255, 255, 0.7) 99.5%, transparent);
  -webkit-mask: radial-gradient(circle, #000 0 18%, transparent 46%);
  mask: radial-gradient(circle, #000 0 18%, transparent 46%);
  mix-blend-mode: screen;
}
.sparkle.is-on { animation: sparkle 700ms var(--ease-out); }
@keyframes sparkle {
  0% { opacity: 0; transform: scale(0.6) rotate(-20deg); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.15) rotate(25deg); }
}
.stage__hint { position: absolute; left: 0; right: 0; bottom: calc(84px + var(--safe-b)); text-align: center; font-size: 12px; letter-spacing: 0.04em; color: var(--ink-3); transition: opacity 400ms ease; pointer-events: none; }
.stage__hint.is-hidden { opacity: 0 !important; }
@media (min-width: 900px) { .stage__hint { opacity: 0; bottom: calc(5vh + var(--safe-b)); } }
.stage__price { display: none; }

.journey__content { position: relative; z-index: 2; margin-top: -100svh; pointer-events: none; }
.journey__content .hero__aside, .journey__content .panel, .journey__content a { pointer-events: auto; }

.hero {
  min-height: 100svh;
  padding: calc(var(--header-h) + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) calc(56px + var(--safe-b)) calc(var(--gutter) + var(--safe-l));
  display: grid; align-content: end; grid-template-columns: 1fr auto; gap: 24px; align-items: end;
}
.hero__title { font-size: clamp(4rem, 11vw, 9.5rem); line-height: 0.82; letter-spacing: -0.035em; font-weight: 400; }
.hero__word { display: inline-block; }
.hero__aside { max-width: 22rem; padding-bottom: 1.2rem; display: grid; gap: 10px; justify-items: start; }
.hero__lede { font-family: var(--serif); font-style: italic; font-size: clamp(1.35rem, 2vw, 1.7rem); line-height: 1.2; }
.hero__fine { font-size: 14px; color: var(--ink-2); }
.hero__scroll { margin-top: 8px; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.hero__scroll span { transition: transform 200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .hero__scroll:hover span { transform: translateY(3px); } }

/* ---------- Configurador ---------- */
.config { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); min-height: 100svh; padding: 0 calc(var(--gutter) + var(--safe-r)) 12vh calc(var(--gutter) + var(--safe-l)); }
.panel {
  grid-column: 2; align-self: start;
  margin-top: calc(var(--header-h) + 6vh);
  padding: clamp(28px, 3.4vw, 48px);
  background: color-mix(in srgb, var(--ivory-2) 86%, transparent);
  border-radius: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 30px 60px -40px rgba(60, 45, 20, 0.35), 0 2px 8px -4px rgba(60, 45, 20, 0.08);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: grid; gap: 30px;
}
.panel__title { font-size: clamp(2rem, 3vw, 2.75rem); }
.panel__title em { font-style: italic; }
.panel__intro { color: var(--ink-2); margin-top: -18px; max-width: 34em; }
.opt { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 14px; }
.opt__legend { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); width: 100%; }
.opt__value { text-transform: none; letter-spacing: 0; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--ink); }
.opt__aside { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--ink-3); }
.opt__help { font-size: 13px; color: var(--ink-3); margin-top: -6px; }
.link-btn { margin-left: auto; border: 0; background: none; padding: 6px 0; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 0.22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }

.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.swatch { position: relative; }
.swatch input, .seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.swatch label {
  display: grid; justify-items: center; gap: 8px; cursor: pointer; width: 72px; text-align: center;
  font-size: 12px; line-height: 1.25; color: var(--ink-2);
}
.swatch__dot {
  width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--a) 0 18%, var(--b) 100%);
  box-shadow: 0 0 0 1px rgba(28, 26, 23, 0.12), 0 6px 12px -8px rgba(28, 26, 23, 0.5), inset 0 -3px 6px rgba(0, 0, 0, 0.12);
  outline: 1px solid transparent; outline-offset: 4px;
  transition: outline-color 200ms ease, transform 160ms var(--ease-out);
}
.swatch--stone .swatch__dot { background: conic-gradient(from 20deg, var(--a), var(--b), var(--a), var(--b), var(--a), var(--b), var(--a)); }
.swatch input:checked + label { color: var(--ink); }
.swatch input:checked + label .swatch__dot { outline-color: var(--ink); }
.swatch input:focus-visible + label .swatch__dot { outline: 2px solid var(--emerald); }
.swatch label:active .swatch__dot { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .swatch label:hover .swatch__dot { transform: translateY(-2px); } }

.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.seg { position: relative; flex: 1 1 0; min-width: 0; }
.seg label {
  display: grid; place-items: center; min-height: 48px; padding: 0 10px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--ivory); font-size: 15px;
  transition: background-color 200ms ease, color 200ms ease, border-color 200ms ease, transform 160ms var(--ease-out);
}
.seg input:checked + label { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.seg input:focus-visible + label { outline: 2px solid var(--emerald); outline-offset: 2px; }
.seg label:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .seg input:not(:checked) + label:hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); } }

.engrave { position: relative; }
.engrave input {
  width: 100%; min-height: 52px; padding: 0 64px 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--ivory);
  font: italic 400 20px var(--serif); color: var(--ink); transition: border-color 200ms ease, box-shadow 200ms ease;
}
.engrave input::placeholder { color: var(--ink-3); opacity: 1; }
.engrave input:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 18%, transparent); }
.engrave input[aria-invalid="true"] { border-color: #9B2C1F; }
.engrave__count { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--ink-3); }
.engrave-preview { margin: 0; padding: 8px 0 0; border-radius: 12px; background: linear-gradient(180deg, var(--stone) 0%, color-mix(in srgb, var(--stone) 40%, var(--ivory)) 100%); }
.engrave-preview svg { width: 100%; height: auto; }
.engrave-preview__band { fill: none; stroke: var(--gold); stroke-width: 26; stroke-linecap: round; opacity: 0.28; }
.engrave-preview__line { fill: none; stroke: none; }
.engrave-preview__text { font: italic 400 26px var(--serif); fill: var(--gold-text); letter-spacing: 0.06em; transition: opacity 200ms ease; }
.engrave-preview__text.is-empty { opacity: 0.55; }

.price { border-top: 1px solid var(--line); padding-top: 22px; display: grid; gap: 4px; }
.price__label { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.price__total { font-family: var(--serif); font-size: clamp(2.4rem, 3.6vw, 3.2rem); line-height: 1.05; letter-spacing: -0.02em; }
.price__rows { margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.price__rows div { display: flex; justify-content: space-between; gap: 16px; }
.price__rows dt, .price__rows dd { margin: 0; }
.price__rows dd { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 28px;
  border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; font-size: 16px; font-weight: 500; letter-spacing: 0.01em;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--emerald); color: #F7F3EC; box-shadow: 0 10px 24px -14px rgba(30, 77, 62, 0.8); }
@media (hover: hover) and (pointer: fine) { .btn--primary:hover { background: var(--emerald-2); } }
.btn[aria-disabled="true"], .btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn__label { transition: filter 200ms ease, opacity 200ms ease; }
.btn.is-busy .btn__label { filter: blur(2px); opacity: 0.6; }
.panel .btn { width: 100%; }
.assure { font-size: 13px; color: var(--ink-2); text-align: center; margin-top: -14px; }

/* ---------- Oficio ---------- */
.section-title { font-size: clamp(2.2rem, 4.6vw, 4rem); max-width: 14ch; }
.craft { padding: clamp(96px, 14vw, 180px) calc(var(--gutter) + var(--safe-r)) clamp(64px, 10vw, 140px) calc(var(--gutter) + var(--safe-l)); background: var(--ivory); position: relative; z-index: 3; }
.craft__grid { margin-top: clamp(48px, 7vw, 96px); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2.4vw, 36px); row-gap: clamp(56px, 8vw, 120px); }
.craft__item { display: grid; gap: 22px; align-content: start; }
.craft__item--a { grid-column: 1 / span 7; }
.craft__item--b { grid-column: 9 / span 4; margin-top: clamp(80px, 14vw, 220px); }
.craft__item--c { grid-column: 3 / span 5; }
.craft__media { margin: 0; overflow: hidden; border-radius: 4px; background: var(--stone); }
.craft__media img { width: 100%; transition: transform 1200ms var(--ease-out); }
.craft__item--b .craft__media img { aspect-ratio: 2 / 3; object-fit: cover; }
.craft__text { max-width: 30rem; display: grid; gap: 10px; }
.craft__text h3 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.craft__text p { color: var(--ink-2); }

/* ---------- Reseñas ---------- */
.reviews { padding: clamp(64px, 10vw, 140px) calc(var(--gutter) + var(--safe-r)) clamp(80px, 12vw, 160px) calc(var(--gutter) + var(--safe-l)); background: var(--stone); position: relative; z-index: 3; }
.reviews__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.reviews__score { color: var(--ink-2); font-size: 15px; }
.reviews__score .num { font-family: var(--serif); font-size: 28px; color: var(--ink); margin-right: 4px; }
.reviews__list { list-style: none; margin: clamp(40px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.review { display: grid; gap: 16px; align-content: start; padding-top: 22px; border-top: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); }
.review__stars { color: var(--gold-text); letter-spacing: 0.18em; font-size: 13px; }
.review__off { color: color-mix(in srgb, var(--gold-text) 30%, transparent); }
.review blockquote { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 1.8vw, 1.5rem); line-height: 1.3; }
.review__who { font-size: 14px; font-weight: 500; }
.review__who span { display: block; font-weight: 400; color: var(--ink-2); }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink); color: #EDE7DC; padding: 56px calc(var(--gutter) + var(--safe-r)) calc(40px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); position: relative; z-index: 3; font-size: 14px; }
.site-footer a { color: #F7F3EC; }
.site-footer__top { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-bottom: 32px; border-bottom: 1px solid rgba(247, 243, 236, 0.16); }
.brand--footer .brand__sub { color: #C9C0B2; }
.site-footer__fict { color: #C9C0B2; }
.wa { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(247, 243, 236, 0.3); text-decoration: none; font-size: 13px; transition: border-color 160ms ease, transform 160ms var(--ease-out); }
.wa:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .wa:hover { border-color: #F7F3EC; } }
.site-footer__cols { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px 48px; padding-top: 28px; align-items: start; }
.site-footer__cols nav { display: grid; gap: 8px; }
.site-footer__cols nav a { text-decoration: none; color: #EDE7DC; }
.credits { color: #C9C0B2; max-width: 62ch; line-height: 1.55; }
.site-footer__made { color: #C9C0B2; }

/* ---------- Panel del carrito ---------- */
dialog { padding: 0; border: 0; color: var(--ink); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(28, 26, 23, 0.32); }
.drawer { margin: 0 0 0 auto; height: 100dvh; width: min(440px, 100vw); }
.drawer[open] { display: block; }
.drawer__panel {
  height: 100%; background: var(--ivory); display: grid; grid-template-rows: auto 1fr auto;
  box-shadow: -30px 0 60px -30px rgba(28, 26, 23, 0.35);
  padding-top: var(--safe-t); padding-right: var(--safe-r);
}
.drawer[open] .drawer__panel { animation: drawer-in 420ms var(--ease-drawer); }
.drawer[open]::backdrop { animation: fade-in 300ms ease; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 28px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; cursor: pointer; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.icon-btn:active { transform: scale(0.94); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--stone); } }
.cart__list { list-style: none; margin: 0; padding: 8px 24px; overflow-y: auto; overscroll-behavior: contain; }
.cart__empty { padding: 24px; color: var(--ink-2); }
.cart__empty[hidden] { display: none; }
.cart__list:empty { display: none; }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line__thumb { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; background: radial-gradient(circle at 50% 40%, #fff, var(--stone)); }
.line__title { font-family: var(--serif); font-size: 18px; line-height: 1.2; }
.line__meta { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--ink-2); line-height: 1.5; overflow-wrap: anywhere; }
.line__foot { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.line__price { font-size: 15px; white-space: nowrap; }
.line__qty { font-size: 13px; color: var(--ink-2); }
.line__remove { border: 0; background: none; padding: 8px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty__btn { width: 36px; height: 36px; border: 0; background: none; cursor: pointer; font-size: 16px; border-radius: 50%; }
.qty__btn:active { background: var(--stone); }
.qty__val { min-width: 20px; text-align: center; font-size: 14px; }
.drawer__foot { padding: 20px 24px calc(20px + var(--safe-b)); border-top: 1px solid var(--line); display: grid; gap: 10px; }
.drawer__total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; }
.drawer__total strong { font-family: var(--serif); font-weight: 400; font-size: 28px; }
.drawer__note { font-size: 13px; color: var(--ink-2); }

/* ---------- Modal de tallas ---------- */
.modal { margin: auto; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.modal__panel { background: var(--ivory); border-radius: 14px; padding: 28px; overflow-y: auto; max-height: calc(100dvh - 32px); box-shadow: 0 40px 80px -40px rgba(28, 26, 23, 0.5); }
.modal[open] .modal__panel { animation: modal-in 260ms var(--ease-out); }
.modal[open]::backdrop { animation: fade-in 200ms ease; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.96) translateY(8px); } }
.modal__head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.modal__head h2 { font-size: 30px; }
.guide { margin: 20px 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--ink-2); }
.guide strong { color: var(--ink); font-weight: 500; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.guide-table caption { text-align: left; font-size: 13px; color: var(--ink-3); padding-bottom: 10px; caption-side: top; }
.guide-table th, .guide-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.guide-table thead th { font-weight: 500; font-size: 13px; color: var(--ink-2); }
.guide-table tbody th { font-family: var(--serif); font-weight: 400; font-size: 18px; }
.guide-tip { margin-top: 16px; font-size: 14px; color: var(--ink-2); }

/* ---------- Aviso emergente ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--ivory); padding: 12px 18px; border-radius: 999px; font-size: 14px; pointer-events: none;
  transition: opacity 300ms ease, transform 400ms var(--ease-out);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Aparición al hacer scroll ---------- */
.reveal { opacity: 1; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .craft__item.reveal .craft__media img { transform: scale(1.06); }
.js .craft__item.reveal.is-in .craft__media img { transform: none; }

/* ---------- Páginas interiores ---------- */
.notice { background: var(--emerald); color: #F7F3EC; text-align: center; font-size: 13px; padding: calc(8px + var(--safe-t)) 16px 8px; letter-spacing: 0.02em; }
.page .site-header { position: sticky; top: 0; }
.page .site-header.is-scrolled, .page .site-header { background: color-mix(in srgb, var(--ivory) 94%, transparent); }
.page-main { padding: clamp(32px, 6vw, 72px) calc(var(--gutter) + var(--safe-r)) clamp(64px, 10vw, 120px) calc(var(--gutter) + var(--safe-l)); }
.page-title { font-size: clamp(2.4rem, 5vw, 4rem); }
.prose { max-width: 68ch; display: grid; gap: 16px; color: var(--ink-2); }
.prose h1 { color: var(--ink); margin-bottom: 8px; }
.prose h2 { color: var(--ink); font-size: clamp(1.5rem, 2.4vw, 2rem); margin-top: 28px; scroll-margin-top: 100px; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose strong { color: var(--ink); font-weight: 500; }
.prose .updated { font-size: 14px; color: var(--ink-3); }

/* Checkout */
.checkout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(32px, 5vw, 80px); align-items: start; margin-top: 32px; }
.form { display: grid; gap: 32px; }
.form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; min-width: 0; }
.form legend { font-family: var(--serif); font-size: 26px; padding: 0; margin-bottom: 4px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select {
  min-height: 50px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--stone-2); background: var(--ivory-2);
  font: 400 16px var(--sans); color: var(--ink); width: 100%; transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px color-mix(in srgb, var(--emerald) 18%, transparent); }
.field input[aria-invalid="true"] { border-color: #9B2C1F; }
.field__err { font-size: 13px; color: #9B2C1F; min-height: 0; }
.field__err:empty { display: none; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card-demo { padding: 20px; border-radius: 12px; border: 1px dashed var(--stone-2); background: var(--ivory-2); display: grid; gap: 14px; }
.card-demo .field input { background: var(--stone); color: var(--ink-2); }
.card-demo__note { font-size: 14px; color: var(--ink); display: flex; gap: 10px; align-items: start; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.summary { position: sticky; top: calc(var(--header-h) + 24px); background: var(--ivory-2); border-radius: 14px; padding: 28px; box-shadow: 0 30px 60px -44px rgba(60, 45, 20, 0.4), 0 0 0 1px var(--line); }
.summary h2 { font-size: 26px; }
.summary .cart__list { padding: 0; overflow: visible; }
.summary__rows { margin: 16px 0 0; display: grid; gap: 8px; font-size: 15px; }
.summary__rows div { display: flex; justify-content: space-between; }
.summary__rows dt, .summary__rows dd { margin: 0; }
.summary__total { padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--serif); font-size: 26px; }
.form-error { color: #9B2C1F; font-size: 14px; }
.form-error:empty { display: none; }
.empty-state { display: grid; gap: 16px; justify-items: start; max-width: 40ch; }

/* Confirmación y 404 */
.center-page { min-height: calc(100svh - 200px); display: grid; place-items: center; text-align: center; padding: 48px calc(var(--gutter) + var(--safe-r)) 64px calc(var(--gutter) + var(--safe-l)); }
.center-page__inner { display: grid; gap: 18px; justify-items: center; max-width: 560px; }
.center-page h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.center-page p { color: var(--ink-2); }
.order-no { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.order-no strong { color: var(--ink); letter-spacing: 0.04em; }
.confirm-list { list-style: none; padding: 0; margin: 8px 0; width: 100%; text-align: left; }
.ring-mark { width: 92px; height: 92px; }

/* ---------- Escritorio vs móvil ---------- */
@media (max-width: 899px) {
  :root { --header-h: 56px; }
  body { font-size: 16px; }
  .site-nav { display: none; }
  .cart-btn { margin-left: auto; }
  .brand__name { font-size: 24px; }
  .site-header { background: color-mix(in srgb, var(--ivory) 94%, transparent); }

  .stage { top: calc(var(--header-h) + var(--safe-t)); height: 48svh; z-index: 5; background: var(--ivory); box-shadow: 0 1px 0 var(--line); }
  .stage__hint { bottom: 12px; }
  .ar-btn { left: auto; right: 12px; bottom: 12px; transform: none; min-height: 40px; padding: 0 14px; font-size: 13px; }
  .ar-btn:active { transform: scale(0.97); }
  .stage__price { display: block; position: absolute; left: 14px; bottom: 12px; font-family: var(--serif); font-size: 22px; background: color-mix(in srgb, var(--ivory-2) 90%, transparent); padding: 4px 12px; border-radius: 999px; }
  .stage__hint { display: none; }
  .journey { padding-top: calc(var(--header-h) + var(--safe-t)); }
  .journey__content { margin-top: 0; pointer-events: auto; }
  .hero { min-height: 0; padding-top: 28px; padding-bottom: 40px; grid-template-columns: 1fr; gap: 14px; }
  .hero__title { font-size: clamp(3.4rem, 17vw, 5.5rem); }
  .hero__aside { padding-bottom: 0; }
  .config { grid-template-columns: 1fr; min-height: 0; padding-bottom: 64px; }
  .config__spacer { display: none; }
  .panel { grid-column: 1; margin-top: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; gap: 28px; }
  .swatches { gap: 6px; justify-content: space-between; }
  .swatch label { width: 70px; }
  .segmented--sizes .seg { flex: 1 1 0; }
  .craft__grid { grid-template-columns: 1fr; }
  .craft__item--a, .craft__item--b, .craft__item--c { grid-column: 1; margin-top: 0; }
  .craft__item--b .craft__media img { aspect-ratio: 4 / 5; }
  .reviews__list { grid-template-columns: 1fr; }
  .site-footer__cols { grid-template-columns: 1fr; }
  .wa { margin-left: 0; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; padding: 20px; }
  .row2 { grid-template-columns: 1fr; }
  .modal__panel { padding: 22px; }
}
@media (min-width: 900px) and (max-width: 1180px) {
  .config { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .js .reveal { transform: none; transition: opacity 400ms ease; }
  .js .craft__item.reveal .craft__media img { transform: none; }
  .sparkle { display: none; }
}
