/* ============ TOKENS ============ */
:root {
  --ink: #0b0b0c;
  --paper: #ffffff;
  --muted: #8a8a8f;
  --accent: #5b2a86;          /* violeta de la línea superior del sitio original */
  --header-h: 76px;
  --ticker-h: 28px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font: 'Montserrat', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; }

/* ============ HEADER ============ */
.site-header {
  position: fixed; inset: 3px 0 auto 0; z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: transform .5s var(--ease), box-shadow .4s ease;
  animation: dropIn .9s var(--ease) both;
}
.site-header.is-scrolled { box-shadow: 0 10px 30px -18px rgba(0,0,0,.35); }
.site-header.is-hidden   { transform: translateY(-100%); }
@keyframes dropIn { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }

.header-inner {
  max-width: 1320px; margin: 0 auto; height: var(--header-h);
  display: flex; align-items: center; gap: 56px; padding: 0 28px;
  transition: height .4s var(--ease);
}
.site-header.is-scrolled .header-inner { height: 60px; }

.logo {
  font-weight: 900; font-style: italic; font-size: 34px; letter-spacing: -.04em;
  transform: skewX(-6deg); position: relative; transition: transform .4s var(--ease), font-size .4s var(--ease);
}
.logo sup { font-size: 7px; font-style: normal; font-weight: 700; letter-spacing: 0; margin-left: 2px; vertical-align: top; position: relative; top: 4px; }
.logo:hover { transform: skewX(-6deg) scale(1.06); }
.site-header.is-scrolled .logo { font-size: 28px; }

.main-nav { display: flex; gap: 38px; }
.main-nav a {
  position: relative; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 6px 0;
}
.main-nav a::after {
  content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  transition: background .3s ease, transform .35s var(--ease);
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: #f1f1f2; transform: translateY(-2px); }
.cart-count {
  position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center;
}
.cart-count.bump { animation: bump .5s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.7); } 100% { transform: scale(1); } }

/* Burger (mobile) */
.burger { display: none; width: 42px; height: 42px; position: relative; }
.burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.burger span:nth-child(1) { top: 14px; } .burger span:nth-child(2) { top: 20px; } .burger span:nth-child(3) { top: 26px; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ TICKER ============ */
.ticker { height: var(--ticker-h); background: #efefef; overflow: hidden; display: flex; align-items: center; }
.ticker-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: flex; flex-shrink: 0; }
.ticker-group span {
  font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 0 34px; white-space: nowrap; color: #333;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100svh; padding-top: calc(var(--header-h) + var(--ticker-h) + 3px);
  color: #fff; overflow: hidden; isolation: isolate;
}
.hero-bg {
  position: absolute; inset: -6% 0; z-index: -2; will-change: transform;
  /* Reemplazá por tu foto: assets/hero.jpg */
  background:
    radial-gradient(60% 50% at 62% 70%, #2a2a2e 0%, transparent 70%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 2px, transparent 2px 46px),
    linear-gradient(120deg, #8a5a48, #5d3a30 55%, #2b1d1a);
  animation: heroZoom 2.4s var(--ease) both;
}
@keyframes heroZoom { from { transform: scale(1.12); filter: brightness(.5); } to { transform: scale(1); filter: none; } }
.hero-overlay { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,.05) 55%, rgba(0,0,0,.3)); }

.hero-logo {
  position: absolute; top: calc(var(--header-h) + var(--ticker-h) + 56px); left: 60px;
  font-weight: 900; font-style: italic; font-size: clamp(44px, 5.4vw, 84px); letter-spacing: -.05em; transform: skewX(-6deg);
}

.stores {
  position: absolute; right: 5vw; top: calc(var(--header-h) + var(--ticker-h) + 60px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 270px)); gap: 44px 40px;
  font-size: clamp(11px, 1vw, 14px); font-weight: 500; line-height: 1.35; text-transform: uppercase; letter-spacing: .01em;
}
.stores li { opacity: .92; transition: transform .45s var(--ease), opacity .3s; cursor: default; }
.stores li:hover { transform: translateX(-6px); opacity: 1; }
.stores li > span { display: block; margin-bottom: 2px; }
.stores b { font-weight: 800; }
.stores .is-soon { filter: blur(1.6px); opacity: .55; }

