/* ==========================================================================
   ESTILOS — catálogo mayorista de perfumería árabe.
   Los colores y tipografías se definen en config/site.config.js
   (boot.js los aplica como variables CSS).
   ========================================================================== */

:root {
  --bg: #fbf9f4;
  --surface: #ffffff;
  --surface-alt: #f3efe6;
  --ink: #16130f;
  --muted: #6b6357;
  --line: #e6dfd2;
  --accent: #9c7c2e;
  /* Fallback si boot.js no recibe colors.accentText desde la configuración. */
  --accent-text: #7d6118;
  --accent-soft: #f5edd8;
  --wa: #17803f;
  --wa-dark: #126632;
  --danger: #a3271f;
  --font-head: "Marcellus", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 19, 15, .06), 0 6px 20px rgba(22, 19, 15, .06);
  --shadow-hover: 0 2px 4px rgba(22, 19, 15, .08), 0 14px 32px rgba(22, 19, 15, .12);
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 68px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.is-locked { overflow: hidden; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: 0; }
p { margin: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mobile-only { display: none; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 200; text-decoration: none; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; }
.icon--fill { width: 18px; height: 18px; }
.noscript { padding: 16px; text-align: center; background: var(--accent-soft); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; line-height: 1; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--accent); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--surface); }
.btn--danger { background: transparent; border-color: #e5c4c0; color: var(--danger); }
.btn--danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 999px; border: 0; background: transparent; transition: background-color .2s var(--ease);
}
.icon-btn:hover { background: var(--surface-alt); }
.icon-btn--outline { border: 1.5px solid var(--line); background: var(--surface); width: 40px; height: 40px; }
.icon-btn--outline:hover { border-color: var(--ink); background: var(--surface); }
.icon-btn.is-active { color: var(--danger); }
.link-btn { background: none; border: 0; padding: 4px 0; font-size: 14px; color: var(--accent-text); text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--ink); }

