/* ============================================================
   MILÓS — Sistema visual
   Dirección: negro cálido + oro + marfil. Lo contrario de las joyerías
   colombianas que se revisaron (Tres Cruces, Elite, La Guaca): todas
   fondo blanco, grilla cargada y etiquetas de descuento.
   Aquí la joya se mira contra el negro, que es donde el metal brilla.

   Referencias de afuera que se copian a propósito:
   · Marca gigante en didone con brillo que la recorre (alta joyería europea).
   · Mayúsculas muy espaciadas en navegación y etiquetas (Bvlgari, APM Mónaco).
   · Franja que corre arriba con las condiciones (se vio en Elite, aquí en oro).
   · Oro solo como acento: líneas, bordes y un botón. Nunca en párrafos largos.

   Tipografías: Italiana (marca) + Jost (todo lo demás). Las dos OFL,
   guardadas en fonts/ (la CSP no deja cargarlas de afuera).
   ============================================================ */

@font-face {
  font-family: "Italiana";
  src: url("fonts/Italiana.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("fonts/Jost.ttf") format("truetype");
  font-weight: 100 900; font-display: swap;
}

:root {
  /* Ancho de la marca ÷ su tamaño de letra. Medido en el navegador: "MILÓS" en
     Italiana con 0,03em de separación da 3,269 (incluido el espacio sobrante de la
     última letra). Se usa 3,20 para que la marca llegue casi al borde. */
  --hero-ancho: 3.20;

  /* --- Paleta --- */
  --noche: #0a0908;        /* fondo: negro cálido, no negro puro */
  --carbon: #131110;       /* recuadros y fotos */
  --humo: #1b1816;         /* superficies un escalón arriba */
  --linea: #2b2521;        /* separadores */
  --marfil: #f4efe5;       /* texto principal */
  --niebla: #948c82;       /* texto secundario */
  --oro: #d6ae62;
  --oro-claro: #f3dca4;
  --oro-hondo: #a06d2a;

  /* Nombres que usan la plantilla y app.js */
  --ink: var(--marfil);
  --paper: var(--noche);
  --tile: var(--carbon);
  --line: var(--linea);
  --muted: var(--niebla);
  --field: #15120f;
  --wa: #0f6b45;                                /* verde WhatsApp apagado: se reconoce sin romper el negro y el oro */
  --danger: #e5705f;

  --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);

  --gutter: clamp(16px, 2.4vw, 34px);
  --font: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --serif: "Italiana", "Didot", "Bodoni MT", Georgia, serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-padding-top: calc(var(--header-h, 64px) + 12px);
  background: var(--noche);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* El sitio no se mueve hacia los costados en el celular. */
html, body { overflow-x: hidden; overscroll-behavior-x: none; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }

body {
  margin: 0;
  background: var(--noche);
  color: var(--marfil);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 3px; }

button, a, [role="button"], summary { touch-action: manipulation; }
button, [role="button"], summary { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--oro); color: var(--noche); padding: 10px 14px; z-index: 100; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; }

/* Mayúsculas muy espaciadas: el gesto tipográfico de la alta joyería */
.section-label, .nav a, .chip, .card__name, .modal__col, .ticker, .hero__kicker, .hero__cols a {
  text-transform: uppercase; letter-spacing: 0.22em; font-weight: 400;
}
.muted { color: var(--niebla); }
.small { font-size: 13px; }

/* Texto con el degradado del metal (marca y números grandes) */
.oro-metal {
  background-image: linear-gradient(100deg, #9c6a28 0%, #f3dca4 26%, #d6ae62 42%, #fdf0cd 55%, #c08a3e 72%, #e8cd93 100%);
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .oro-metal { color: var(--oro); -webkit-text-fill-color: var(--oro); }
}

/* ============ Entrada (primera visita de la sesión) ============
   0–220ms    negro
   220–1100   el monograma aparece y crece apenas
   500–1300   la marca entra: opacidad + desenfoque 10px→0
   900–1500   la línea de materiales aparece
   2000–2650  el telón sube y deja ver la portada
   Tocar la pantalla la salta. */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: var(--noche); cursor: pointer;
  animation: telon 650ms var(--ease-in-out) 2000ms forwards;
}
.intro__box { display: grid; justify-items: center; gap: 0; padding: 0 var(--gutter); }
/* Medido sobre el archivo (1080×1080): el monograma ocupa el 14,6% del ancho y el
   37,2% del alto, centrado en 50% / 47,6%. La caja lo recorta y la imagen crece
   530% para que el monograma quede a un tamaño que se lea. */
