/* =========================================================
   Maniacos — sistema visual
   Derivado del logo: negro sólido, itálica inclinada, corte
   diagonal. Magenta tomado del flyer de Instagram del local.
   ========================================================= */

:root {
  /* Color */
  --ink: #0C0C0E;
  --ink-2: #1A1A1F;
  --ink-soft: #55555F;
  --bone: #F1EFEA;
  --white: #FFFFFF;
  --magenta: #E10A7D;
  --violet: #5B1D8C;
  --ok: #0E7C5A;
  --line: rgba(12, 12, 14, .12);

  /* Tipografía */
  --display: 'Archivo', 'Arial Narrow', system-ui, sans-serif;
  --body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --data: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  /* Ritmo */
  --gap: 16px;
  --radius: 14px;
  --bar-h: 62px;
  --cut: 26px; /* profundidad del corte diagonal */

  --shadow: 0 6px 24px rgba(12, 12, 14, .12);
  --shadow-lg: 0 -10px 40px rgba(12, 12, 14, .22);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}

body.is-locked { overflow: hidden; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--magenta);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: var(--gap); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Tipos utilitarios ---------- */
.eyebrow {
  font-family: var(--data);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}
.mono { font-family: var(--data); font-variant-numeric: tabular-nums; }

/* =========================================================
   Barra superior
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background: var(--ink);
  color: var(--bone);
}
.topbar__inner {
  display: flex; align-items: center; gap: 12px;
  height: 56px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  text-decoration: none; color: inherit; margin-right: auto;
}
.brand__mark {
  width: 32px; height: 32px; flex: none;
  border: 2px solid currentColor; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 19px; line-height: 1; padding-right: 2px;
}
.brand__name {
  font-family: var(--display); font-weight: 800; font-style: italic;
  font-size: 19px; letter-spacing: .04em; text-transform: uppercase;
}
.icon-btn {
  position: relative;
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 10px;
  color: inherit;
}
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn svg { width: 21px; height: 21px; }
.badge-count {
  position: absolute; top: 2px; right: 1px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--magenta); color: #fff;
  border-radius: 9px;
  font-family: var(--data); font-size: 11px; font-weight: 600;
  display: grid; place-items: center;
}
.badge-count[hidden] { display: none; }

/* Cinta de anuncio */
.ticker {
  background: var(--magenta); color: #fff;
  font-family: var(--data); font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase;
  padding: 7px 12px; text-align: center;
  margin: 0; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
@media (min-width: 700px) { .ticker { font-size: 11.5px; letter-spacing: .08em; } }

/* =========================================================
   Hero: el corte diagonal. Dos mundos, una tienda.
   ========================================================= */
.hero { background: var(--ink); color: var(--bone); }
.hero__grid { display: grid; }

.gate {
  position: relative;
  display: block; width: 100%;
  border: 0; text-align: left; text-decoration: none;
  padding: 34px var(--gap) 40px;
  background: var(--ink-2); color: var(--bone);
  overflow: hidden;
  isolation: isolate;
}
/* Fondo con foto real de producto en vez del degradé sólido: el degradé se
   mantiene, pero ENCIMA de la foto (dos capas de `background`, la primera
   gana) para que el texto bone/blanco siga leyendo igual que antes — sólo
   cambia de "color plano" a "textura". Mobile-first: la imagen chica
   (~40KB) es la que carga por defecto; la de escritorio (~1600px, más
   pesada) recién entra en el breakpoint de 700px de más abajo, donde el
   panel también pasa a ocupar la mitad de la pantalla. */
.gate--ropa {
  background-image: linear-gradient(150deg, rgba(23, 23, 28, .62) 0%, rgba(12, 12, 14, .60) 70%),
    url('../img/gate-ropa-mobile.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), 0 100%);
  margin-bottom: calc(var(--cut) * -1);
  padding-bottom: calc(40px + var(--cut));
  z-index: 2;
}
.gate--aromas {
  background-image: linear-gradient(150deg, rgba(91, 29, 140, .59) 0%, rgba(42, 11, 69, .62) 78%),
    url('../img/gate-aromas-mobile.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding-top: calc(34px + var(--cut));
}
.gate__label {
  font-family: var(--display);
  font-weight: 900; font-style: italic;
  font-size: clamp(46px, 15vw, 96px);
  line-height: .86; letter-spacing: -.02em;
  text-transform: uppercase;
  margin: 0;
}
.gate--ropa .gate__label { color: var(--bone); }
.gate--aromas .gate__label { color: #fff; }
.gate__sub {
  margin: 10px 0 0; max-width: 30ch;
  font-size: 14.5px; color: rgba(241, 239, 234, .72);
}
.gate__go {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  font-family: var(--data); font-size: 12px; letter-spacing: .12em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--magenta);
}
.gate:hover .gate__go { gap: 14px; }
.gate__go svg { width: 15px; height: 15px; }

/* Marca de agua: repite la itálica del logo como textura */
.gate__ghost {
  position: absolute; right: -6%; bottom: -14%;
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: 150px; line-height: .8;
  color: rgba(255, 255, 255, .05);
  pointer-events: none; user-select: none; z-index: -1;
  letter-spacing: -.04em;
}

/* Franja de beneficios */
.perks {
  background: var(--ink); color: var(--bone);
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex; gap: 26px;
  overflow-x: auto; scrollbar-width: none;
  padding: 13px var(--gap);
  -webkit-overflow-scrolling: touch;
}
.perks::-webkit-scrollbar { display: none; }
.perk {
  display: flex; align-items: center; gap: 7px; flex: none;
  font-family: var(--data); font-size: 11.5px; letter-spacing: .05em;
  text-transform: uppercase; white-space: nowrap;
  color: rgba(241,239,234,.85);
}
.perk svg { width: 15px; height: 15px; color: var(--magenta); flex: none; }

/* =========================================================
   Secciones
   ========================================================= */
.section { padding: 40px 0 8px; }
.section--aromas { background: #EAE6F0; margin-top: 34px; padding-top: 40px; }

.section__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px;
}
.section__title {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: clamp(30px, 8vw, 46px); line-height: .9;
  letter-spacing: -.02em; text-transform: uppercase;
  margin: 0;
}
.section__count {
  font-family: var(--data); font-size: 12px; color: var(--ink-soft);
  white-space: nowrap; padding-bottom: 5px;
}

/* Chips de filtro */
.chips {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px var(--gap) 16px;
  margin-inline: calc(var(--gap) * -1);
  -webkit-overflow-scrolling: touch;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  padding: 9px 15px;
  background: transparent;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px; font-weight: 600; white-space: nowrap;
  color: var(--ink);
}
.chip[aria-pressed="true"] {
  background: var(--ink); border-color: var(--ink); color: var(--bone);
}

.moment-q {
  font-size: 14px; color: var(--ink-soft); margin: 0 0 10px;
}

/* =========================================================
   Grilla de productos
   ========================================================= */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding-bottom: 30px;
}

.card {
  display: flex; flex-direction: column;
  color: inherit; text-decoration: none;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left; border: 0; padding: 0;
  box-shadow: 0 1px 2px rgba(12,12,14,.06);
}
.card:hover { box-shadow: var(--shadow); }
.card:hover .card__art { transform: scale(1.03); }

.card__media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bone);
}
.card__art {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  transition: transform .35s ease;
}
/* Foto real del producto. `contain` porque los recortes vienen con alturas
   distintas: recortar por `cover` decapitaría los frascos altos. */