/* ---------- Barra superior y encabezado ---------- */
.topbar { background: var(--ink); color: #efe9df; font-size: 13px; letter-spacing: .04em; text-align: center; padding: 9px 0; }
.dollar-bar { background: var(--surface-alt); border-bottom: 1px solid var(--line); font-size: 12px; }
.dollar-bar__inner { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; }
.dollar-bar__updated { color: var(--muted); }
.dollar-bar { background: var(--surface-alt); border-bottom: 1px solid var(--line); font-size: 12px; }
.header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header .container { max-width: 100%; padding-inline: var(--gutter); }
.header__inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.logo { margin-right: 0; }
.nav { margin-inline: auto; }
.header__actions { margin-left: 0; }
.logo { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1.1; margin-right: 0; }
.logo__mark { font-family: var(--font-head); font-size: 23px; font-weight: 400; letter-spacing: .06em; }
.logo__mark::after { content: ""; display: block; width: 34px; height: 2px; margin-top: 5px; background: var(--accent); }
.logo__tag { white-space: nowrap; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.logo__img { height: 32px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; transition: border-color .2s var(--ease), color .2s var(--ease); }
.nav a:hover { border-color: var(--accent); color: var(--accent-text); }

/* --- Menú con subcategorías --- */
.nav-list { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font-size: 15px; font-weight: 500; padding: 6px 0; cursor: pointer; color: inherit; }
.nav-link .icon { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.has-sub:hover .nav-link .icon, .has-sub:focus-within .nav-link .icon, .has-sub.open .nav-link .icon { transform: rotate(180deg); }
.nav-sub { position: absolute; top: 100%; left: 0; min-width: 190px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px 0; list-style: none; margin: 0; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s; z-index: 60; }
.has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub, .has-sub.open .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: 10px 16px; font-size: 15px; text-decoration: none; color: var(--ink); border-bottom: 0; }
.nav-sub a:hover { background: var(--surface-alt); color: var(--accent-text); border-color: transparent; }

/* --- Explorar por género --- */
.gender-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gender-grid .cat-card { min-height: 360px; }
.gender-grid .cat-card__img { height: 100%; object-fit: cover; }
.gender-grid .cat-card__count { color: #e7cd8b; border-top: 1px solid rgba(255,255,255,.18); padding-top: 10px; }
.header__actions { display: flex; align-items: center; gap: 4px; }
.header__wa { margin-inline: 8px; }
.menu-btn { display: none; }
.cart-btn__count {
  position: absolute; top: 3px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(48px, 8vw, 88px); scroll-margin-top: var(--header-h); }
.section--alt { background: var(--surface-alt); }
.section__head { margin-bottom: 32px; max-width: 660px; }
.section__head h2, .contact h2 { font-size: clamp(28px, 4vw, 40px); }
.section__sub { color: var(--muted); margin-top: 10px; max-width: 58ch; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 10px; }
[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

/* ---------- Portada ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr);
  grid-template-areas: "content media";
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(18px, 3vw, 36px) var(--gutter) clamp(48px, 8vw, 88px);
  scroll-margin-top: var(--header-h);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 66px); letter-spacing: 0; }
.hero__lead { margin-top: 18px; font-size: clamp(16px, 1.6vw, 18px); color: var(--muted); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero__points { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); }
.hero__points li { display: inline-flex; align-items: center; gap: 6px; }
.hero__points .icon { width: 16px; height: 16px; color: var(--accent); }
.hero__visual { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1 / .92; }
.hero__tile { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.hero__tile--1 { grid-row: 1 / 3; }
.hero__tile .art, .hero__tile .media-img { width: 100%; height: 100%; object-fit: cover; }
.hero__tilecap { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 8px; align-items: baseline; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .94); font-size: 12px; }
.hero__tilecap span { color: var(--muted); }
.hero__photo { height: 100%; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); grid-column: 1 / 3; grid-row: 1 / 3; background: var(--surface); border: 1px solid var(--line); }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Categorías ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.cat-card {
  display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); border-color: var(--accent); }
.cat-card__name { font-family: var(--font-head); font-size: 21px; font-weight: 400; }
.cat-card__desc { color: var(--muted); font-size: 14px; }
.cat-card__count { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--accent-text); }

/* Tarjetas visuales: imagen de fondo, degradado y texto oscuro para contraste */
.cat-card--visual {
  position: relative; min-height: 320px; padding: 0; overflow: hidden;
  background: var(--ink); color: #f6f1e7; border-color: transparent; justify-content: flex-end;
}
.cat-card--visual:hover { border-color: var(--accent); }
.cat-card__media { position: absolute; inset: 0; display: block; }
.cat-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12, 10, 7, .12) 0%, rgba(12, 10, 7, .58) 55%, rgba(12, 10, 7, .9) 100%); }
.cat-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.cat-card--visual:hover .cat-card__img { transform: scale(1.04); }
.cat-card__pattern { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(216, 180, 95, .18) 0 14px, transparent 14px 28px), linear-gradient(160deg, #26201a, #14110d); }
.cat-card__body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 22px; }
.cat-card--visual .cat-card__name { color: #fff; }
.cat-card--visual .cat-card__desc { color: #e2d8c9; }
.cat-card--visual .cat-card__count { color: #e7cd8b; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 10px; }
.cat-card--visual .cat-card__count .icon { width: 16px; height: 16px; }


/* ---------- Grilla y tarjetas ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: var(--surface-alt); aspect-ratio: 1 / 1; overflow: hidden; }
.card__media .art { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card__media .media-img { width: 100%; height: 100%; object-fit: contain; padding: 12px; background: var(--surface); transition: transform .5s var(--ease); }
.card:hover .card__media .art, .card:hover .card__media .media-img { transform: scale(1.03); }
.card.is-out .card__media .art, .card.is-out .card__media .media-img { opacity: .65; }
.badge { position: absolute; top: 10px; padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: .02em; }
.badge--offer { left: 10px; background: var(--accent); color: #fff; }
.badge--new { left: 10px; background: var(--ink); color: #f0d98a; border: 1px solid var(--accent); }
.badge--out { right: 10px; background: var(--danger); color: #fff; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card__brand { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.card__cat { font-weight: 500; letter-spacing: 0; text-transform: none; }
.card__cat::before { content: "·"; margin: 0 5px; }
.card__name { font-family: var(--font-head); font-size: 18px; line-height: 1.3; }
.card__desc { font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-top: auto; padding-top: 8px; }
.card__price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card__meta-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.card__size { font-size: 12px; font-weight: 600; color: var(--muted); }
.price { font-size: 19px; font-weight: 700; }
.price--ask { font-size: 15px; color: var(--muted); font-weight: 600; }
.price-old { font-size: 14px; color: var(--muted); }
.avail { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.avail--in_stock { color: #1f7a3d; }
.avail--low_stock { color: #9a5b00; }
.avail--out_of_stock { color: var(--danger); }
.avail--to_confirm { color: var(--accent-text); }
.card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.card__actions .btn { flex: 1 1 120px; padding-inline: 10px; }
.card__actions .btn--ghost { flex-basis: 100%; order: 3; }
.card__actions .icon-btn { flex: 0 0 44px; }

/* ---------- Buscador, filtros, resultados ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--search { position: relative; flex: 1 1 280px; }
.field__icon { position: absolute; left: 14px; top: 13px; color: var(--muted); pointer-events: none; }
.field input, .field select, .form-field input, .form-field select, .form-field textarea {
  width: 100%; min-height: 48px; padding: 0 14px; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); transition: border-color .2s var(--ease);
}
.field--search input { padding-left: 44px; }
.field input:hover, .field select:hover, .form-field input:hover, .form-field select:hover, .form-field textarea:hover { border-color: #c9bfb1; }
.field input:focus, .field select:focus, .form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field--sort { min-width: 220px; }

.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.filters .field select { min-height: 44px; font-size: 14px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-size: 14px; font-weight: 500; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip__n { font-size: 12px; opacity: .65; }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 16px; min-height: 28px; font-size: 14px; color: var(--muted); }
.empty { text-align: center; padding: 56px 20px; background: var(--surface); border: 1px dashed #cfc5b7; border-radius: var(--radius-lg); }
.empty h3 { font-size: 22px; }
.empty p { color: var(--muted); margin: 8px auto 22px; max-width: 46ch; }
.empty__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---------- Beneficios / condiciones mayoristas ---------- */
.benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.benefit { padding-top: 18px; border-top: 2px solid var(--ink); }
.benefit__n { display: block; font-size: 13px; font-weight: 700; color: var(--accent-text); margin-bottom: 14px; letter-spacing: .08em; }
.benefit h3 { font-size: 20px; margin-bottom: 8px; }
.benefit p { color: var(--muted); font-size: 15px; }

/* ---------- Contacto ---------- */
.contact { background: var(--ink); color: #f4efe8; }
.contact .eyebrow { color: #d8b45f; }
.contact .section__sub { color: #cfc6bb; margin-bottom: 26px; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; min-width: 0; }
.contact__inner > * { min-width: 0; }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.contact__list li { display: flex; gap: 14px; min-width: 0; }
.contact__icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .08); color: #d8b45f; }
.contact__label { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #b9afa3; }
.contact__value { display: block; overflow-wrap: anywhere; }
.contact a { text-underline-offset: 3px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .12); margin-left: 6px; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.contact .note { color: #b9afa3; }

/* ---------- Pie ---------- */
.footer { background: var(--surface-alt); border-top: 1px solid var(--line); padding-top: clamp(40px, 6vw, 60px); font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr .8fr 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); padding-bottom: 36px; }
.footer__brand .logo { margin: 0 0 14px; }
.footer__brand .logo__mark { font-size: 22px; letter-spacing: .06em; }
.footer__about { color: var(--muted); max-width: 38ch; }
.footer__igtext { color: var(--muted); font-size: 13px; margin-top: 10px; max-width: 32ch; }
.footer__title { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer__list a { color: var(--muted); text-decoration: none; }
.footer__list a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer__list--text { color: var(--muted); gap: 8px; max-width: 36ch; }
.footer__list--text strong { color: var(--ink); }
#footerContact li { display: flex; gap: 8px; align-items: flex-start; color: var(--muted); }
.footer__ico { display: inline-flex; margin-top: 2px; color: var(--accent-text); }
.footer__ico .icon { width: 16px; height: 16px; }
.btn--ig { margin-top: 18px; background: var(--ink); border: 1px solid var(--ink); color: #fff; }
.btn--ig:hover { background: var(--accent-text); border-color: var(--accent-text); }
.btn--ig .icon { width: 17px; height: 17px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 18px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer__legal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.footer__legal a { color: var(--muted); text-decoration: none; }
.footer__legal a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cómo comprar ---------- */
.howbuy { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.howbuy__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px 22px; display: grid; gap: 12px; align-content: start; }
.howbuy__ico { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.howbuy__ico .icon { width: 22px; height: 22px; }
.howbuy__ttl { font-size: 18px; }
.howbuy__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.howbuy__list--steps { list-style: decimal; padding-left: 20px; }
.howbuy__note { color: var(--muted); font-size: 14px; }
.howbuy__data { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.howbuy__data li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; font-size: 14px; }
.howbuy__data span { color: var(--muted); }
.howbuy__data strong { color: var(--ink); font-weight: 600; word-break: break-all; text-align: right; }

/* ---------- Catálogo: ver más ---------- */
.catalog__more { display: grid; justify-items: center; gap: 10px; margin-top: 30px; }
.catalog__more-info { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Diálogos ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--surface); max-width: none; max-height: none; }
dialog::backdrop { background: rgba(22, 19, 15, .55); }
dialog[open] { animation: dialog-in .25s var(--ease); }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.modal { width: min(920px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); margin: auto; border-radius: var(--radius-lg); overflow: hidden; }
.modal--wide { width: min(1040px, calc(100vw - 32px)); }
.modal__panel { position: relative; max-height: calc(100dvh - 32px); overflow: auto; }
.modal__close { position: absolute; top: 10px; right: 10px; z-index: 2; background: rgba(255, 255, 255, .9); }
.detail { display: grid; grid-template-columns: 1fr 1fr; }
.detail__media { position: relative; background: var(--surface-alt); aspect-ratio: 1 / 1; align-self: start; }
.detail__media .art { width: 100%; height: 100%; object-fit: cover; }
.detail__media .media-img { width: 100%; height: 100%; object-fit: contain; padding: 18px; background: var(--surface); }
.detail__info { padding: clamp(22px, 4vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.detail__info h2 { font-size: clamp(26px, 3.4vw, 34px); padding-right: 40px; }
.detail__price { display: flex; align-items: baseline; gap: 10px; }
.detail__price .price { font-size: 28px; }
.detail__desc { color: var(--muted); }
.detail__facts { display: grid; gap: 10px; margin: 4px 0; padding: 14px 0; border-block: 1px solid var(--line); }
.detail__facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.detail__facts dt { color: var(--muted); }
.detail__facts dd { margin: 0; font-weight: 600; text-align: right; }
.detail__review { background: var(--accent-soft); border: 1px solid #e8d9a8; color: #5c4a12; padding: 10px 14px; border-radius: var(--radius); font-size: 13px; }
.detail__actions { display: grid; gap: 10px; margin-top: 6px; }

.drawer { margin: 0 0 0 auto; width: min(440px, 100vw); height: 100dvh; max-height: 100dvh; }
.drawer[open] { animation: drawer-in .28s var(--ease); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer__panel { display: flex; flex-direction: column; height: 100%; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 22px; }
.drawer__empty { padding: 40px 24px; display: grid; gap: 10px; justify-items: start; color: var(--muted); }
.drawer__empty .btn { margin-top: 12px; }
.drawer__lines { list-style: none; margin: 0; padding: 8px 22px; overflow: auto; flex: 1; }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: start; }
.line__img { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--surface-alt); }
.line__img .art { width: 100%; height: 100%; object-fit: cover; }
.line__img .media-img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.line__name { font-weight: 600; line-height: 1.3; }
.line__brand { font-size: 13px; color: var(--muted); }
.line__price { font-weight: 700; margin: 4px 0 8px; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty__btn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; }
.qty__btn:hover { background: var(--surface-alt); }
.qty__btn .icon { width: 16px; height: 16px; }
.qty__input { width: 44px; height: 36px; border: 0; text-align: center; background: transparent; -moz-appearance: textfield; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.drawer__foot { padding: 16px 22px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--bg); justify-items: stretch; }
.drawer__foot .link-btn { justify-self: center; }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; }
.subtotal strong { font-size: 22px; }

/* ---------- Panel de administración ---------- */
.admin-body { padding: 18px 22px 24px; display: grid; gap: 14px; }
.admin-lead { color: var(--muted); font-size: 14px; }
.admin-warn { background: #fff4d6; border: 1px solid #ecd48b; color: #54420a; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.admin-notice { background: var(--accent-soft); padding: 10px 14px; border-radius: var(--radius); font-size: 14px; }
.admin-review { background: var(--accent-soft); border: 1px solid #e8d9a8; color: #5c4a12; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; }
.admin-review h3 { font-size: 15px; font-family: var(--font-body); font-weight: 700; margin-bottom: 6px; }
.admin-review ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-count { font-size: 13px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.admin-table th, .admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table th { background: var(--surface-alt); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-name span { display: block; color: var(--muted); font-size: 12px; }
.admin-actions { white-space: nowrap; display: flex; gap: 6px; }
.admin-form { padding: 18px 22px 24px; display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form-field--full { grid-column: 1 / -1; }
.form-field textarea { padding: 12px 14px; min-height: 0; resize: vertical; }
.form-field input[type="file"] { border: 1.5px dashed var(--line); padding: 10px; min-height: 0; background: var(--bg); }
.hint { font-size: 12px; font-weight: 400; color: var(--muted); }
.form-check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; align-self: end; min-height: 48px; }
.form-check input { width: 20px; height: 20px; accent-color: var(--accent); }
.form-errors { background: #fdecea; border: 1px solid #f0bdb7; color: #6f1812; padding: 12px 14px; border-radius: var(--radius); font-size: 14px; }
.form-errors ul { margin: 6px 0 0; padding-left: 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-preview { width: 120px; height: 120px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.admin-preview img { width: 100%; height: 100%; object-fit: contain; background: var(--surface); }

/* ---------- Aviso ---------- */
#toast {
  position: fixed; inset: auto auto 24px 50%; margin: 0; transform: translate(-50%, 10px); border: 0; padding: 12px 18px;
  background: var(--ink); color: #fff; border-radius: 999px; font-size: 14px; max-width: calc(100vw - 32px);
  box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease), transform .25s var(--ease);
}
#toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .benefits { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 40px; }
}
@media (max-width: 900px) {
  :root { --header-h: 62px; }
  .logo__tag { display: none; }
  .menu-btn { display: inline-grid; }
  .header__wa span { display: none; }
  .header__wa { width: 44px; padding: 0; margin-inline: 4px; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(22, 19, 15, .08);
    max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s var(--ease), visibility .3s;
  }
  .nav.is-open { max-height: 520px; visibility: visible; }
  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-item { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-item > a { display: block; width: 100%; padding: 15px var(--gutter); border-bottom: 0; font-size: 16px; }
  .nav-link { width: 100%; justify-content: space-between; padding: 15px var(--gutter); font-size: 16px; }
  .nav-sub { position: static; min-width: 0; background: var(--surface-alt); border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; padding: 0; display: none; }
  .has-sub.open .nav-sub { display: block; }
  .nav-sub a { padding: 12px var(--gutter) 12px calc(var(--gutter) + 12px); font-size: 15px; color: var(--muted); }
  .gender-grid { grid-template-columns: 1fr; gap: 14px; }
  .gender-grid .cat-card { min-height: 260px; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { aspect-ratio: 16 / 10; order: -1; }
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas: "media" "content";
    gap: 26px;
    padding-top: 16px;
    padding-bottom: clamp(40px, 8vw, 72px);
  }
  .hero__carousel { width: min(100%, 480px); justify-self: center; border-radius: 16px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card--visual { min-height: 260px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .contact__inner { grid-template-columns: 1fr; }
  .detail { grid-template-columns: 1fr; }
  .detail__media { aspect-ratio: 4 / 3; }
}
/* Notebooks chicas: el menú desplegable evita que el encabezado desborde. */
@media (min-width: 901px) and (max-width: 1120px) {
  .menu-btn { display: inline-grid; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg);
    border-bottom: 1px solid var(--line); box-shadow: 0 14px 24px rgba(22, 19, 15, .08);
    max-height: 0; overflow: hidden; visibility: hidden; transition: max-height .3s var(--ease), visibility .3s;
  }
  .nav.is-open { max-height: 520px; visibility: visible; }
  .nav-list { flex-direction: column; gap: 0; width: 100%; }
  .nav-item { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-item > a { display: block; width: 100%; padding: 15px var(--gutter); border-bottom: 0; font-size: 16px; }
  .nav-link { width: 100%; justify-content: space-between; padding: 15px var(--gutter); font-size: 16px; }
  .nav-sub { position: static; min-width: 0; background: var(--surface-alt); border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none; padding: 0; display: none; }
  .has-sub.open .nav-sub { display: block; }
  .nav-sub a { padding: 12px var(--gutter) 12px calc(var(--gutter) + 12px); font-size: 15px; color: var(--muted); }
}
@media (max-width: 560px) {
  .hero__visual { display: none; }
  .hero__carousel { width: 100%; }
  .hero__carousel::after { inset: 10px; border-radius: 10px; }
  .hero__stamp { left: 16px; bottom: 16px; font-size: 9px; }
  .hero__arrow { width: 38px; height: 38px; }
  .hero__arrow--prev { left: 10px; }
  .hero__arrow--next { right: 10px; }
  .hero__dots { right: 16px; bottom: 14px; }
  .hero__cta .btn { width: 100%; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card--visual { min-height: 240px; }
  .benefits { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .footer__brand .logo { margin-bottom: 10px; }
  .footer__about, .footer__igtext, .footer__list--text { max-width: none; }
  .footer__bottom { padding-block: 16px 22px; }
  .card__body { padding: 12px; }
  .card__name { font-size: 16px; }
  .card__desc { display: none; }
  .card__actions .btn--wa span:not(.sr-only) { font-size: 13px; }
  .field--sort { width: 100%; }
  .filters { grid-template-columns: 1fr; gap: 10px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 0; }
  .modal__panel { max-height: 100dvh; }
}
@media (max-width: 380px) {
  .grid { grid-template-columns: 1fr; }
}
/* ---------- Hero carousel ---------- */
.hero__carousel {
  grid-area: media;
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 4 / 5;
  justify-self: end;
  overflow: hidden;
  border-radius: 20px;
  background: #1b1713;
  box-shadow: 0 28px 60px rgba(22, 19, 15, .20), 0 2px 6px rgba(22, 19, 15, .08);
  isolation: isolate;
}
.hero__carousel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(232, 208, 154, .38);
  border-radius: 13px;
  pointer-events: none;
  z-index: 2;
}
.hero__slides { position: relative; width: 100%; height: 100%; }
.hero__slide { position: absolute; inset: 0; overflow: hidden; background: #1b1713; opacity: 0; transition: opacity .9s var(--ease); }
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(14, 11, 8, .16) 0%, rgba(14, 11, 8, 0) 26%, rgba(14, 11, 8, 0) 58%, rgba(14, 11, 8, .62) 100%),
    radial-gradient(115% 80% at 50% 42%, rgba(14, 11, 8, 0) 58%, rgba(14, 11, 8, .22) 100%);
}
.hero__fg { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero__fallback { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: #efe9df; font-size: 14px; }
.hero__stamp {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .92);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  pointer-events: none;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .65);
}
.hero__stamp::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #d8b45f; box-shadow: 0 0 0 3px rgba(216, 180, 95, .16); }
.hero__arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--ink); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; transition: background-color .2s var(--ease), transform .2s var(--ease); }
.hero__arrow:hover { background: #fff; transform: translateY(-50%) scale(1.04); }
.hero__arrow--prev { left: 14px; }
.hero__arrow--next { right: 14px; }
.hero__dots { position: absolute; right: 22px; bottom: 20px; display: flex; gap: 8px; z-index: 3; }
.hero__dot { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); transition: transform .2s var(--ease), background-color .2s var(--ease); }
.hero__dot.is-active { background: #fff; transform: scale(1.25); }
.hero__content { grid-area: content; padding-top: 0; }

@media (max-width: 380px) {
  .hero__stamp { display: none; }
  .hero__dots { left: 50%; right: auto; transform: translateX(-50%); }
}

/* ---------- Mobile compacto ---------- */
@media (max-width: 560px) {
  :root { --header-h: 56px; }
  .topbar { font-size: 11px; letter-spacing: .02em; line-height: 1.4; padding: 6px 0; }
  .header__inner { gap: 8px; }
  .logo { min-width: 0; }
  .logo__mark { font-size: 18px; letter-spacing: .04em; white-space: nowrap; }
  .logo__mark::after { width: 26px; margin-top: 4px; }
  .menu-btn, .icon-btn { width: 38px; height: 38px; }
  .header__actions { gap: 0; }
  .header__wa { width: 38px; min-height: 38px; padding: 0; margin-inline: 0; }

  .hero { gap: 18px; padding-top: 12px; padding-bottom: 36px; }
  .hero__content .eyebrow { display: none; }
  .hero h1 { font-size: clamp(32px, 9.2vw, 38px); }
  .hero__lead { margin-top: 12px; font-size: 15px; line-height: 1.5; }
  .hero__cta { gap: 10px; margin-top: 20px; }
  .hero__cta .btn { width: auto; flex: 1 1 0; min-width: 0; min-height: 48px; padding: 0 12px; font-size: 14px; }
  .hero__points { display: none; }
  .hero__carousel { width: min(100%, 480px); justify-self: center; aspect-ratio: 1 / 1.1; border-radius: 16px; }
  .hero__stamp { font-size: 10px; }
}
@media (max-width: 380px) {
  :root { --header-h: 54px; }
  .topbar { font-size: 10px; }
  .header__inner { gap: 6px; }
  .logo__mark { font-size: 16px; }
  .menu-btn, .icon-btn { width: 34px; height: 34px; }
  .header__wa { width: 34px; min-height: 34px; }
  .hero h1 { font-size: 32px; }
  .hero__lead { font-size: 14.5px; }
}
@media (max-width: 340px) {
  .header .container { padding-inline: 10px; }
  .logo__mark { font-size: 15px; }
}

/* Tablets: portada en dos columnas para evitar el apilado largo. */
@media (min-width: 561px) and (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .9fr);
    grid-template-areas: "content media";
    gap: clamp(24px, 3.5vw, 48px);
    align-items: center;
    padding-top: 20px;
    padding-bottom: 52px;
  }
  .hero__content .eyebrow { display: none; }
  .hero h1 { font-size: clamp(38px, 5.2vw, 52px); }
  .hero__lead { margin-top: 14px; font-size: 16px; }
  .hero__cta { margin-top: 22px; gap: 10px; }
  .hero__cta .btn { min-height: 48px; padding: 0 18px; font-size: 14px; }
  .hero__points { display: none; }
  .hero__carousel { width: 100%; max-width: 100%; justify-self: end; aspect-ratio: 4 / 5; border-radius: 18px; }
}

@media (min-width: 561px) and (max-width: 720px) {
  .hero__stamp { display: none; }
  .hero__dots { left: 50%; right: auto; transform: translateX(-50%); }
}

/* Marcas y categorías: carrusel horizontal en celular para que no ocupen toda la pantalla. */
@media (max-width: 560px) {
  .mobile-only { display: inline; }
  #brandsGrid.cat-grid,
  #catGrid.cat-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(to right, #000 82%, transparent);
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  }
  #brandsGrid.cat-grid::-webkit-scrollbar,
  #catGrid.cat-grid::-webkit-scrollbar { display: none; }
  #brandsGrid .cat-card--visual,
  #catGrid .cat-card--visual {
    flex: 0 0 72%;
    min-height: 180px;
    scroll-snap-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .header, .topbar, dialog, #toast { display: none !important; }
}