.intro__marca {
  display: block; position: relative; overflow: hidden;
  width: clamp(46px, 5.8vw, 60px); aspect-ratio: 56 / 122;
  /* La animación de abajo aísla la mezcla, así que el fondo tiene que estar acá
     para que el negro del archivo se funda con el de la pantalla. */
  background: var(--noche);
  opacity: 0; transform: scale(0.88);
  animation: logo-in 900ms var(--ease-out) 220ms forwards;
}
.intro__logo {
  position: absolute; left: 50%; top: 50%;
  width: 530%; max-width: none; height: auto;
  /* El centro del monograma está al 47,6% del alto del archivo, no al 50%:
     se corre la imagen para que ese punto caiga en el centro de la caja. */
  transform: translate(-50%, -47.6%);
  mix-blend-mode: screen;  /* el fondo negro del archivo desaparece y solo queda el oro */
}
.intro__word {
  /* Más chica que la de la portada a propósito: la marca enorme es el momento del hero. */
  margin: 24px 0 0;
  font-family: var(--serif); text-transform: uppercase; white-space: nowrap;
  font-size: min(calc((100vw - 2 * var(--gutter)) / 4.1), 250px);
  line-height: 0.9; letter-spacing: 0.06em;
  opacity: 0;
  animation: palabra 800ms var(--ease-out) 500ms forwards;
}
.intro__sub {
  margin: 14px 0 0; font-size: clamp(9px, 1.5vw, 11px); color: var(--oro);
  text-transform: uppercase; letter-spacing: 0.4em; opacity: 0;
  animation: fade-in 600ms ease 900ms forwards;
}
@keyframes logo-in { to { opacity: 1; transform: scale(1); } }
@keyframes palabra {
  from { opacity: 0; transform: translateY(8%); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes telon { to { transform: translateY(-100%); } }
.intro.saltar { animation: telon 380ms var(--ease-in-out) forwards; }
.intro-vista .intro { display: none; }
@media (prefers-reduced-motion: reduce) {
  .intro { animation: desvanecer 300ms ease 1200ms forwards; }
  .intro__word, .intro__marca, .intro__sub { animation: aparecer 300ms ease forwards; }
  .intro.saltar { animation: desvanecer 200ms ease forwards; }
}
@keyframes desvanecer { to { opacity: 0; visibility: hidden; } }
@keyframes aparecer { to { opacity: 1; transform: none; } }
@keyframes fade-in { to { opacity: 1; } }

/* ============ Franja que corre ============ */
.ticker {
  position: relative; overflow: hidden;
  background: var(--noche);
  border-bottom: 1px solid color-mix(in srgb, var(--oro) 22%, transparent);
  color: var(--oro);
  font-size: 10px; letter-spacing: 0.32em;
  padding: 9px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: correr 38s linear infinite; }
.ticker__row { display: flex; align-items: center; white-space: nowrap; }
.ticker__row > span { padding: 0 18px; }
.ticker__row > i { font-style: normal; font-size: 7px; color: color-mix(in srgb, var(--oro) 55%, transparent); }
@keyframes correr { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ============ Header ============ */
.header {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--noche) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--oro) 12%, transparent);
}
.nav { display: flex; gap: 26px; font-size: 10px; }
.nav a { text-decoration: none; position: relative; padding: 6px 0; color: var(--marfil); opacity: 0.82; transition: opacity 160ms ease; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--oro);
  transform: scaleX(0); transform-origin: left; transition: transform 240ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { opacity: 1; }
  .nav a:hover::after { transform: scaleX(1); }
}
@media (max-width: 760px) { .nav__hide-sm { display: none; } .nav { gap: 14px; font-size: 10px; letter-spacing: 0.16em; } }

.wordmark {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vw, 30px); line-height: 1;
  letter-spacing: 0.34em; margin-right: -0.34em;
  text-decoration: none; text-transform: uppercase; color: var(--marfil);
  transition: color 240ms ease;
}
@media (hover: hover) and (pointer: fine) { .wordmark:hover { color: var(--oro); } }