.scroll-cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; }
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(#fff, transparent); animation: cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(26px); animation: reveal 1s var(--ease) forwards; animation-delay: var(--d, 0s); }
.is-soon.reveal { animation-name: revealSoon; }
@keyframes reveal { to { opacity: .92; transform: none; } }
@keyframes revealSoon { to { opacity: .55; transform: none; } }
.hero-logo.reveal { animation-name: revealLogo; }
@keyframes revealLogo { from { opacity: 0; transform: skewX(-6deg) translateX(-30px); } to { opacity: 1; transform: skewX(-6deg); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .header-inner { gap: 10px; padding: 0 14px; }
  .burger { display: block; }
  .logo { margin-right: auto; font-size: 28px; }
  .header-actions { margin-left: 0; }
  .main-nav {
    position: fixed; inset: calc(var(--header-h) + var(--ticker-h) + 3px) 0 auto 0; flex-direction: column; gap: 0;
    background: #fff; padding: 12px 24px 28px; clip-path: inset(0 0 100% 0); transition: clip-path .6s var(--ease);
  }
  .main-nav.is-open { clip-path: inset(0); }
  .main-nav a { padding: 18px 0; font-size: 16px; border-bottom: 1px solid #eee; }
  .hero-logo { left: 24px; }
  .stores { left: 24px; right: 24px; top: auto; bottom: 90px; grid-template-columns: 1fr 1fr; gap: 22px 18px; font-size: 10.5px; }
}
@media (max-width: 520px) { .stores { grid-template-columns: 1fr; gap: 14px; bottom: 80px; } .stores li:nth-child(n+4) { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ============ SCROLL REVEAL ============ */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* ============ NEW IN ============ */
.new-in { max-width: 1320px; margin: 0 auto; padding: 96px 28px 110px; text-align: center; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 40px; color: #444; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 8px; max-width: 1000px; margin: 0 auto 64px; text-align: left; }

.card { position: relative; padding: 0 4px; }
.card-media { position: relative; display: block; aspect-ratio: 1 / 1.5; background: #f7f7f7; overflow: hidden; }
.card-media img, .card-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.card-media img { object-fit: contain; padding: 14%; transition: transform .8s var(--ease); }
.card-ph { display: grid; place-items: center; font-weight: 900; font-style: italic; font-size: 22px; letter-spacing: -.04em; color: #d9d9db; }
.card:hover .card-media img { transform: scale(1.07); }

.card-badge {
  position: absolute; top: 0; left: 0; z-index: 2; background: #c8312b; color: #fff;
  font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: rotate(180deg); padding: 10px 5px;
}
.card-add {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 2; padding: 12px;
  background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  transform: translateY(130%); transition: transform .5s var(--ease), background .3s;
}
.card:hover .card-add, .card-add:focus-visible { transform: none; }
.card-add.is-done { background: #1f7a3d; }

.card-info { padding: 12px 2px 0; }
.card-info h3 { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; color: #444; margin-bottom: 8px; }
.price { font-size: 12.5px; font-weight: 700; margin-bottom: 5px; }
.transfer { font-size: 9px; color: #222; margin-bottom: 3px; }
.transfer b { font-weight: 700; }
.installments { font-size: 8.5px; color: var(--muted); }

.btn-outline {
  display: inline-block; position: relative; overflow: hidden; z-index: 0;
  padding: 15px 44px; border: 1.5px solid var(--ink); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  transition: color .4s var(--ease);
}
.btn-outline::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform .5s var(--ease); }
.btn-outline:hover { color: #fff; }
.btn-outline:hover::before { transform: none; }

@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 24px 12px; } .new-in { padding: 64px 14px 80px; } .card-add { transform: none; } }

section[id] { scroll-margin-top: calc(var(--header-h) + var(--ticker-h) + 8px); }

/* ============ CATEGORÍAS ============ */
.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 1000px; margin: 0 auto; padding: 0 28px 72px; }
.cat { position: relative; display: block; aspect-ratio: 1 / 1.25; overflow: hidden; background: #ddd; }
.cat img, .cat-ph { position: absolute; inset: 0; width: 100%; height: 100%; transition: transform 1.1s var(--ease); }
.cat img { object-fit: cover; }
.cat-ph { background: linear-gradient(160deg, color-mix(in srgb, var(--tone) 70%, #fff), var(--tone)); }
.cat::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 45%, rgba(0,0,0,.45)); transition: opacity .5s; }
.cat:hover img, .cat:hover .cat-ph { transform: scale(1.08); }
.cat-body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; display: grid; justify-items: center; gap: 10px; color: #fff; }
.cat-body strong { font-size: 18px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; transition: transform .5s var(--ease); }
.cat-body em {
  font-style: normal; font-size: 9px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: #4a2e1d; padding: 7px 15px; transition: background .3s, padding .4s var(--ease);
}
.cat:hover .cat-body strong { transform: translateY(-4px); }
.cat:hover .cat-body em { background: #fff; color: var(--ink); padding: 7px 24px; }

.accesorios { padding-top: 24px; }
.accesorios .section-title { color: #4a2e1d; font-size: 11px; }
@media (max-width: 900px) { .categories { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 14px 56px; } .cat { aspect-ratio: 1 / 1.2; } .cat-body { bottom: 12px; gap: 8px; } .cat-body strong { font-size: 15px; } }
@media (max-width: 600px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 8px; } .categories { grid-template-columns: repeat(2, 1fr); padding: 0 10px 48px; } .cat-body strong { font-size: 14px; letter-spacing: 0; } .cat-body em { padding: 6px 16px; font-size: 11px; } }

/* ============ FOOTER REVEAL ============ */
/* El contenido (main) es una capa opaca por encima; el footer queda detrás, anclado al borde inferior
   del viewport y recortado por su contenedor: al terminar la página se va "descubriendo". */
main { position: relative; z-index: 2; background: var(--paper); }

.site-footer {
  --p: 0;                                   /* progreso del revelado 0 → 1 (lo setea footer.js) */
  position: relative; z-index: 1; height: var(--footer-h, 100svh);
  clip-path: inset(0); background: #0b0b0c; color: #fff;
}
.footer-sticky { position: fixed; inset: auto 0 0 0; height: var(--footer-h, 100svh); }
.footer-inner {
  height: 100%; max-width: 1480px; margin: 0 auto; padding: clamp(32px, 5vh, 64px) clamp(20px, 4vw, 56px) 24px;
  display: grid; grid-template-rows: auto auto 1fr auto; gap: clamp(24px, 4vh, 48px);
  transform: translateY(calc((1 - var(--p)) * -14%)); will-change: transform;
}
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.footer-claim { font-size: clamp(18px, 2.4vw, 34px); font-weight: 800; line-height: 1.05; text-transform: uppercase; letter-spacing: -.01em; }
.to-top {
  display: inline-flex; gap: 10px; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 12px 18px; border: 1px solid rgba(255,255,255,.35); transition: background .35s var(--ease), color .35s, border-color .35s;
}
.to-top i { font-style: normal; transition: transform .45s var(--ease); }
.to-top:hover { background: #fff; color: var(--ink); border-color: #fff; }
.to-top:hover i { transform: translateY(-4px); }

.footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid rgba(255,255,255,.18); padding-top: clamp(20px, 3vh, 36px); }
.f-col h3 { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #8d8d92; margin-bottom: 16px; }
.f-col a { display: block; width: max-content; font-size: 15px; font-weight: 600; text-transform: uppercase; padding: 5px 0; position: relative; color: #e9e9ea; transition: color .3s, transform .45s var(--ease); }
.f-col a::before { content: '→'; position: absolute; left: -22px; opacity: 0; transition: opacity .3s, transform .45s var(--ease); transform: translateX(-8px); }
.f-col a:hover { color: #fff; transform: translateX(22px); }
.f-col a:hover::before { opacity: 1; transform: none; }
.f-col p { font-size: 12.5px; line-height: 1.45; color: #a9a9ae; margin-bottom: 12px; }
.f-col p b { display: block; color: #fff; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .04em; }

.footer-brand { display: flex; align-items: flex-end; overflow: hidden; min-height: 0; }
.footer-brand span {
  display: block; font-weight: 900; font-style: italic; letter-spacing: -.06em; line-height: .8;
  font-size: clamp(90px, 26vw, 460px); white-space: nowrap; transform: skewX(-6deg) translateY(calc((1 - var(--p)) * 40%));
  color: #fff; padding-right: .06em;
}
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.18); padding-top: 16px; font-size: 11px; color: #8d8d92; letter-spacing: .03em; }

/* Aparición escalonada de los bloques */
.js-footer [data-f] { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js-footer .site-footer.is-in [data-f] { opacity: 1; transform: none; }
.js-footer .site-footer.is-in .footer-cols [data-f]:nth-child(2) { transition-delay: .08s; }
.js-footer .site-footer.is-in .footer-cols [data-f]:nth-child(3) { transition-delay: .16s; }

/* Pantallas chicas o footer más alto que el viewport: sin efecto sticky, flujo normal */
.site-footer.is-static { height: auto; clip-path: none; }
.site-footer.is-static .footer-sticky { position: static; height: auto; }
.site-footer.is-static .footer-inner { height: auto; transform: none; }
.site-footer.is-static .footer-brand span { transform: skewX(-6deg); }
@media (max-width: 900px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols .f-col:first-child { grid-column: 1 / -1; }
  .footer-top { flex-direction: column; }
}
@media (max-width: 520px) { .footer-cols { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .site-footer .footer-inner, .footer-brand span { transform: none !important; }
  .js-footer [data-f] { opacity: 1; transform: none; }
}
.footer-brand span { line-height: .95; padding-bottom: .06em; }
