:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --sand: #ebe5d9;
  --ink: #1f1d1a;
  --muted: #6d675e;
  --line: #e2dbcd;
  --green: #2f4a3a;
  --green-soft: #dfe7dc;
  --danger: #a3392b;
  --radius: 14px;
  --serif: "Fraunces", Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 48px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* Barra de anuncio y encabezado */
.announce { background: var(--green); color: #f2efe7; font-size: 13px; letter-spacing: .02em; text-align: center; padding: 8px var(--gutter); display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.announce .dot { opacity: .5; }
.header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1320px; margin: 0 auto; padding: 14px var(--gutter); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.logo { font: 500 30px/1 var(--serif); letter-spacing: -.02em; text-decoration: none; }
.logo span { color: var(--green); }
.header .logo { grid-column: 1; }
.nav { display: flex; gap: 28px; grid-column: 2; }
.nav a { text-decoration: none; font-size: 15px; padding: 6px 0; border-bottom: 1.5px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-color: var(--ink); }
.icon-btn { background: none; border: 0; padding: 8px; border-radius: 999px; display: inline-grid; place-items: center; position: relative; }
.icon-btn:hover { background: var(--sand); }
.cart-btn { grid-column: 3; justify-self: end; }
.badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--green); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; }
[hidden] { display: none !important; }
.badge.pop { animation: pop .35s ease; }
@keyframes pop { 50% { transform: scale(1.3); } }
.menu-btn { display: none; }

/* Portada */
.hero { position: relative; min-height: min(78vh, 720px); display: grid; align-items: end; color: #fff; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,28,22,.05) 30%, rgba(20,28,22,.62)); }
.hero-copy { position: relative; z-index: 1; max-width: 1320px; width: 100%; margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 8vw, 88px); }
.eyebrow { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 14px; opacity: .9; }
.hero h1 { font: 300 clamp(40px, 6.4vw, 84px)/1.02 var(--serif); letter-spacing: -.02em; margin: 0 0 20px; max-width: 12ch; }
.hero p { font-size: clamp(16px, 1.6vw, 19px); max-width: 46ch; margin: 0 0 28px; opacity: .95; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; transition: transform .15s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); background: #000; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.light:hover { background: var(--bg); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sand); }
.btn.block { width: 100%; }

/* Valores */
.values { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter); display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; border-bottom: 1px solid var(--line); }
.value { display: flex; gap: 12px; align-items: center; font-size: 14px; }
.value svg { flex: none; color: var(--green); width: 26px; height: 26px; }
.value strong { display: block; font-weight: 600; }
.value span { color: var(--muted); }