.cart-btn {
  justify-self: end; position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; margin-right: -8px;
  background: none; border: none; padding: 0;
  transition: transform 160ms var(--ease-out);
}
.cart-btn__icon { fill: none; stroke: var(--marfil); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke 200ms ease; }
.cart-btn__icon circle { fill: var(--marfil); stroke: none; transition: fill 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .cart-btn:hover .cart-btn__icon { stroke: var(--oro); }
  .cart-btn:hover .cart-btn__icon circle { fill: var(--oro); }
}
.cart-btn .cart-btn__count { position: absolute; top: 0; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; font-size: 10px; border-radius: 9px; }
.cart-btn .cart-btn__count:empty, .cart-btn .cart-btn__count[data-n="0"] { display: none; }
.cart-btn:active { transform: scale(0.94); }
.cart-btn__count {
  display: inline-grid; place-items: center;
  background: var(--oro); color: var(--noche); font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.cart-btn__count.bump { animation: bump 320ms var(--ease-out); }
@keyframes bump { 40% { transform: scale(1.28); } }

/* ============ Portada ============ */
.hero {
  position: relative; isolation: isolate;
  background: var(--noche); color: var(--marfil);
  padding: clamp(44px, 8vw, 110px) var(--gutter) 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: clamp(460px, 76svh, 840px);
  overflow: hidden;
}
/* Luz tibia detrás de la marca, como la vitrina de una joyería */
.hero__glow {
  position: absolute; z-index: -1; left: 50%; top: 42%;
  width: min(1100px, 130vw); aspect-ratio: 1.6 / 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--oro) 20%, transparent) 0%, color-mix(in srgb, var(--oro) 7%, transparent) 38%, transparent 68%);
  pointer-events: none;
  animation: respirar 9s ease-in-out infinite;
}
@keyframes respirar {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.85; }
  50% { transform: translate(-50%, -50%) scale(1.09); opacity: 1; }
}
/* Chispas: cinco destellos lentos, como el reflejo de una piedra */
.hero__chispas { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__chispas i {
  position: absolute; width: 3px; height: 3px; border-radius: 50%;
  background: var(--oro-claro); opacity: 0;
  box-shadow: 0 0 8px 2px color-mix(in srgb, var(--oro-claro) 60%, transparent);
  animation: chispa 7s ease-in-out infinite;
}
.hero__chispas i:nth-child(1) { left: 12%; top: 28%; animation-delay: 0s; }
.hero__chispas i:nth-child(2) { left: 78%; top: 20%; animation-delay: 1.6s; }
.hero__chispas i:nth-child(3) { left: 32%; top: 66%; animation-delay: 3.1s; }
.hero__chispas i:nth-child(4) { left: 64%; top: 72%; animation-delay: 4.4s; }
.hero__chispas i:nth-child(5) { left: 90%; top: 52%; animation-delay: 5.5s; }
@keyframes chispa {
  0%, 86%, 100% { opacity: 0; transform: scale(0.4); }
  91% { opacity: 1; transform: scale(1.5); }
  96% { opacity: 0; transform: scale(0.5); }
}

.hero__kicker {
  margin: 0 0 auto; display: flex; gap: 0; align-items: center;
  font-size: 10px; color: var(--niebla);
  opacity: 0; animation: subir 700ms var(--ease-out) var(--intro-pausa, 2250ms) forwards;
}
.hero__kicker span + span::before { content: "—"; margin: 0 12px; color: color-mix(in srgb, var(--oro) 60%, transparent); }

.hero__word {
  font-family: var(--serif); text-transform: uppercase; white-space: nowrap;
  font-size: min(calc((100vw - 2 * var(--gutter)) / var(--hero-ancho, 3.3)), 420px);
  line-height: 0.88; letter-spacing: 0.03em;
  margin: 0 0 0 -0.02em; padding-bottom: 0.04em;
  opacity: 0; animation: subir 1000ms var(--ease-out) var(--intro-pausa, 2250ms) forwards;
}
@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero__claim {
  margin: 18px 0 0; font-size: clamp(11px, 1.5vw, 13px); color: var(--marfil);
  text-transform: uppercase; letter-spacing: 0.3em; font-weight: 300;
  opacity: 0; animation: subir 700ms var(--ease-out) calc(var(--intro-pausa, 2250ms) + 180ms) forwards;
}
.hero__claim i { font-style: normal; color: var(--oro); margin: 0 6px; }
/* En pantallas muy angostas la línea de materiales entra en un solo renglón. */
@media (max-width: 400px) { .hero__claim { letter-spacing: 0.14em; font-size: 10px; } }

.hero__cols {
  list-style: none; margin: clamp(30px, 4.5vw, 64px) calc(var(--gutter) * -1) 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid color-mix(in srgb, var(--oro) 20%, transparent);
}
.hero__cols li + li { border-left: 1px solid color-mix(in srgb, var(--oro) 20%, transparent); }
.hero__cols a {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 10px;
  padding: 20px var(--gutter); text-decoration: none;
  font-size: clamp(10px, 1.1vw, 12px); color: var(--marfil);
  transition: color 260ms ease;
}
.hero__cols a::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--oro); transform: scaleY(0); transform-origin: bottom;
  transition: transform 340ms var(--ease-out);
}
.hero__cols a span:first-child { margin-right: auto; }
.hero__cols a::after { content: "→"; font-size: 1.2em; color: var(--oro); transition: transform 300ms var(--ease-out), color 260ms ease; }
@media (hover: hover) and (pointer: fine) {
  .hero__cols a:hover { color: var(--noche); }
  .hero__cols a:hover::before { transform: scaleY(1); }
  .hero__cols a:hover::after { transform: translateX(6px); color: var(--noche); }
}
@media (max-width: 760px) {
  .hero__cols { grid-template-columns: 1fr; }
  .hero__cols li + li { border-left: none; border-top: 1px solid color-mix(in srgb, var(--oro) 20%, transparent); }
  .hero__cols a { padding: 17px var(--gutter); }
}