.card__foto {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 7%;
  transition: transform .35s ease;
}
.card:hover .card__foto { transform: scale(1.03); }

.card__flag {
  position: absolute; top: 9px; left: 9px; z-index: 2;
  background: var(--magenta); color: #fff;
  font-family: var(--data); font-size: 10px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 5px;
  max-width: calc(100% - 74px);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.card__off {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  background: var(--ink); color: var(--bone);
  font-family: var(--data); font-size: 11px; font-weight: 600;
  padding: 4px 7px; border-radius: 5px;
}
.card__agotado {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 12, 14, .6); color: var(--bone);
  font-family: var(--display); font-weight: 800; font-style: italic;
  font-size: 13px; letter-spacing: .05em; text-transform: uppercase;
}

.card__body { padding: 11px 12px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card__line {
  font-family: var(--data); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft);
}
.card__name {
  font-size: 14.5px; font-weight: 700; line-height: 1.25;
  margin: 1px 0 0;
}
.card__fmt { font-size: 12px; color: var(--ink-soft); line-height: 1.3; }

.price { margin-top: auto; padding-top: 8px; }
.price__list {
  font-family: var(--data); font-size: 11.5px;
  color: var(--ink-soft); text-decoration: line-through;
}
.price__now {
  font-family: var(--display); font-weight: 800; font-size: 19px;
  letter-spacing: -.01em; font-variant-numeric: tabular-nums;
  display: block; line-height: 1.15;
}
.price__transfer {
  font-family: var(--data); font-size: 11px; color: var(--ok);
  font-weight: 600; white-space: nowrap; display: block;
}
.price__transfer em { font-style: normal; opacity: .75; }