/* Secciones y listados */
.section { max-width: 1320px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-head h2, .page-title { font: 400 clamp(28px, 3.4vw, 42px)/1.1 var(--serif); letter-spacing: -.01em; margin: 0; }
.page-intro { color: var(--muted); margin: 10px 0 0; max-width: 52ch; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 999px; font-size: 14px; text-decoration: none; }
.chip:hover { border-color: var(--ink); }
.chip[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.select { appearance: none; border: 1px solid var(--line); background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f1d1a' stroke-width='1.8'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; padding: 8px 38px 8px 16px; border-radius: 999px; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 28px) clamp(12px, 1.6vw, 22px); }
.card { position: relative; }
.card-media { position: relative; display: block; aspect-ratio: 3 / 4; background: var(--sand); border-radius: var(--radius); overflow: hidden; }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .45s ease, transform .8s ease; }
.card-media img.alt { opacity: 0; }
.card:hover .card-media img.alt { opacity: 1; }
.card:hover .card-media img { transform: scale(1.03); }
.card-tag { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--surface); padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.card-quick { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 1; opacity: 0; transform: translateY(6px); transition: .25s ease; min-height: 42px; font-size: 14px; }
.card:hover .card-quick, .card-quick:focus-visible { opacity: 1; transform: none; }
.card-body { padding: 12px 2px 0; }
.card .swatches { min-height: 18px; }
.swatches { display: flex; gap: 6px; margin-bottom: 8px; }
.swatch { width: 18px; height: 18px; border-radius: 999px; border: 1px solid rgba(0,0,0,.18); padding: 0; box-shadow: 0 0 0 2px var(--bg); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink); }
.card-title { font-weight: 500; margin: 0; text-decoration: none; display: block; }
.card-sub { color: var(--muted); font-size: 13px; margin: 2px 0 4px; }
.price { font-weight: 500; }

.announce a { color: inherit; font-weight: 600; }

/* Invitación a probar el panel */
.try-panel { padding-bottom: 0; }
.panel.try { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(20px, 4vw, 48px); align-items: center; background: var(--green-soft); border-color: transparent; padding: clamp(22px, 4vw, 40px); }
.try h2 { font: 400 clamp(26px, 3vw, 36px)/1.1 var(--serif); margin: 0 0 12px; }
.try p { color: var(--muted); margin: 0; max-width: 52ch; }
.creds { margin: 0; display: grid; gap: 12px; background: var(--surface); border-radius: 12px; padding: 18px; }
.creds dt { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.creds dd { margin: 2px 0 0; font: 500 17px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }

/* Bloques editoriales */
.split { max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter) clamp(40px, 6vw, 72px); display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(20px, 4vw, 56px); align-items: center; }
.split img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.split h2 { font: 400 clamp(30px, 3.6vw, 46px)/1.08 var(--serif); margin: 0 0 16px; }
.split p { color: var(--muted); margin: 0 0 24px; max-width: 44ch; }
.story { position: relative; color: #fff; text-align: center; padding: clamp(80px, 12vw, 150px) var(--gutter); overflow: hidden; }
.story img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story::after { content: ""; position: absolute; inset: 0; background: rgba(22, 34, 26, .55); }
.story > div { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }
.story h2 { font: 300 clamp(30px, 4vw, 52px)/1.08 var(--serif); margin: 0 0 16px; }
.story p { margin: 0 auto; max-width: 52ch; opacity: .92; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.facts strong { display: block; font: 400 34px/1 var(--serif); margin-bottom: 6px; }
.facts span { font-size: 14px; opacity: .85; }

/* Producto */
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.product { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.gallery { display: grid; grid-template-columns: 76px 1fr; gap: 14px; position: sticky; top: 92px; }
.thumbs { display: flex; flex-direction: column; gap: 10px; }
.thumbs button { padding: 0; border: 1.5px solid transparent; border-radius: 10px; overflow: hidden; background: var(--sand); aspect-ratio: 3 / 4; }
.thumbs button[aria-current="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.main-img { aspect-ratio: 3 / 4; background: var(--sand); border-radius: var(--radius); overflow: hidden; }
.main-img img { width: 100%; height: 100%; object-fit: cover; animation: fade .35s ease; }
@keyframes fade { from { opacity: .3; } }
.info .sub { color: var(--muted); font-size: 14px; letter-spacing: .02em; margin: 0 0 6px; }
.info h1 { font: 400 clamp(32px, 3.6vw, 48px)/1.05 var(--serif); margin: 0 0 12px; letter-spacing: -.01em; }
.info .price { font-size: 22px; margin: 0 0 4px; }
.info .tax { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.opt { margin: 0 0 22px; border: 0; padding: 0; }
.opt legend { font-size: 14px; margin-bottom: 10px; padding: 0; }
.opt legend b { font-weight: 600; }
.opt .swatches { gap: 10px; }
.opt .swatch { width: 32px; height: 32px; }
.sizes { display: flex; gap: 8px; flex-wrap: wrap; }
.size { min-width: 54px; height: 46px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; font-weight: 500; }
.size:hover { border-color: var(--ink); }
.size[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.buy { display: flex; gap: 10px; margin: 6px 0 14px; }
.buy .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.qty button { width: 40px; height: 48px; border: 0; background: none; font-size: 18px; }
.qty output { min-width: 22px; text-align: center; font-weight: 500; }
.qty.small button { width: 32px; height: 34px; font-size: 16px; }
.hint { color: var(--danger); font-size: 14px; min-height: 22px; margin: 0; }
.eta { display: flex; gap: 10px; align-items: center; font-size: 14px; background: var(--green-soft); color: var(--green); padding: 12px 14px; border-radius: 12px; margin: 4px 0 22px; }
.feats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; font-size: 13px; }
.feat svg { display: block; margin: 0 auto 6px; color: var(--green); }
details { border-top: 1px solid var(--line); }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 500; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p, details ul { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
details ul { padding-left: 18px; }

/* Carrito lateral */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 18, 15, .38); z-index: 40; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--bg); z-index: 50; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.2,1); box-shadow: -10px 0 40px rgba(0,0,0,.08); }
.drawer:not(.open) { visibility: hidden; box-shadow: none; transition: transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s .3s; }
.drawer.open { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font: 400 26px/1 var(--serif); margin: 0; }
.drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.free { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 14px; }
.bar { height: 6px; background: var(--sand); border-radius: 999px; margin-top: 10px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: inherit; transition: width .4s ease; }
.lines { list-style: none; margin: 0; padding: 8px 20px; flex: 1; }
.line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.line img { width: 76px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 10px; background: var(--sand); }
.line h3 { font-size: 15px; font-weight: 500; margin: 0; }
.line .meta { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.line .right { display: flex; flex-direction: column; justify-content: space-between; align-items: end; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13px; text-decoration: underline; }
.drawer-foot { padding: 18px 20px 22px; border-top: 1px solid var(--line); background: var(--surface); }
.row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.row.total { font-weight: 600; font-size: 18px; margin-top: 10px; }
.drawer-foot .note { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.empty { text-align: center; padding: 60px 24px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; margin: 0 auto 12px; color: var(--ink); }
.empty h3 { font: 400 24px/1.2 var(--serif); color: var(--ink); margin: 0 0 8px; }

/* Checkout */
.checkout { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; }
.panel h2 { font: 400 24px/1.2 var(--serif); margin: 0 0 18px; display: flex; gap: 12px; align-items: center; }
.panel h2 .n { width: 28px; height: 28px; border-radius: 999px; background: var(--green); color: #fff; font: 600 14px/28px var(--sans); text-align: center; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.field.full { grid-column: 1 / -1; }
.field input, .field select { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
.field input:focus, .field select:focus { border-color: var(--ink); outline: none; background: #fff; }
.field input:user-invalid, .field [aria-invalid="true"] { border-color: var(--danger); }
.radio { display: flex; gap: 14px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; background: var(--bg); }
.radio:has(input:checked) { border-color: var(--ink); background: #fff; }
.radio input { accent-color: var(--green); width: 18px; height: 18px; }
.radio .grow { flex: 1; }
.radio small { display: block; color: var(--muted); }
.test-pay { display: flex; gap: 12px; align-items: flex-start; background: var(--green-soft); color: var(--green); border-radius: 12px; padding: 14px 16px; font-size: 14px; }
.summary { position: sticky; top: 92px; }
.summary .line { grid-template-columns: 64px 1fr auto; }
.summary .line img { width: 64px; }
.qty-dot { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; margin-left: 6px; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin: 12px 0 0; }

/* Gracias */
.thanks { max-width: 640px; margin: 0 auto; text-align: center; }
.check { width: 72px; height: 72px; border-radius: 999px; background: var(--green); color: #fff; display: grid; place-items: center; margin: 0 auto 22px; animation: pop .5s ease; }
.check svg { width: 36px; height: 36px; stroke-width: 2.2; }
.thanks .panel { text-align: left; margin-top: 28px; }

/* Reset de cada hora */
.restoring { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; text-align: center; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(6px); animation: fadein .25s ease; }
.restoring > div { max-width: 440px; }
.restoring h2 { font: 400 30px/1.15 var(--serif); margin: 18px 0 10px; }
.restoring p { color: var(--muted); margin: 0; }
.spinner { display: block; width: 40px; height: 40px; margin: 0 auto; border: 3px solid var(--green-soft); border-top-color: var(--green); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Avisos y carga */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.skeleton { background: linear-gradient(90deg, var(--sand) 25%, #f1ece2 50%, var(--sand) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton.card-media { aspect-ratio: 3 / 4; }
.skeleton.text { height: 14px; margin-top: 12px; width: 70%; border-radius: 6px; }

/* Pie */
.footer { background: #ece6da; margin-top: 40px; }
.footer-inner { max-width: 1320px; margin: 0 auto; padding: 48px var(--gutter); display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 28px; font-size: 14px; }
.footer h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin: 6px 0 12px; }
.footer a:not(.logo) { display: block; text-decoration: none; color: var(--muted); margin-bottom: 6px; }
.footer a:not(.logo):hover { color: var(--ink); }
.footer p { color: var(--muted); margin: 10px 0 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .values { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .header-inner { grid-template-columns: auto 1fr auto; }
  .menu-btn { display: inline-grid; grid-column: 1; }
  .header .logo { grid-column: 2; justify-self: center; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card-quick { display: none; }
  .split, .product, .checkout, .panel.try { grid-template-columns: 1fr; }
  .gallery { position: static; grid-template-columns: 1fr; }
  .thumbs { order: 2; flex-direction: row; overflow-x: auto; }
  .thumbs button { width: 64px; flex: none; }
  .summary { position: static; order: -1; }
  .fields { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .values { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .announce .dot { display: none; }
}