/* ============ Etiquetas de sección ============ */
.section-label {
  font-size: 10px; letter-spacing: 0.34em; color: var(--niebla);
  display: inline-flex; align-items: center; gap: 14px;
}
.section-label::after {
  content: ""; width: clamp(40px, 7vw, 110px); height: 1px; background: var(--oro);
  transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease-out) 120ms;
}
.section-label.revelado::after { transform: scaleX(1); }

/* ============ Sellos ============ */
.sellos { padding: clamp(56px, 8vw, 100px) var(--gutter); border-top: 1px solid var(--linea); }
.sellos__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .sellos__list { grid-template-columns: 1fr; gap: 34px; } }
.sello-card svg { fill: none; stroke: var(--oro); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; overflow: visible; }
/* pathLength="100" en el SVG: cada trazo mide "100" sin importar su largo real,
   así todos se dibujan completos y al mismo ritmo. */
.sello-card .trazo { stroke-dasharray: 100; stroke-dashoffset: 100; }
.sello-card .trazo--2 { stroke-dasharray: 100; stroke-dashoffset: 100; }
.sello-card.revelado .trazo { animation: dibujar 1100ms var(--ease-in-out) forwards; }
.sello-card.revelado .trazo--2 { animation: dibujar 800ms var(--ease-in-out) 420ms forwards; }
@keyframes dibujar { to { stroke-dashoffset: 0; } }
.sello-card h3 { margin: 18px 0 8px; font-family: var(--serif); font-size: clamp(21px, 2.4vw, 27px); letter-spacing: 0.04em; color: var(--marfil); }
.sello-card p { margin: 0; color: var(--niebla); font-size: 14px; max-width: 36ch; }

/* ============ Colecciones ============ */
.collections { padding: clamp(40px, 6vw, 70px) var(--gutter) clamp(56px, 8vw, 96px); border-top: 1px solid var(--linea); }
.collections .section-label { margin-bottom: 22px; }
.collections__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
@media (max-width: 860px) { .collections__grid { grid-template-columns: 1fr; } }
.tile {
  width: 100%; border: 1px solid var(--linea); padding: 22px; text-align: left;
  min-height: clamp(230px, 27vw, 390px); background: var(--carbon); color: var(--marfil); gap: 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  transition: border-color 320ms ease, transform 260ms var(--ease-out);
}
.tile::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 110%, color-mix(in srgb, var(--oro) 18%, transparent), transparent 62%);
  opacity: 0; transition: opacity 400ms ease;
}
.tile:active { transform: scale(0.99); }
.tile__top { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--niebla); position: relative; z-index: 1; }
.tile__top span:last-child { color: var(--oro); }
.tile__name {
  margin: 0; position: relative; z-index: 1;
  font-family: var(--serif); text-transform: uppercase;
  font-size: clamp(32px, 4.4vw, 62px); line-height: 0.95; letter-spacing: 0.04em;
  transition: color 320ms ease;
}
.tile__mark {
  position: absolute; right: 0.02em; bottom: -0.22em;
  font-family: var(--serif); font-size: clamp(180px, 21vw, 320px); line-height: 1;
  color: var(--oro); opacity: 0.07; pointer-events: none;
  transition: opacity 400ms ease, transform 600ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .tile:hover { border-color: color-mix(in srgb, var(--oro) 55%, transparent); }
  .tile:hover::before { opacity: 1; }
  .tile:hover .tile__name { color: var(--oro-claro); }
  .tile:hover .tile__mark { opacity: 0.16; transform: translateY(-6px); }
}
@media (max-width: 860px) { .tile { min-height: 172px; } }
.tile { container-type: inline-size; }
.tile__name { overflow-wrap: anywhere; font-size: clamp(24px, calc(100cqi / var(--largo, 9) * 1.15), 62px); }

