/* ============================================================
   BuenasTabas — streetwear Lima
   Hero oscuro + catálogo claro. Tinta #101014, acento #2E45FF.
   ============================================================ */
:root {
  --ink: #101014;
  --paper: #ffffff;
  --bone: #f4f4f2;
  --line: #e4e4e1;
  --accent: #2e45ff;
  --wsp: #25d366;
  --danger: #e02020;
  --font-display: "Archivo", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --radius: 14px;
  --header-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-display);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
.mono { font-family: var(--font-mono); }

/* Red de seguridad para reveals: nunca dejar contenido invisible */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-in, .no-observer .reveal { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* ---------- HEADER ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(12, 12, 16, .78);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  color: #fff;
}
.site-header.header-light {
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .04em; font-size: 15px; text-transform: uppercase; }
.brand img { height: 40px; width: 40px; object-fit: contain; }
.main-nav { display: flex; gap: clamp(12px, 3vw, 28px); align-items: center; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.main-nav a { opacity: .85; transition: opacity .2s; padding: 6px 2px; }
.main-nav a:hover, .main-nav a.active { opacity: 1; border-bottom: 2px solid var(--accent); }
.cart-btn {
  position: relative; display: flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff; border: none;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .04em;
  padding: 9px 16px; border-radius: 100px;
}
.cart-btn:hover { filter: brightness(1.12); }
.cart-count { background: #fff; color: var(--accent); border-radius: 100px; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- HERO (portada) ---------- */
/* La imagen se muestra COMPLETA arriba (sin recortar el logo) y los botones
   van DEBAJO, sobre el negro que se funde con el humo. Así nunca tapan el logo. */
.hero {
  position: relative;
  background: #060608;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.hero-media { position: relative; width: 100%; line-height: 0; }
.hero-bg {
  width: 100%; height: auto; display: block;
  max-height: 78svh; object-fit: cover; object-position: center top;
  animation: heroIn 1.6s ease both;
}
/* funde el borde inferior de la imagen con el fondo para que los botones se integren */
.hero-media::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 22%;
  background: linear-gradient(180deg, transparent, #060608 96%);
  pointer-events: none;
}
@keyframes heroIn { from { transform: scale(1.04); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.hero-veil { display: none; }
.hero-content { position: relative; z-index: 2; text-align: center; padding: 18px 20px clamp(28px, 4vh, 48px); color: #fff; }
.hero-kicker { font-family: var(--font-mono); font-size: 12px; letter-spacing: .32em; text-transform: uppercase; opacity: .85; margin-bottom: 14px; animation: fadeUp 1s .5s ease both; }
.hero-title {
  font-size: clamp(34px, 7vw, 76px); font-weight: 900; text-transform: uppercase;
  letter-spacing: .01em; line-height: .98; margin-bottom: 26px;
  animation: fadeUp 1s .65s ease both;
}
.hero-title em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px #fff; }
.hero-cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; animation: fadeUp 1s .8s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 14px; letter-spacing: .08em; text-transform: uppercase;
  padding: 15px 34px; border-radius: 100px; border: 1.5px solid transparent;
  transition: transform .2s ease, filter .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-solid { background: #fff; color: var(--ink); }
.btn-solid:hover { filter: brightness(.94); }
.btn-ghost { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-wsp { background: var(--wsp); color: #fff; }
.hero-scroll { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; color: #fff; opacity: .6; font-size: 20px; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translate(-50%, 0);} 50% { transform: translate(-50%, 8px);} }

/* ---------- SECCIONES ---------- */
.section { padding: clamp(56px, 9vw, 110px) clamp(16px, 5vw, 64px); max-width: 1360px; margin: 0 auto; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: clamp(24px, 4vw, 44px); flex-wrap: wrap; }
.section-title { font-size: clamp(24px, 4vw, 44px); font-weight: 900; text-transform: uppercase; letter-spacing: .01em; }
.section-title small { display: block; font-family: var(--font-mono); font-size: 12px; font-weight: 400; letter-spacing: .28em; color: var(--accent); margin-bottom: 8px; }
.link-more { font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 2px solid var(--accent); padding-bottom: 3px; white-space: nowrap; }

/* categorías portada */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 24px); }
.cat-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--bone); color: var(--ink); aspect-ratio: 4 / 5;
  display: flex; align-items: flex-end; border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 22px 46px rgba(16,16,20,.13); border-color: #cfcfd4; }
.cat-card img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; object-position: center; padding: 15%;
  mix-blend-mode: multiply;
  animation: floaty 6s ease-in-out infinite;
}
/* desfase de la animación para que no floten al unísono */
.cat-card:nth-child(2) img { animation-delay: -2s; }
.cat-card:nth-child(3) img { animation-delay: -4s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.cat-card-label {
  position: relative; z-index: 2; width: 100%; padding: 18px 20px;
  background: linear-gradient(180deg, rgba(244,244,242,0) 0%, rgba(244,244,242,.9) 55%, var(--bone) 100%);
  display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap;
}
.cat-card-label h3 { font-size: clamp(16px, 2vw, 24px); text-transform: uppercase; font-weight: 800; }
.cat-card-label span { font-family: var(--font-mono); font-size: 12px; color: #6c6c74; }

/* ---------- CARDS DE PRODUCTO ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(14px, 2vw, 26px); }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(16,16,20,.10); border-color: #cfcfd4; }
.card-media {
  position: relative; aspect-ratio: 1 / 1; background: var(--bone);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
  padding: 10%; mix-blend-mode: multiply; transition: transform .4s ease;
}
.card:hover .card-media img { transform: scale(1.06); }
.badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
  background: var(--accent); color: #fff; padding: 5px 10px; border-radius: 100px;
}
.card-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-name { font-size: 14.5px; font-weight: 700; line-height: 1.3; min-height: 2.6em; }
.card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.card-price { font-family: var(--font-mono); font-size: 16px; font-weight: 600; }
.card-sizes { font-family: var(--font-mono); font-size: 11px; color: #6c6c74; letter-spacing: .04em; }

/* franja marquesina */
.marquee { background: var(--ink); color: #fff; overflow: hidden; padding: 14px 0; border-block: 1px solid #000; }
.marquee-track { display: flex; gap: 48px; white-space: nowrap; font-family: var(--font-mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; animation: marquee 28s linear infinite; width: max-content; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee em { color: var(--accent); font-style: normal; }

/* cómo comprar */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 32px); background: var(--bone); }
.step-num { font-family: var(--font-mono); color: var(--accent); font-size: 13px; letter-spacing: .2em; margin-bottom: 12px; }
.step h3 { font-size: 18px; margin-bottom: 8px; text-transform: uppercase; }
.step p { font-size: 14.5px; color: #4c4c54; }

/* ---------- CATÁLOGO ---------- */
.page-top { padding-top: calc(var(--header-h) + clamp(28px, 5vw, 56px)); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.chip {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase;
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  padding: 9px 16px; border-radius: 100px; transition: all .2s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: clamp(20px, 3vw, 32px); }
.search-box {
  flex: 1; min-width: 220px; max-width: 380px;
  display: flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line); border-radius: 100px; padding: 9px 18px; background: var(--paper);
}
.search-box input { border: none; outline: none; width: 100%; font-family: var(--font-mono); font-size: 13px; background: transparent; color: var(--ink); }
select.sort {
  font-family: var(--font-mono); font-size: 12.5px; padding: 9px 14px;
  border: 1.5px solid var(--line); border-radius: 100px; background: var(--paper); color: var(--ink);
}
.result-count { font-family: var(--font-mono); font-size: 12px; color: #6c6c74; margin-bottom: 16px; }
.empty-state { text-align: center; padding: 80px 20px; color: #6c6c74; font-family: var(--font-mono); }

/* ---------- PRODUCTO ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.gallery-main {
  aspect-ratio: 1 / 1; background: var(--bone); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line);
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 7%; mix-blend-mode: multiply; }
.thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.thumb {
  width: 72px; height: 72px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--bone); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 6px;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumb.active { border-color: var(--accent); }
.p-brand { font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
.p-name { font-size: clamp(24px, 3.4vw, 40px); font-weight: 900; line-height: 1.06; text-transform: uppercase; margin-bottom: 14px; }
.p-price { font-family: var(--font-mono); font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 26px; }
.p-label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: #6c6c74; margin-bottom: 10px; }
.size-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.size-opt {
  min-width: 52px; padding: 11px 14px; text-align: center;
  font-family: var(--font-mono); font-size: 14px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--paper); transition: all .15s ease;
}
.size-opt:hover { border-color: var(--ink); }
.size-opt.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.p-actions { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
.p-actions .btn { justify-content: center; width: 100%; }
.p-note { font-size: 13px; color: #6c6c74; margin-top: 18px; max-width: 460px; }
.p-note strong { color: var(--ink); }
.back-link { font-family: var(--font-mono); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: #6c6c74; display: inline-flex; gap: 8px; margin-bottom: 22px; }
.back-link:hover { color: var(--ink); }

/* relacionados */
.related-title { font-size: clamp(20px, 3vw, 30px); font-weight: 900; text-transform: uppercase; margin-bottom: 22px; }

/* ---------- CARRITO ---------- */
.cart-overlay { position: fixed; inset: 0; background: rgba(10,10,14,.5); z-index: 80; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 90;
  background: var(--paper); box-shadow: -18px 0 50px rgba(0,0,0,.18);
  transform: translateX(105%); transition: transform .35s cubic-bezier(.22,.8,.3,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cart-head h3 { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.cart-close { background: none; border: none; font-size: 22px; line-height: 1; color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 12px 22px; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item-img { width: 64px; height: 64px; border-radius: 10px; background: var(--bone); display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 5px; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-item-name { font-size: 13.5px; font-weight: 700; line-height: 1.3; }
.cart-item-meta { font-family: var(--font-mono); font-size: 12px; color: #6c6c74; margin-top: 3px; }
.cart-item-remove { background: none; border: none; color: var(--danger); font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 4px 0; }
.cart-empty { text-align: center; color: #6c6c74; font-family: var(--font-mono); font-size: 13px; padding: 48px 10px; }
.cart-foot { padding: 18px 22px 24px; border-top: 1px solid var(--line); }
.cart-total-row { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 15px; margin-bottom: 14px; }
.cart-foot .btn { width: 100%; justify-content: center; }
.cart-hint { font-size: 12px; color: #6c6c74; text-align: center; margin-top: 10px; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--ink); color: #fff; padding: clamp(40px, 7vw, 80px) clamp(16px, 5vw, 64px) 28px; margin-top: clamp(48px, 8vw, 100px); }
.footer-grid { max-width: 1360px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: clamp(24px, 5vw, 60px); }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { height: 52px; width: 52px; object-fit: contain; }
.footer-brand span { font-weight: 900; font-size: 18px; text-transform: uppercase; letter-spacing: .04em; }
.site-footer p { font-size: 14px; color: #b9b9c2; max-width: 380px; }
.footer-col h4 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: #8b8b96; margin-bottom: 16px; }
.footer-col a { display: block; padding: 6px 0; font-size: 14.5px; color: #e6e6ea; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-base { max-width: 1360px; margin: 40px auto 0; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-family: var(--font-mono); font-size: 11.5px; color: #8b8b96; }

/* botón flotante WhatsApp */
.wsp-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 56px; height: 56px; border-radius: 100px; background: var(--wsp);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .4);
  transition: transform .2s ease;
}
.wsp-fab:hover { transform: scale(1.08); }
.wsp-fab svg { width: 28px; height: 28px; fill: #fff; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 120%);
  background: var(--ink); color: #fff; font-family: var(--font-mono); font-size: 13px;
  padding: 13px 22px; border-radius: 100px; z-index: 100; transition: transform .35s cubic-bezier(.22,.8,.3,1);
  max-width: 90vw; text-align: center;
}
.toast.show { transform: translate(-50%, 0); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { aspect-ratio: 16 / 10; }
  .steps { grid-template-columns: 1fr; }
  .product-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .main-nav { gap: 16px; font-size: 12px; }
  .main-nav a:not(.nav-primary) { display: none; }
  .brand span { display: none; }
}
@media (max-width: 640px) {
  .main-nav { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-name { font-size: 12.5px; }
  .card-price { font-size: 14px; }
  .card-sizes { display: none; }
  .card-media img { padding: 8%; }
  /* En móvil la imagen es muy panorámica: la mostramos como banner más alto
     centrado en el logo (recorta los lados, nunca el logo). */
  .hero-bg { height: clamp(300px, 46svh, 400px); max-height: none; object-position: center; }
  .hero-content { padding-top: 14px; }
}