/* Tira de notas olfativas: la firma de la sección aromas */
.notes { display: flex; height: 4px; margin-top: 9px; border-radius: 2px; overflow: hidden; }
.notes span { flex: 1; }
.notes span:nth-child(1) { opacity: .45; }
.notes span:nth-child(2) { opacity: .72; }
.notes span:nth-child(3) { opacity: 1; }

/* =========================================================
   Cómo comprar
   ========================================================= */
.how { background: var(--ink); color: var(--bone); margin-top: 40px; padding: 40px 0 44px; }
.how__title {
  font-family: var(--display); font-weight: 900; font-style: italic;
  font-size: clamp(26px, 7vw, 38px); text-transform: uppercase;
  margin: 0 0 22px; line-height: .95;
}
.steps { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { display: flex; gap: 13px; align-items: flex-start; }
.step__n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--magenta); color: var(--magenta);
  display: grid; place-items: center;
  font-family: var(--data); font-size: 13px; font-weight: 600;
}
.step__t { font-weight: 700; font-size: 15px; margin: 3px 0 2px; }
.step__d { font-size: 13.5px; color: rgba(241,239,234,.68); margin: 0; }

/* =========================================================
   Pie
   ========================================================= */
.footer { padding: 34px 0 40px; font-size: 13.5px; color: var(--ink-soft); }
.footer__grid { display: grid; gap: 22px; }
.footer h3 {
  font-family: var(--data); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--ink); margin: 0 0 8px;
}
.footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.footer a:hover { border-color: var(--magenta); }
.footer__legal { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }

/* =========================================================
   Barra inferior (alcance del pulgar)
   ========================================================= */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(12, 12, 14, .94);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.1);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tab {
  background: transparent; border: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  color: rgba(241,239,234,.6);
  font-family: var(--data); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; text-decoration: none;
  position: relative;
}
.tab svg { width: 20px; height: 20px; }
.tab.is-active { color: var(--bone); }
.tab.is-active::before {
  content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 26px; height: 2px; background: var(--magenta);
}
.tab .badge-count { top: 4px; right: 50%; margin-right: -22px; }

/* =========================================================
   Hojas inferiores (producto y carrito)
   ========================================================= */
.scrim {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(12, 12, 14, .55);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.scrim.is-open { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  max-height: 88vh;
  background: var(--bone);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(101%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
.sheet.is-open { transform: translateY(0); }
.sheet__head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px var(--gap) 10px;
  border-bottom: 1px solid var(--line);
}
.sheet__title {
  font-family: var(--display); font-weight: 900; font-style: italic;
  text-transform: uppercase; font-size: 20px; margin: 0; flex: 1;
}
.sheet__body { overflow-y: auto; padding: var(--gap); flex: 1; -webkit-overflow-scrolling: touch; }
.sheet__foot {
  padding: 12px var(--gap) calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--white);
}

/* Detalle de producto */
.detail__art { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; position: relative; }
.detail__line {
  font-family: var(--data); font-size: 10.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-soft); margin: 16px 0 4px;
}
.detail__name {
  font-family: var(--display); font-weight: 800; font-size: 25px;
  line-height: 1.05; margin: 0 0 6px;
}
.detail__desc { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; }

.pyramid { display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 18px; }
.pyramid__row { display: flex; gap: 12px; background: var(--white); padding: 10px 12px; align-items: baseline; }
.pyramid__k {
  font-family: var(--data); font-size: 10.5px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-soft); width: 62px; flex: none;
}
.pyramid__v { font-size: 14px; font-weight: 600; }