/* ============ Tienda ============ */
.shop { padding-bottom: clamp(70px, 9vw, 110px); border-top: 1px solid var(--linea); }
.shop__bar {
  position: sticky; top: var(--header-h, 61px); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--noche) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linea);
}
.shop__bar .section-label::after { display: none; }
.shop__count { color: var(--oro); letter-spacing: 0.1em; }
.filters { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter); }
.filters::-webkit-scrollbar { display: none; }
.chip {
  position: relative; overflow: hidden; isolation: isolate;
  flex: none; border: 1px solid color-mix(in srgb, var(--oro) 35%, transparent); background: transparent; color: var(--marfil);
  padding: 0 18px; min-height: 38px; font-size: 10px;
  transition: color 240ms ease, border-color 240ms ease, transform 160ms var(--ease-out);
}
.chip::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--oro);
  transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease-out);
}
.chip:active { transform: scale(0.96); }
.chip[aria-pressed="true"] { color: var(--noche); border-color: var(--oro); }
.chip[aria-pressed="true"]::before { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .chip:not([aria-pressed="true"]):hover { border-color: var(--oro); color: var(--oro-claro); }
}
@media (max-width: 760px) { .filters { width: 100%; } }

/* Grilla */
.grid {
  list-style: none; margin: 0; padding: clamp(18px, 3vw, 34px) var(--gutter) 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(26px, 3vw, 44px) clamp(14px, 2vw, 26px);
}
@media (max-width: 860px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; } }

.card { display: block; width: 100%; padding: 0; border: none; background: none; text-align: left; }
.card__media {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--carbon);
  border: 1px solid var(--linea);
  transition: border-color 360ms ease;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 520ms var(--ease-out); }
/* Luz que cruza la foto al pasar el mouse: el reflejo que uno busca en una joya */
.card__media::after {
  content: ""; position: absolute; inset: -40% -60%; pointer-events: none;
  background: linear-gradient(72deg, transparent 42%, color-mix(in srgb, var(--oro-claro) 26%, transparent) 50%, transparent 58%);
  transform: translateX(-120%); opacity: 0;
  transition: transform 700ms var(--ease-out), opacity 300ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover .card__media { border-color: color-mix(in srgb, var(--oro) 50%, transparent); }
  .card:hover .card__media img { transform: scale(1.05); }
  .card:hover .card__media::after { transform: translateX(120%); opacity: 1; }
  .card:hover .card__name { color: var(--oro-claro); }
}
.card:active .card__media { transform: scale(0.99); }

.badge {
  position: absolute; top: 12px; left: 12px; z-index: 1;
  background: var(--oro); color: var(--noche);
  padding: 4px 9px; font-size: 9px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
}
.badge--sold { background: color-mix(in srgb, var(--noche) 82%, transparent); color: var(--marfil); border: 1px solid var(--linea); }
.badge--nuevo { background: transparent; color: var(--oro); border: 1px solid var(--oro); }
.card__info { padding: 14px 2px 0; }
.card__name {
  margin: 0; font-size: 11px; letter-spacing: 0.18em; overflow-wrap: anywhere; color: var(--marfil);
  transition: color 240ms ease;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.card__material { margin: 5px 0 0; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--niebla); }
.card__price { margin: 7px 0 0; font-size: 14px; color: var(--oro); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
.card--sold .card__media img, .card--sold .ph { opacity: 0.35; }
.card--sold .card__price { color: var(--niebla); }

/* Recuadro provisorio (hasta que lleguen las fotos) */
.ph {
  width: 100%; height: 100%; display: grid; place-items: center; position: relative;
  background: linear-gradient(150deg, #16130f 0%, #0d0b0a 55%, #191410 100%);
  color: color-mix(in srgb, var(--oro) 30%, transparent); font-family: var(--serif);
  font-size: clamp(74px, 11vw, 150px); line-height: 1; user-select: none;
}
.ph__num {
  position: absolute; right: 12px; bottom: 12px;
  font-family: var(--font); font-size: 10px; letter-spacing: 0.14em; color: var(--niebla);
}

/* Entrada del catálogo */
.grid > li { animation: rise 460ms var(--ease-out) both; animation-delay: var(--d, 0ms); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .grid > li { animation: fade 200ms ease both; animation-delay: 0ms; } }

/* ============ La ley ============ */
.ley { padding: clamp(56px, 8vw, 110px) var(--gutter); border-top: 1px solid var(--linea); background: var(--carbon); }
.ley .section-label { margin-bottom: 30px; }
.ley__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(26px, 4vw, 70px); }
@media (max-width: 860px) { .ley__grid { grid-template-columns: 1fr; gap: 42px; } }
.ley__card { border-top: 1px solid color-mix(in srgb, var(--oro) 35%, transparent); padding-top: 22px; }
.ley__card h3 { margin: 14px 0 12px; font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--marfil); }
.ley__card p { margin: 0 0 12px; color: var(--niebla); max-width: 46ch; font-size: 14px; }
/* Va después de ".ley__card p" a propósito: si no, el tamaño de párrafo le gana al número. */
.ley__card .ley__num {
  margin: 0; font-family: var(--serif); font-size: clamp(54px, 8vw, 104px); line-height: 0.9; letter-spacing: 0.02em;
  max-width: none;
}
.ley__cuidado { color: color-mix(in srgb, var(--marfil) 72%, var(--niebla)) !important; border-left: 1px solid color-mix(in srgb, var(--oro) 45%, transparent); padding-left: 14px; }

/* ============ Nosotros / Contacto ============ */
.about, .contact { padding: clamp(50px, 7vw, 96px) var(--gutter); border-top: 1px solid var(--linea); }
.about__text {
  margin: 30px 0 0; max-width: 18ch;
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 92px); line-height: 1.02; letter-spacing: 0.01em;
}
.about__body { margin: 26px 0 0; max-width: 58ch; color: var(--niebla); font-size: 15px; }
.contact__list { list-style: none; padding: 0; margin: 28px 0 32px; display: grid; max-width: 860px; }
.contact__list a {
  position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 2px;
  border-bottom: 1px solid var(--linea); text-decoration: none;
  font-family: var(--serif); text-transform: uppercase; letter-spacing: 0.1em;
  font-size: clamp(22px, 3vw, 38px); color: var(--marfil);
  transition: color 260ms ease, padding-left 320ms var(--ease-out);
}
.contact__list a span { font-family: var(--font); letter-spacing: 0.12em; font-size: 11px; text-transform: uppercase; color: var(--niebla); transition: color 260ms ease; }
@media (hover: hover) and (pointer: fine) {
  .contact__list a:hover { color: var(--oro); padding-left: 16px; }
  .contact__list a:hover span { color: var(--marfil); }
}
.privacy { max-width: 72ch; color: var(--niebla); font-size: 13px; }
.privacy summary { cursor: pointer; padding: 10px 0; font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--marfil); }

/* ============ Footer ============ */
.footer { background: var(--noche); color: var(--marfil); overflow: hidden; padding: clamp(28px, 4vw, 48px) var(--gutter) 20px; border-top: 1px solid color-mix(in srgb, var(--oro) 25%, transparent); }
.footer__word {
  margin: 0; font-family: var(--serif); text-transform: uppercase; white-space: nowrap;
  font-size: clamp(64px, 19vw, 360px); line-height: 0.92; letter-spacing: 0.04em; text-align: center;
  opacity: 0.9;
}
.footer__legal { margin: 20px 0 0; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--niebla); text-align: center; padding-bottom: env(safe-area-inset-bottom, 0px); }