.picker__label { font-size: 13px; font-weight: 700; margin: 0 0 8px; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.size {
  min-width: 46px; padding: 10px 12px;
  border: 1.5px solid var(--line); border-radius: 9px;
  background: var(--white); font-family: var(--data); font-size: 13px;
}
.size[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bone); }
.size[disabled] { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.detail__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.detail__price .price__now { font-size: 30px; }
/* En el detalle hay espacio: la línea de pago puede envolver. */
.sheet__body .price__transfer { white-space: normal; line-height: 1.45; }

/* Botones */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: 100%; padding: 15px 18px;
  border: 0; border-radius: 12px;
  font-family: var(--display); font-weight: 800; font-style: italic;
  font-size: 15px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--ink); color: var(--bone);
  text-decoration: none;
}
.btn:hover { background: var(--ink-2); }
.btn--wa { background: var(--ok); color: #fff; }
.btn--wa:hover { background: #0B6349; }
.btn svg { width: 19px; height: 19px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Carrito */
.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line__art { width: 58px; height: 74px; border-radius: 8px; overflow: hidden; flex: none; position: relative; }
.cart-line__info { flex: 1; min-width: 0; }
.cart-line__name { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.cart-line__meta { font-family: var(--data); font-size: 11px; color: var(--ink-soft); }
.cart-line__price { font-family: var(--data); font-weight: 600; font-size: 14px; margin-top: 6px; }
.qty { display: flex; align-items: center; gap: 2px; margin-top: 8px; }
.qty button {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--white);
  display: grid; place-items: center; font-size: 17px; line-height: 1;
}
.qty span { min-width: 30px; text-align: center; font-family: var(--data); font-size: 14px; }

.totals { padding-top: 14px; display: grid; gap: 7px; }
.totals__row { display: flex; justify-content: space-between; font-size: 14px; }
.totals__row--big { font-size: 17px; font-weight: 800; padding-top: 8px; border-top: 1px solid var(--line); }
.totals__row .mono { font-weight: 600; }
/* Nota informativa, no un beneficio: va en gris, no en verde. */
.totals__hint { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 0; }

.empty { text-align: center; padding: 46px 20px; color: var(--ink-soft); }
.empty__t { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 21px; color: var(--ink); text-transform: uppercase; margin: 0 0 6px; }

/* =========================================================
   Escritorio
   ========================================================= */
@media (min-width: 700px) {
  :root { --gap: 24px; --cut: 84px; }
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .hero__grid { grid-template-columns: 1fr 1fr; }
  .gate { padding: 74px 40px 78px; min-height: 62vh; display: flex; flex-direction: column; justify-content: flex-end; }
  .gate--ropa {
    /* width:100% de la regla base impide que el margen negativo ensanche
       el panel, así que el ancho se pide explícito para que la diagonal
       tenga por dónde cruzar sobre el panel de aromas. */
    width: calc(100% + var(--cut));
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--cut)) 100%, 0 100%);
    margin-bottom: 0; margin-right: calc(var(--cut) * -1);
    padding-bottom: 78px; padding-right: calc(40px + var(--cut));
    /* Recién acá, con el panel ocupando la mitad de una pantalla de
       escritorio, vale la pena bajar la versión más pesada de la foto. */
    background-image: linear-gradient(150deg, rgba(23, 23, 28, .62) 0%, rgba(12, 12, 14, .60) 70%),
      url('../img/gate-ropa.jpg');
  }
  .gate--aromas {
    padding-top: 74px; padding-left: calc(40px + var(--cut));
    background-image: linear-gradient(150deg, rgba(91, 29, 140, .59) 0%, rgba(42, 11, 69, .62) 78%),
      url('../img/gate-aromas.jpg');
  }
  /* El panel es flex en escritorio: sin esto el subrayado se estira. */
  .gate__go { align-self: flex-start; }
  .gate__ghost { font-size: 230px; }
  .grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .section { padding-top: 62px; }
  .footer__grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 26px; }
  .sheet { left: auto; right: 0; top: 0; bottom: 0; width: min(460px, 100%); max-height: none; border-radius: 0; transform: translateX(101%); }
  .sheet.is-open { transform: translateX(0); }
}

@media (min-width: 1024px) {
  .grid { gap: 22px; }
}

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