/* ============ Botones ============ */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 0 30px; border: none;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; text-decoration: none; font-weight: 400;
  transition: transform 160ms var(--ease-out), color 220ms ease;
}
/* Brillo que cruza el botón al pasar el mouse */
.btn::after {
  content: ""; position: absolute; top: -50%; bottom: -50%; left: -70%; width: 45%;
  background: linear-gradient(100deg, transparent, rgb(255 255 255 / 0.38), transparent);
  transform: translateX(0) skewX(-18deg); opacity: 0; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn:not([disabled]):hover::after { animation: barrido 760ms var(--ease-out); }
}
@keyframes barrido {
  from { transform: translateX(0) skewX(-18deg); opacity: 1; }
  to { transform: translateX(380%) skewX(-18deg); opacity: 1; }
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--oro); color: var(--noche); }
.btn--whatsapp { background: var(--wa); color: #fff; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.35; cursor: not-allowed; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:not([disabled]):hover { background: var(--oro-claro); }
  .btn--whatsapp:hover { background: #148457; }
}
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border: none; background: none; font-size: 15px; color: var(--marfil);
  transition: transform 160ms var(--ease-out), color 200ms ease;
}
.icon-btn:active { transform: scale(0.9); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--oro); } }

/* ============ Ficha de la pieza ============ */
dialog { color: var(--marfil); }
dialog::backdrop { background: rgb(4 4 3 / 0.74); }
.modal {
  width: min(1120px, calc(100% - 24px)); max-height: calc(100dvh - 24px);
  padding: 0; border: 1px solid var(--linea); background: var(--noche); overflow: auto; color: var(--marfil);
  opacity: 1; transform: scale(1);
  transition: opacity 240ms var(--ease-out), transform 240ms var(--ease-out), overlay 240ms allow-discrete, display 240ms allow-discrete;
}
.modal:not([open]) { opacity: 0; transform: scale(0.97); transition-duration: 150ms; }
@starting-style { .modal[open] { opacity: 0; transform: scale(0.97); } }
.modal::backdrop { transition: background-color 240ms ease, overlay 240ms allow-discrete, display 240ms allow-discrete; }
@starting-style { .modal[open]::backdrop { background: rgb(4 4 3 / 0); } }
.modal__close-form { position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0; }
.modal__body { display: grid; grid-template-columns: 1.15fr 1fr; }
@media (max-width: 760px) { .modal__body { grid-template-columns: 1fr; } }
.modal__media { aspect-ratio: 4 / 5; background: var(--carbon); position: relative; }
.modal__media img { width: 100%; height: 100%; object-fit: cover; }
.modal__info { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; gap: 15px; }
.modal__col { margin: 0; align-self: flex-start; font-size: 9px; letter-spacing: 0.22em; color: var(--oro); border: 1px solid color-mix(in srgb, var(--oro) 45%, transparent); padding: 6px 10px; }
.modal__info h3 { font-family: var(--serif); text-transform: uppercase; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.02; letter-spacing: 0.04em; }
.price { font-size: 22px; margin: 0; font-variant-numeric: tabular-nums; color: var(--oro); letter-spacing: 0.04em; }
.modal__info .muted { margin: 0; }
.modal__info .muted:empty { display: none; }
.modal__note { margin: 0; font-size: 11px; color: var(--niebla); letter-spacing: 0.06em; }

.sizes { border: none; padding: 0; margin: 6px 0 0; }
.sizes legend { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; margin-bottom: 12px; padding: 0; color: var(--niebla); }
.sizes__list { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  min-width: 62px; min-height: 44px; padding: 0 16px; border: 1px solid color-mix(in srgb, var(--oro) 32%, transparent); background: transparent;
  font-size: 12px; letter-spacing: 0.08em; color: var(--marfil);
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 160ms var(--ease-out);
}
.size:active { transform: scale(0.95); }
.size[aria-checked="true"] { background: var(--oro); color: var(--noche); border-color: var(--oro); }
@media (hover: hover) and (pointer: fine) { .size:not(:disabled):not([aria-checked="true"]):hover { border-color: var(--oro); } }
.size:disabled { color: color-mix(in srgb, var(--niebla) 70%, var(--noche)); background: var(--humo); border-color: var(--linea); text-decoration: line-through; cursor: not-allowed; }

.qty[hidden] { display: none; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--linea); width: max-content; }
.qty__btn { width: 44px; height: 44px; border: none; background: none; font-size: 17px; color: var(--marfil); transition: transform 160ms var(--ease-out), color 180ms ease; }
.qty__btn:active { transform: scale(0.9); }
@media (hover: hover) and (pointer: fine) { .qty__btn:hover { color: var(--oro); } }
.qty output { min-width: 34px; text-align: center; font-variant-numeric: tabular-nums; }

.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.form-error:empty { display: none; }

/* ============ Carrito ============ */
.drawer {
  margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(470px, 100%); max-width: 100%;
  padding: 0; border: none; border-left: 1px solid var(--linea); background: var(--noche); color: var(--marfil);
  display: flex; flex-direction: column;
  transform: translateX(0);
  transition: transform 420ms var(--ease-drawer), overlay 420ms allow-discrete, display 420ms allow-discrete;
}
.drawer:not([open]) { transform: translateX(100%); transition-duration: 260ms; display: none; }
@starting-style { .drawer[open] { transform: translateX(100%); } }
.drawer::backdrop { transition: background-color 300ms ease, overlay 300ms allow-discrete, display 300ms allow-discrete; }
@starting-style { .drawer[open]::backdrop { background: rgb(4 4 3 / 0); } }
@media (prefers-reduced-motion: reduce) {
  .drawer, .modal { transition-property: opacity, overlay, display; }
  .drawer:not([open]), .modal:not([open]) { transform: none; opacity: 0; }
  @starting-style { .drawer[open], .modal[open] { transform: none; opacity: 0; } }
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid color-mix(in srgb, var(--oro) 25%, transparent); }
.drawer__head h2 { font-family: var(--serif); text-transform: uppercase; font-size: 22px; letter-spacing: 0.1em; }
.drawer__scroll { flex: 1; overflow-y: auto; padding: 8px 20px 22px; overscroll-behavior: contain; }
.drawer__foot { border-top: 1px solid var(--linea); padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 10px; }
.drawer__foot .muted { margin: 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; text-transform: uppercase; font-size: 12px; letter-spacing: 0.2em; }
.total strong { font-variant-numeric: tabular-nums; font-size: 18px; font-weight: 400; color: var(--oro); letter-spacing: 0.04em; }
.empty { color: var(--niebla); padding: 36px 0; text-align: center; margin: 0; }
.empty[hidden] { display: none; }
.cart-list { list-style: none; margin: 0; padding: 0; }
.cart-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--linea); }
.cart-item__media { width: 64px; aspect-ratio: 4 / 5; background: var(--carbon); overflow: hidden; border: 1px solid var(--linea); }
.cart-item__media img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__media .ph { font-size: 30px; }
.cart-item__media .ph__num { display: none; }
.cart-item__name { margin: 0; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; overflow-wrap: anywhere; }
.cart-item__right { flex-shrink: 0; white-space: nowrap; }
#modal-titulo { overflow-wrap: anywhere; }

.grid__empty {
  grid-column: 1 / -1; padding: 80px var(--gutter); text-align: center; color: var(--niebla);
}
.grid__empty strong { display: block; color: var(--marfil); font-family: var(--serif); font-size: 26px; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 10px; }
.cart-item__meta { margin: 3px 0 0; font-size: 11px; color: var(--niebla); letter-spacing: 0.06em; }
.cart-item .qty__btn { width: 32px; height: 32px; font-size: 14px; }
.cart-item .qty output { min-width: 24px; font-size: 13px; }
.cart-item__right { display: grid; justify-items: end; gap: 6px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--oro); }
.link-btn { background: none; border: none; padding: 4px 0; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--niebla); text-decoration: underline; text-underline-offset: 3px; transition: color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .link-btn:hover { color: var(--marfil); } }

.checkout { margin-top: 26px; display: grid; gap: 14px; }
.checkout[hidden] { display: none; }
.checkout h3 { font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--niebla); }
.checkout label { display: grid; gap: 7px; font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--niebla); }
.checkout input, .checkout textarea {
  font: inherit; font-size: 16px; letter-spacing: normal; text-transform: none; color: var(--marfil);
  padding: 13px; border: 1px solid var(--linea); border-radius: 0; background: var(--field);
  transition: border-color 180ms ease;
}
.checkout input:focus, .checkout textarea:focus { border-color: var(--oro); outline: none; }
.checkout [aria-invalid="true"] { border-color: var(--danger); }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  background: var(--oro); color: var(--noche);
  padding: 13px 20px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: transform 400ms var(--ease-out), opacity 400ms ease;
  max-width: calc(100vw - 32px); text-align: center;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) { .toast { transform: translate(-50%, 0); } }
