/* ==========================================================================
   Ferretería La Herradura — estilos de la tienda
   Paleta del logotipo: azul herradura + naranja
   ========================================================================== */

:root {
  --blue: #154C8A;
  --blue-700: #0F3A6B;
  --blue-900: #0A2547;
  --blue-50: #EEF4FB;
  --blue-100: #DCE8F6;
  --orange: #EF6A28;
  --orange-600: #D9561A;
  --orange-50: #FFF3EC;
  --green: #1F8A4C;
  --green-50: #E9F7EF;
  --wa: #1FAF55;
  --wa-600: #178F45;
  --amber: #B45309;
  --amber-50: #FFF7E6;
  --red: #C62828;

  --ink: #14202E;
  --ink-2: #3B4A5C;
  --muted: #64748B;
  --line: #E2E8F0;
  --line-2: #CBD5E1;
  --bg: #F5F7FA;
  --card: #FFFFFF;

  --wadfow: #F26B1D;
  --total: #0B8A8A;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 30, 50, .06);
  --shadow: 0 4px 14px rgba(15, 30, 50, .08);
  --shadow-lg: 0 18px 40px rgba(15, 30, 50, .18);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --header-h: 76px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 140px; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-scroll { overflow: hidden; }
main { flex: 1; outline: none; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
h1, h2, h3 { line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.45rem, 2.4vw, 1.9rem); font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; font-weight: 800; }
h3 { font-size: 1rem; font-weight: 700; }
code { background: var(--blue-50); padding: .1em .35em; border-radius: 4px; font-size: .9em; }
mark { background: #FFE7A3; color: inherit; padding: 0 1px; border-radius: 2px; }
:focus-visible { outline: 3px solid rgba(239, 106, 40, .55); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 1000; }
.skip-link:focus { left: 8px; }
.is-hidden, [hidden] { display: none !important; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.1rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .92rem;
  border: 1.5px solid transparent; transition: background .15s, border-color .15s, color .15s, transform .1s;
  text-decoration: none !important; white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--blue-700); }
.btn-outline { border-color: var(--line-2); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: var(--blue); color: var(--blue); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-600); }
.btn-block { width: 100%; }
.btn-lg { padding: .85rem 1.3rem; font-size: 1rem; }
.btn-sm { padding: .4rem .75rem; font-size: .82rem; }
.icon-btn { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 50%; color: var(--ink-2); font-size: 1.1rem; }
.icon-btn:hover { background: var(--bg); color: var(--ink); }
.link-btn { color: var(--blue); font-weight: 600; padding: 0; text-decoration: underline; text-underline-offset: 2px; }
.link-more { font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: .4rem; }

/* ---------- Barra superior ---------- */
.topbar { background: var(--blue-900); color: #C9D6E8; font-size: .8rem; }
.topbar-inner { display: flex; justify-content: space-between; gap: 1rem; padding-top: 7px; padding-bottom: 7px; }
.topbar-info { display: flex; gap: 1.4rem; align-items: center; }
.topbar a { color: #E6EEF8; }
.topbar i { color: var(--orange); margin-right: .25rem; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none !important; flex-shrink: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { color: var(--blue); font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.brand-text small { color: var(--orange-600); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; margin-top: 3px; }

.search { position: relative; flex: 1; display: flex; max-width: 680px; border: 2px solid var(--blue); border-radius: 10px; background: #fff; }
.search-scope { border: 0; background: var(--blue-50); color: var(--blue-700); font-weight: 600; font-size: .85rem; padding: 0 .7rem; border-radius: 8px 0 0 8px; max-width: 150px; cursor: pointer; }
.search-input { flex: 1; min-width: 0; border: 0; padding: .7rem .9rem; font-size: .95rem; outline: none; background: transparent; }
.search-input::-webkit-search-cancel-button { cursor: pointer; }
.search-btn { background: var(--orange); color: #fff; width: 52px; border-radius: 0 7px 7px 0; font-size: 1.05rem; }
.search-btn:hover { background: var(--orange-600); }
.search:focus-within { box-shadow: 0 0 0 4px rgba(21, 76, 138, .14); }

.search-suggest { position: absolute; top: calc(100% + 6px); left: -2px; right: -2px; background: #fff; border-radius: 10px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; z-index: 60; max-height: 70vh; overflow-y: auto; }
.search-suggest a { display: flex; align-items: center; gap: .75rem; padding: .6rem .9rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.search-suggest a:hover, .search-suggest a:focus { background: var(--blue-50); outline: none; }
.suggest-cat { font-weight: 600; font-size: .9rem; }
.suggest-cat i { color: var(--orange); width: 18px; text-align: center; }
.suggest-cat small { color: var(--muted); font-weight: 500; }
.suggest-thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--blue-50); display: grid; place-items: center; color: var(--blue); flex-shrink: 0; overflow: hidden; }
.suggest-thumb img { width: 100%; height: 100%; object-fit: cover; }
.suggest-name { flex: 1; font-size: .88rem; display: flex; flex-direction: column; }
.suggest-name small { color: var(--muted); font-size: .75rem; }
.suggest-item strong { font-size: .9rem; color: var(--blue); white-space: nowrap; }
.suggest-all { justify-content: center; font-weight: 700; color: var(--blue) !important; border-bottom: 0 !important; background: var(--bg); }
.suggest-empty { padding: 1rem; color: var(--muted); font-size: .9rem; }

.header-actions { display: flex; gap: .4rem; flex-shrink: 0; }
.header-action { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .4rem .7rem; border-radius: 10px; color: var(--ink-2); font-size: .74rem; font-weight: 600; text-decoration: none !important; }
.header-action i { font-size: 1.25rem; color: var(--blue); }
.header-action:hover { background: var(--blue-50); }
.cart-count { position: absolute; top: 0; right: 6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--orange); color: #fff; font-size: .7rem; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.cart-btn.bump i { animation: bump .45s ease; }
@keyframes bump { 30% { transform: scale(1.3) rotate(-8deg); } 60% { transform: scale(.95); } }

/* ---------- Navegación + menú de categorías ---------- */
.nav { background: var(--blue); position: relative; }
.nav-inner { display: flex; align-items: center; gap: .5rem; height: 46px; }
.nav-all { display: flex; align-items: center; gap: .55rem; height: 100%; padding: 0 1.1rem; background: var(--blue-700); color: #fff; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.nav-all:hover, .nav-all[aria-expanded="true"] { background: var(--orange); }
.nav-links { list-style: none; padding: 0; display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; height: 100%; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: flex; align-items: center; height: 100%; padding: 0 .85rem; color: #E6EEF8; font-weight: 600; font-size: .86rem; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.nav-links a:hover, .nav-links a.is-active { color: #fff; border-bottom-color: var(--orange); }
.nav-links .nav-brands { color: #FFC59E; }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow-lg); border-top: 3px solid var(--orange); }
.mega-inner { display: grid; grid-template-columns: 290px 1fr; min-height: 380px; padding: 0; }
.mega-cats { list-style: none; padding: .5rem 0; border-right: 1px solid var(--line); background: var(--bg); max-height: 70vh; overflow-y: auto; }
.mega-cats a { display: flex; align-items: center; gap: .7rem; padding: .55rem 1.2rem; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.mega-cats a i:first-child { color: var(--blue); width: 20px; text-align: center; }
.mega-cats a .chev { margin-left: auto; font-size: .7rem; color: var(--muted); }
.mega-cats a.is-active { background: #fff; color: var(--blue); box-shadow: inset 3px 0 0 var(--orange); }
.mega-panel { padding: 1.4rem 1.8rem; }
.mega-panel-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1rem; }
.mega-panel-head h3 { font-size: 1.2rem; }
.mega-subs { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.mega-subs a { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.mega-subs a:hover { border-color: var(--blue); background: var(--blue-50); }
.mega-subs i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: var(--orange-50); color: var(--orange-600); }
.mega-subs span { flex: 1; }
.mega-subs small { color: var(--muted); font-weight: 600; }

/* ---------- Secciones ---------- */
.page { padding-top: 1.2rem; padding-bottom: 3rem; }
.section { margin-top: 2.5rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.notice { background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-900); padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-size: .9rem; margin-bottom: 1.2rem; }
.notice i { color: var(--blue); margin-right: .35rem; }

.hero { padding-top: 1.2rem; }
.hero-banner { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--blue-900); }
.hero-banner img { width: 100%; height: auto; aspect-ratio: 1919 / 820; object-fit: cover; transition: transform .5s ease; }
.hero-banner:hover img { transform: scale(1.01); }

/* Banner de video: texto en HTML a la izquierda, video 16:9 completo a la derecha */
.video-banner { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: linear-gradient(160deg, var(--blue-700), var(--blue-900)); }
.video-banner-copy { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 1rem; padding: clamp(1.5rem, 3.5vw, 3rem); color: #C9D6E8; }
.video-banner-copy h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2.1rem); letter-spacing: -.02em; text-wrap: balance; }
.video-banner-copy p { font-size: .98rem; max-width: 36ch; }
.video-banner-copy strong { color: #FFC59E; font-weight: 700; }
.video-banner-cta { background: #fff; color: var(--blue-900); margin-top: .25rem; }
.video-banner-cta:hover { background: var(--orange-50); color: var(--blue-900); }
.video-banner-cta i { color: var(--orange-600); transition: transform .2s; }
.video-banner-cta:hover i { transform: translateX(3px); }
.video-banner-media { position: relative; aspect-ratio: 16 / 9; background: #E3D9D0; }
.video-banner-media video { display: block; width: 100%; height: 100%; object-fit: cover; }
.video-toggle { position: absolute; left: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(10, 37, 71, .72); color: #fff; font-size: .95rem; transition: background .15s; }
.video-toggle:hover { background: var(--blue-900); }
@media (max-width: 760px) {
  .video-banner { grid-template-columns: 1fr; }
  .video-banner-media { order: -1; }
  .video-banner-copy { padding: 1.25rem 1.2rem 1.4rem; gap: .75rem; }
  .video-banner-cta { align-self: stretch; }
}

/* Carrusel continuo de categorías: la lista va duplicada y se desplaza la mitad del ancho */
.cat-carousel { overflow: hidden; padding: .4rem 0 .8rem; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.cat-track { display: flex; gap: 1rem; width: max-content; animation: cat-scroll 50s linear infinite; }
.cat-carousel:hover .cat-track, .cat-carousel:focus-within .cat-track { animation-play-state: paused; }
@keyframes cat-scroll { to { transform: translateX(calc(-50% - .5rem)); } }
.cat-track .cat-tile { flex: 0 0 170px; }
@media (max-width: 600px) { .cat-track .cat-tile { flex-basis: 128px; } .cat-track { animation-duration: 40s; gap: .6rem; } }
@media (prefers-reduced-motion: reduce) {
  .cat-carousel { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .cat-track .cat-tile[aria-hidden="true"] { display: none; }
}
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .8rem 1rem; text-align: center; color: var(--ink); text-decoration: none !important; transition: box-shadow .2s, transform .2s, border-color .2s; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.cat-tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--blue-100); }
.cat-img { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--bg); margin-bottom: .5rem; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-tile strong { font-size: .9rem; line-height: 1.25; }
.cat-tile small { color: var(--muted); font-size: .78rem; font-weight: 600; }

.brand-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: .8rem; }
.brand-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem .8rem .8rem; display: flex; flex-direction: column; align-items: center; gap: .55rem; color: var(--ink); text-decoration: none !important; transition: border-color .2s, box-shadow .2s, transform .2s; }
.brand-tile:hover { border-color: var(--blue); box-shadow: var(--shadow); transform: translateY(-2px); }
.brand-logo { width: 100%; height: 64px; display: flex; align-items: center; justify-content: center; }
.brand-logo img { max-width: 100%; max-height: 64px; width: auto; height: auto; object-fit: contain; }
.brand-logo strong { font-size: 1.15rem; font-weight: 800; color: var(--blue-900); }
.brand-count { font-size: .76rem; color: var(--muted); font-weight: 600; }
@media (max-width: 1100px) { .brand-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.how { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }
.how h2 { text-align: center; margin-bottom: 1.4rem; }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: s; }
.steps li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; }
.steps i { width: 56px; height: 56px; border-radius: 50%; background: var(--orange-50); color: var(--orange); display: grid; place-items: center; font-size: 1.4rem; margin-bottom: .3rem; }
.steps .fa-whatsapp { background: var(--green-50); color: var(--wa); }
.steps span { color: var(--muted); font-size: .88rem; }

/* ---------- Tarjeta de producto ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 1rem; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; }
.rail .card { scroll-snap-align: start; }
@media (max-width: 600px) { .rail { grid-auto-columns: 46%; gap: .6rem; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, border-color .2s; }
.card:hover { box-shadow: var(--shadow); border-color: var(--blue-100); }
.card-media { display: block; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; transition: transform .3s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: .85rem .9rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.card-cat { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.card-title { font-size: .9rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.65em; }
.card-title a { color: var(--ink); }
.card-meta { font-size: .74rem; color: var(--muted); }
.card-price { font-size: 1.25rem; font-weight: 800; color: var(--blue-900); margin-top: auto; padding-top: .3rem; }
.card-price small { font-size: .68rem; font-weight: 600; color: var(--muted); }
.card .btn { margin-top: .4rem; padding: .55rem .8rem; font-size: .86rem; }

.placeholder { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; background: linear-gradient(145deg, var(--blue-50), #fff 70%); color: var(--blue); }
.placeholder i { font-size: 2.8rem; opacity: .75; }
.placeholder span { font-size: .72rem; font-weight: 800; letter-spacing: .1em; color: var(--blue-700); background: #fff; border: 1px solid var(--blue-100); padding: .15rem .55rem; border-radius: 99px; }
.placeholder-lg i { font-size: 6rem; }
.placeholder-lg span { font-size: .9rem; }

.brand-chip { align-self: flex-start; font-size: .68rem; font-weight: 800; letter-spacing: .06em; padding: .15rem .5rem; border-radius: 4px; background: var(--blue-50); color: var(--blue-700); text-decoration: none !important; }
.brand-chip.is-wadfow { background: var(--wadfow); color: #fff; }
.brand-chip.is-total { background: var(--total); color: #fff; }

.stock { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--green); }
.stock i { font-size: .45rem; }
.stock-low { color: var(--amber); }

/* ---------- Catálogo ---------- */
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: .8rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.crumbs a { color: var(--ink-2); }
.crumbs span { color: var(--line-2); }
.crumbs strong { color: var(--ink); font-weight: 600; max-width: 50ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head p { margin-top: .2rem; font-size: .9rem; }
.toolbar { display: flex; gap: .6rem; align-items: center; }
.sort { display: flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); font-weight: 600; }
.sort select { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: .5rem 2rem .5rem .7rem; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; }
.btn-filters { display: none; }
.filters-foot { display: none; }

.sub-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sub-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .9rem; background: #fff; border: 1px solid var(--line); border-radius: 99px; color: var(--ink); font-weight: 600; font-size: .85rem; text-decoration: none !important; }
.sub-chip i { color: var(--orange); }
.sub-chip small { color: var(--muted); }
.sub-chip:hover { border-color: var(--blue); color: var(--blue); }

.active-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; background: var(--blue); color: #fff; border-radius: 99px; font-size: .8rem; font-weight: 600; text-decoration: none !important; }
.chip:hover { background: var(--blue-700); }
.chip-clear { background: transparent; color: var(--blue); border: 1px solid var(--blue-100); }
.chip-clear:hover { background: var(--blue-50); }

.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; align-items: start; }
.filters { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .4rem 1.1rem 1rem; position: sticky; top: calc(var(--header-h) + 58px); max-height: calc(100vh - var(--header-h) - 76px); overflow-y: auto; }
.filters-head { display: none; }
.facet { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.facet:last-child { border-bottom: 0; }
.facet h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: .55rem; }
.facet ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.facet li a { display: flex; align-items: center; gap: .5rem; padding: .35rem .45rem; border-radius: 6px; color: var(--ink); font-size: .87rem; text-decoration: none; }
.facet li a:hover { background: var(--bg); }
.facet li a > span:last-child { margin-left: auto; color: var(--muted); font-size: .76rem; }
.facet li a.is-active { background: var(--blue-50); color: var(--blue); font-weight: 700; }
.facet-back { display: inline-flex; gap: .4rem; align-items: center; font-size: .8rem; font-weight: 600; margin-top: .5rem; }
.check .box { width: 17px; height: 17px; border: 1.5px solid var(--line-2); border-radius: 4px; flex-shrink: 0; display: grid; place-items: center; background: #fff; }
.check.is-checked .box { background: var(--blue); border-color: var(--blue); }
.check.is-checked .box::after { content: ''; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.facet-checks.is-collapsible .is-extra { display: none; }
.facet .link-btn { font-size: .8rem; margin-top: .4rem; }

.results { min-width: 0; }

.pager { display: flex; justify-content: center; gap: .3rem; margin-top: 2rem; flex-wrap: wrap; align-items: center; }
.pager a, .pager span, .pager button { min-width: 40px; height: 40px; padding: 0 .6rem; display: inline-grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.pager a:hover, .pager button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.pager .is-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager .is-disabled, .pager button:disabled { opacity: .4; cursor: default; }
.pager .gap { border: 0; background: none; min-width: 20px; }

.empty { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 3rem 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.empty > i { font-size: 2.6rem; color: var(--blue-100); }
.empty p { color: var(--muted); max-width: 46ch; }
.empty-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.empty-sm { border: 0; padding: 3rem 1rem; }

/* ---------- Detalle de producto ---------- */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.pdp-media { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.pdp-media img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.pdp-info { display: flex; flex-direction: column; gap: .7rem; }
.pdp-info h1 { font-size: clamp(1.3rem, 2vw, 1.7rem); }
.pdp-price { font-size: 2.2rem; font-weight: 800; color: var(--blue-900); margin-top: .4rem; }
.pdp-buy { display: flex; gap: .7rem; margin-top: .6rem; flex-wrap: wrap; }
.pdp-buy .btn { flex: 1; min-width: 200px; }
.pdp-perks { list-style: none; padding: 1rem 0 0; margin-top: .5rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .6rem; font-size: .88rem; color: var(--ink-2); }
.pdp-perks i { color: var(--blue); width: 22px; }

.qty { display: inline-flex; align-items: stretch; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: #fff; }
.qty button { width: 42px; font-size: 1.2rem; font-weight: 700; color: var(--blue); }
.qty button:hover:not(:disabled) { background: var(--blue-50); }
.qty button:disabled { color: var(--line-2); cursor: default; }
.qty input { width: 54px; border: 0; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-sm button { width: 32px; font-size: 1rem; }
.qty-sm input { width: 40px; font-size: .9rem; padding: .3rem 0; }

/* ---------- Carrito ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 25, 45, .5); z-index: 90; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; z-index: 100; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); box-shadow: var(--shadow-lg); visibility: hidden; }
.drawer.is-open { transform: none; visibility: visible; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.15rem; display: flex; gap: .55rem; align-items: center; }
.drawer-head h2 i { color: var(--blue); }
.drawer-body { flex: 1; overflow-y: auto; padding: .5rem 1.2rem 1rem; }
.drawer-foot { border-top: 1px solid var(--line); padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; background: var(--bg); }
.drawer-foot:empty { display: none; }
.drawer-foot .link-btn { align-self: center; color: var(--muted); }

.cart-lines { list-style: none; padding: 0; }
.cart-line { display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; padding: .9rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.cart-thumb { width: 56px; height: 56px; border-radius: 8px; background: var(--blue-50); display: grid; place-items: center; color: var(--blue); overflow: hidden; font-size: 1.3rem; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.cart-name { color: var(--ink); font-weight: 600; font-size: .88rem; line-height: 1.3; }
.cart-info small { font-size: .75rem; }
.cart-row { display: flex; justify-content: space-between; align-items: center; margin-top: .3rem; }
.warn { color: var(--amber); font-weight: 600; }

.checkout { margin-top: 1.2rem; display: flex; flex-direction: column; gap: .7rem; }
.checkout h3 { font-size: .95rem; }
.checkout label, .form label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.checkout input, .checkout textarea, .form input, .form textarea, .admin-tools input, .admin-tools select {
  border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: .6rem .75rem; font-size: .92rem; font-weight: 500; color: var(--ink); background: #fff; resize: vertical;
}
.checkout input:focus, .checkout textarea:focus, .form input:focus, .form textarea:focus, .admin-tools input:focus, .admin-tools select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21, 76, 138, .12); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; }
.segmented span { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem; border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); font-weight: 700; font-size: .85rem; color: var(--ink-2); cursor: pointer; }
.segmented input:checked + span { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.segmented input:focus-visible + span { outline: 3px solid rgba(239, 106, 40, .55); }

.totals { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; }
.totals > div { display: flex; justify-content: space-between; }
.totals-main { font-size: 1.2rem; font-weight: 800; color: var(--blue-900); padding-top: .4rem; margin-top: .2rem; border-top: 1px dashed var(--line-2); }

/* ---------- Cuenta ---------- */
.account { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; align-items: start; }
.account-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; display: flex; flex-direction: column; gap: 2px; }
.account-hello { display: flex; align-items: center; gap: .7rem; padding: .8rem .7rem 1rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.account-hello i { font-size: 2rem; color: var(--blue); }
.account-hello small { display: block; color: var(--muted); font-size: .75rem; }
.account-nav a { display: flex; gap: .7rem; align-items: center; padding: .65rem .8rem; border-radius: var(--radius-sm); color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none; }
.account-nav a i { color: var(--muted); width: 18px; }
.account-nav a:hover { background: var(--bg); }
.account-nav a.is-active { background: var(--blue-50); color: var(--blue); }
.account-nav a.is-active i { color: var(--blue); }
.account-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; min-width: 0; }
.account-main h1 { font-size: 1.4rem; margin-bottom: 1.2rem; }

.order { border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 1rem; overflow: hidden; }
.order header, .order footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1rem; background: var(--bg); flex-wrap: wrap; font-size: .88rem; }
.order ul { list-style: none; padding: .5rem 1rem; }
.order li { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; font-size: .88rem; border-bottom: 1px dashed var(--line); }
.order li:last-child { border-bottom: 0; }
.order footer span { color: var(--ink-2); }
.badge { font-size: .72rem; font-weight: 700; padding: .2rem .6rem; border-radius: 99px; background: var(--green-50); color: var(--green); }

.form { display: flex; flex-direction: column; gap: 1rem; max-width: 520px; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.form legend { font-size: .82rem; font-weight: 700; color: var(--ink-2); padding: 0 .3rem; }
.radio { flex-direction: row !important; align-items: center; gap: .5rem !important; font-weight: 500 !important; color: var(--ink) !important; font-size: .9rem !important; cursor: pointer; }
.form .btn { align-self: flex-start; }

.help { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-top: 1rem; }
.help.is-compact { grid-template-columns: 1fr; margin-top: 0; }
.help section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.help h2 { font-size: 1.05rem; display: flex; gap: .55rem; align-items: center; margin-bottom: .7rem; }
.help h2 i { color: var(--orange); }
.help ol { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.help p { color: var(--ink-2); margin-bottom: .6rem; }

/* ---------- Panel interno ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.kpi span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi strong { display: block; font-size: 1.5rem; font-weight: 800; color: var(--blue-900); margin-top: .2rem; }
.kpi-warn strong { color: var(--amber); }
.admin-cats { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; margin-bottom: 1.5rem; }
.admin-cats h2 { font-size: 1.05rem; margin-bottom: .8rem; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 130px; gap: .8rem; align-items: center; font-size: .85rem; padding: .25rem 0; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-700)); border-radius: 99px; }
.admin-tools { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.admin-tools input[type="search"] { flex: 1; min-width: 220px; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.table th { text-align: left; background: var(--bg); border-bottom: 1px solid var(--line); padding: 0; white-space: nowrap; }
.table th button, .table th:not(:has(button)) { display: block; width: 100%; text-align: inherit; padding: .7rem .8rem; font-weight: 700; color: var(--ink-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.table td { padding: .6rem .8rem; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FAFCFF; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td a { color: var(--ink); }
.pill-warn { background: var(--amber-50); color: var(--amber); font-weight: 700; padding: .1rem .5rem; border-radius: 99px; }

/* ---------- Beneficios y pie ---------- */
.benefits { background: #fff; border-top: 1px solid var(--line); margin-top: 3rem; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; padding-top: 1.6rem; padding-bottom: 1.6rem; }
.benefit { display: flex; gap: .85rem; align-items: center; }
.benefit > i { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; font-size: 1.2rem; flex-shrink: 0; }
.benefit strong { display: block; font-size: .9rem; }
.benefit span { font-size: .8rem; color: var(--muted); }

.footer { background: var(--blue-900); color: #B9C7DA; font-size: .88rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.4fr; gap: 2rem; padding-top: 2.6rem; padding-bottom: 2rem; }
.footer h3 { color: #fff; font-size: .95rem; margin-bottom: .9rem; }
.footer a { color: #E6EEF8; }
.footer-brand img { width: 150px; height: auto; border-radius: 10px; background: #fff; padding: 8px; margin-bottom: 1rem; }
.social-title { margin-top: 1.4rem; }
.social { display: flex; gap: 8px; flex-wrap: wrap; }
.social-btn { width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; color: #fff !important; font-size: 1.25rem; text-decoration: none !important; transition: transform .15s, filter .15s; }
a.social-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.social-btn.is-facebook { background: #3B5998; }
.social-btn.is-instagram { background: radial-gradient(circle at 30% 107%, #FDF497 0%, #FDF497 5%, #FD5949 45%, #D6249F 60%, #285AEB 90%); }
.social-btn.is-youtube { background: #FF0000; }
.social-btn.is-tiktok { background: #000; text-shadow: -1.5px -1px 0 #25F4EE, 1.5px 1px 0 #FE2C55; }
.social-btn.is-linkedin { background: #0A66C2; }
.social-btn.is-whatsapp { background: #25D366; font-size: 1.4rem; }
.footer-links, .footer-contact { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.footer-contact { gap: .85rem; }
.footer-contact li { display: flex; gap: .75rem; align-items: flex-start; }
.footer-contact i { color: var(--orange); width: 18px; margin-top: 3px; flex-shrink: 0; text-align: center; }
.footer-contact div { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.footer-contact small { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #7F96B5; margin-bottom: 1px; }
.footer-contact a { overflow-wrap: anywhere; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.1rem; padding-bottom: 1.3rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }
.payments { display: flex; align-items: center; gap: .7rem; }
.payments img, .payments svg { height: 20px; width: auto; background: #fff; border-radius: 4px; padding: 3px 5px; }
.payments svg { height: 26px; }
.payments .pay-amex { height: 26px; padding: 1px; }
.footer-internal { color: #6F87A6 !important; font-size: .75rem; }

/* ---------- Flotantes ---------- */
.wa-float { position: fixed; right: 20px; bottom: 20px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; font-size: 1.9rem; box-shadow: 0 8px 22px rgba(31, 175, 85, .45); z-index: 40; transition: transform .2s; text-decoration: none !important; }
.wa-float:hover { transform: scale(1.07); }
.wa-float { transition: transform .25s var(--ease-out), opacity .2s ease; }
.wa-float.is-tucked { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; } /* escondido mientras se baja */
.wa-float.is-tucked:focus-visible { transform: none; opacity: 1; pointer-events: auto; }
body.no-scroll .wa-float { display: none; }

.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 200; width: min(460px, calc(100% - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: .7rem; background: var(--ink); color: #fff; padding: .8rem 1rem; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: .88rem; font-weight: 500; animation: toast-in .25s ease; transition: opacity .3s, transform .3s; }
.toast i { font-size: 1.1rem; color: #6EE7A0; }
.toast-warn i { color: #FCD34D; }
.toast span { flex: 1; }
.toast button { color: #FFC59E; font-weight: 700; white-space: nowrap; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Preloader ---------- */
/* Primera visita de la sesión: el sello recibe golpes de martillo mientras carga y,
   cuando la tienda está lista, la pantalla sube como la cortina metálica del local. */
.preloader { display: none; }
.js:not(.sin-intro) .preloader {
  position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .08), transparent 60%), var(--blue);
  box-shadow: 0 14px 34px rgba(10, 25, 45, .35);
  transition: transform .7s var(--ease-in-out);
}
.preloader::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--blue-900); } /* riel de la cortina */
.preloader.is-saliendo { transform: translateY(-100%); }
html.pl-activo { overflow: hidden; }
.pl-contenido { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: 0 24px; text-align: center; }
.pl-sello { position: relative; width: 128px; height: 128px; margin-bottom: 1.1rem; animation: pl-entra .6s var(--ease-out) .08s both; }
.pl-badge { position: relative; z-index: 1; width: 100%; height: 100%; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(10, 25, 45, .28); animation: pl-golpe 1.6s var(--ease-out) .75s infinite; }
.pl-badge img { width: 84px; height: 84px; }
.pl-onda { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--orange); opacity: 0; animation: pl-onda 1.6s var(--ease-out) .75s infinite; }
.pl-nombre { color: #fff; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; animation: pl-sube .5s var(--ease-out) .22s both; }
.pl-lema { color: #FFC59E; font-weight: 700; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; animation: pl-sube .5s var(--ease-out) .28s both; }
.is-saliendo .pl-badge, .is-saliendo .pl-onda { animation-play-state: paused; }
@keyframes pl-entra { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes pl-sube { from { opacity: 0; transform: translateY(6px); } }
@keyframes pl-golpe { 0% { transform: none; } 5% { transform: translateY(3px) scale(.96); } 32%, 100% { transform: none; } }
@keyframes pl-onda { 0%, 4% { opacity: 0; transform: scale(1); } 5% { opacity: .85; transform: scale(1); } 62%, 100% { opacity: 0; transform: scale(1.55); } }
@media (prefers-reduced-motion: reduce) {
  /* Sin golpes ni cortina: el sello queda quieto y la pantalla solo se desvanece */
  .js:not(.sin-intro) .preloader.is-saliendo { transform: none; opacity: 0; transition: opacity .3s ease !important; }
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 1100px) {
  .brand-text small { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --header-h: auto; }
  .header-inner { flex-wrap: wrap; height: auto; padding-top: .7rem; padding-bottom: .7rem; gap: .7rem 1rem; }
  .brand { order: 1; }
  .header-actions { order: 2; margin-left: auto; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search-scope { display: none; }
  .search-input { padding-left: .9rem; }

  .catalog { grid-template-columns: 1fr; }
  .btn-filters { display: inline-flex; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(330px, 88vw); max-height: none; z-index: 110; border-radius: 0; transform: translateX(-105%); transition: transform .28s ease; top: 0; padding-top: 0; }
  body.filters-open .filters { transform: none; box-shadow: var(--shadow-lg); }
  body.filters-open::after { content: ''; position: fixed; inset: 0; background: rgba(10, 25, 45, .5); z-index: 105; }
  .filters-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; padding: .8rem 0; border-bottom: 1px solid var(--line); z-index: 1; }
  .filters { padding-bottom: 0; }
  .filters-foot { display: block; position: sticky; bottom: 0; z-index: 1; background: #fff; border-top: 1px solid var(--line); padding: .8rem 0 calc(.8rem + env(safe-area-inset-bottom, 0px)); }

  .pdp { grid-template-columns: 1fr; padding: 1.2rem; gap: 1.4rem; }
  .pdp-media { max-width: 460px; width: 100%; margin: 0 auto; }
  .account { grid-template-columns: 1fr; }
  .account-nav { flex-direction: row; overflow-x: auto; }
  .account-hello { display: none; }
  .account-nav a { white-space: nowrap; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .bar-row { grid-template-columns: 130px 1fr 100px; font-size: .78rem; }
  .mega-inner { grid-template-columns: 1fr; }
  .mega-panel { display: none; }
  .mega-cats { max-height: 65vh; border-right: 0; }
  .mega-cats a .chev { display: none; } /* sin panel de subcategorías, la flecha prometía un submenú que no existe */
}

@media (max-width: 600px) {
  body { font-size: 14px; }
  .container { padding-left: 14px; padding-right: 14px; } /* solo los lados: el relleno vertical de cada bloque se conserva */
  .topbar-hide-sm { display: none; }
  .topbar a, .topbar span { white-space: nowrap; }
  .sub-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px 1rem; padding: 0 14px 4px; scrollbar-width: none; }
  .sub-chips::-webkit-scrollbar { display: none; }
  .sub-chip { flex-shrink: 0; }
  .topbar-info { gap: .9rem; }
  .brand img { width: 42px; height: 42px; }
  .brand-text strong { font-size: .95rem; }
  .header-action span:not(.cart-count) { display: none; }
  .header-action { padding: .5rem; }
  .nav-all span { display: none; }
  .nav-all { padding: 0 .9rem; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .card-body { padding: .7rem; }
  .card-title { font-size: .84rem; }
  .card-price { font-size: 1.08rem; }
  .card .btn { font-size: .8rem; padding: .5rem .4rem; }
  .cat-tile { padding: .5rem .4rem .7rem; }
  .cat-tile strong { font-size: .78rem; }
  .cat-tile small { display: none; }
  .brand-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-banner { border-radius: 8px; }
  .how { padding: 1.2rem; }
  .steps { grid-template-columns: 1fr 1fr; gap: 1rem; }
  .page-head { align-items: stretch; }
  .toolbar { width: 100%; justify-content: space-between; }
  .sort span { display: none; }
  .pdp-price { font-size: 1.8rem; }
  .benefits-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .account-main { padding: 1.1rem; }
  .kpis { gap: .6rem; }
  .kpi strong { font-size: 1.2rem; }
  .bar-row { grid-template-columns: 1fr 90px; }
  .bar-row .bar { display: none; }
  .wa-float { width: 52px; height: 52px; font-size: 1.7rem; right: 14px; bottom: 14px; }
  .header-inner { padding-top: .5rem; padding-bottom: .5rem; gap: .5rem .8rem; } /* cabecera fija más baja */
  body[data-route="inicio"] .grid > .card:nth-child(15) { display: none; } /* 15 en 2 columnas dejaría uno solo */
  .footer-bottom { padding-bottom: 84px; }    /* el botón flotante de WhatsApp no tapa el final del pie */
  /* Ficha: precio, cantidad y "Agregar" quedan a la vista sin hacer scroll */
  .pdp { padding: 1rem; gap: 1rem; }
  .pdp-media { max-width: 180px; }            /* el ícono de categoría no necesita más */
  .pdp-media:has(img) { max-width: 300px; }   /* una foto real sí */
  body[data-route="producto"] .crumbs strong,
  body[data-route="producto"] .crumbs span:last-of-type { display: none; } /* repetía el título completo */
}

/* La ficha ya tiene "Consultar este artículo": el botón flotante sobraba y tapaba texto */
body[data-route="producto"] .wa-float { display: none; }

/* Con el carrito abierto, los avisos salen arriba para no tapar "Enviar pedido por WhatsApp" */
body.no-scroll .toasts { top: calc(16px + env(safe-area-inset-top, 0px)); bottom: auto; }
body.no-scroll .toast { animation-name: toast-in-top; }
@keyframes toast-in-top { from { opacity: 0; transform: translateY(-10px); } }

/* Pantallas táctiles: sin hover que pause la marquesina, las categorías se deslizan con el dedo */
@media (hover: none) {
  .cat-carousel { overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; -webkit-mask-image: none; mask-image: none; }
  .cat-carousel::-webkit-scrollbar { display: none; }
  .cat-track { animation: none; }
  .cat-track .cat-tile { scroll-snap-align: start; }
  .cat-track .cat-tile[aria-hidden="true"] { display: none; }
}

/* Pantallas táctiles: zonas de toque de al menos 44 px */
@media (pointer: coarse) {
  .header-action { min-width: 44px; min-height: 44px; justify-content: center; }
  .drawer .icon-btn, .filters .icon-btn { width: 44px; height: 44px; }
  .qty button { width: 44px; min-height: 44px; }
  .qty-sm button { width: 40px; }
  .qty-sm input { padding: .65rem 0; }
  .card .btn, .toolbar .btn, .sort select, .sub-chip, .facet li a { min-height: 44px; }
  .pager a, .pager span, .pager button { min-width: 44px; height: 44px; }
  .link-btn { min-height: 44px; display: inline-flex; align-items: center; }
}

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

@media print {
  .topbar, .site-header, .benefits, .footer, .wa-float, .filters, .pager, .toolbar { display: none !important; }
}

/* ==========================================================================
   Panel interno: edición
   ========================================================================== */
.notice { display: flex; gap: .7rem; align-items: flex-start; flex-wrap: wrap; }
.notice > i { margin-top: 3px; }
.notice > div { flex: 1; min-width: 220px; }
.notice-ok { background: var(--green-50); border-color: #BFE5CD; color: #14532D; }
.notice-ok > i { color: var(--green); }
.notice-warn { background: var(--amber-50); border-color: #F5D9A6; color: #6B3A06; }
.notice-warn > i { color: var(--amber); }
.notice-actions { display: flex; gap: .5rem; flex: 0 0 auto !important; min-width: 0 !important; }

details.admin-cats > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.admin-cats > summary::-webkit-details-marker { display: none; }
details.admin-cats > summary::before { content: '\f054'; font-family: 'Font Awesome 6 Free'; font-weight: 900; font-size: .75rem; color: var(--muted); transition: transform .2s; }
details.admin-cats[open] > summary::before { transform: rotate(90deg); }
details.admin-cats > summary h2 { margin: 0; }
details.admin-cats[open] > summary { margin-bottom: .8rem; }

.admin-tools select { min-width: 170px; }
.actions-col { text-align: right; }
.table td.actions { white-space: nowrap; text-align: right; padding-top: .25rem; padding-bottom: .25rem; }
.table .icon-btn { width: 32px; height: 32px; font-size: .9rem; }
.icon-danger:hover { color: var(--red); background: #FDECEC; }
.is-hidden-row td { color: var(--muted); background: #FAFAFA; }
.is-hidden-row td a { color: var(--muted); }
.tag { display: inline-block; font-size: .66rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 4px; margin-left: .3rem; vertical-align: middle; }
.tag-new { background: var(--green-50); color: var(--green); }
.tag-edit { background: var(--blue-50); color: var(--blue); }
.tag-hidden { background: #EEF0F3; color: var(--ink-2); }

.modal { margin: auto; border: 0; border-radius: var(--radius); padding: 0; width: min(620px, calc(100% - 24px)); box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); }
.modal::backdrop { background: rgba(10, 25, 45, .55); }
.modal-form { max-width: none; padding: 1.4rem 1.5rem 1.3rem; gap: .9rem; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-head h2 { font-size: 1.25rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: .3rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
.form-grid .span-2 { grid-column: span 2; }
.form select { border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: .6rem .75rem; font-size: .92rem; background: #fff; }
.form input[readonly] { background: var(--bg); color: var(--muted); }
.form-error, .login-error { color: var(--red); font-weight: 600; font-size: .88rem; }

/* Panel limpio: sin la barra, el buscador, el menú ni los botones de la tienda */
body[data-route="admin"] .topbar,
body[data-route="admin"] .search,
body[data-route="admin"] .nav,
body[data-route="admin"] .header-actions,
body[data-route="admin"] .benefits,
body[data-route="admin"] .wa-float { display: none; }

/* Artículo con miniatura */
.adm-item { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.adm-thumb { width: 36px; height: 36px; flex-shrink: 0; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--blue); display: grid; place-items: center; overflow: hidden; font-size: .95rem; }
.adm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.adm-name { min-width: 0; }

/* Edición rápida: el valor es un botón que se vuelve campo */
.quick { font: inherit; font-variant-numeric: tabular-nums; color: var(--ink); padding: .2rem .45rem; margin: -.2rem -.45rem; border: 1px dashed transparent; border-radius: 6px; cursor: text; transition: background .15s, border-color .15s; }
.quick:hover, .quick:focus-visible { background: var(--blue-50); border-color: var(--blue-100); }
.quick.is-low { background: var(--amber-50); color: var(--amber); font-weight: 700; }
.quick-input { width: 7.5rem; padding: .3rem .45rem; border: 1.5px solid var(--blue); border-radius: 6px; font: inherit; font-variant-numeric: tabular-nums; text-align: right; box-shadow: 0 0 0 3px rgba(21, 76, 138, .12); outline: none; }
.admin-sort { display: none; }

/* Foto en el formulario */
.photo-field { display: flex; flex-direction: column; gap: .35rem; }
.photo-label { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.photo-row { display: flex; align-items: center; gap: .9rem; }
.photo-preview { width: 76px; height: 76px; flex-shrink: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--muted); display: grid; place-items: center; font-size: 1.6rem; overflow: hidden; }
.photo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.photo-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; }

/* Celular: cada artículo es una tarjeta con lo que se usa a diario a la vista */
@media (max-width: 700px) {
  .admin .admin-sort { display: block; }
  .admin .table-wrap { overflow: visible; background: none; border: 0; }
  .admin .table, .admin .table tbody { display: block; }
  .admin .table thead { display: none; }
  .admin .table tr {
    display: grid; grid-template-columns: auto 1fr auto; gap: .35rem .9rem;
    grid-template-areas: "name name actions" "code cat cat" "stock price price";
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem .9rem; margin-bottom: .6rem;
  }
  .admin .table td { padding: 0; border: 0; background: none !important; text-align: left; }
  .admin .table .c-name { grid-area: name; font-weight: 600; }
  .admin .table .c-actions { grid-area: actions; align-self: start; display: flex; padding: 0; }
  .admin .table .c-code { grid-area: code; color: var(--muted); font-size: .8rem; }
  .admin .table .c-cat { grid-area: cat; color: var(--muted); font-size: .8rem; }
  .admin .table .c-stock { grid-area: stock; }
  .admin .table .c-price { grid-area: price; }
  .admin .table .c-value { display: none; }
  .admin .table .c-stock::before, .admin .table .c-price::before { content: attr(data-label); display: block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
  .admin .table .quick { margin: 0; min-height: 44px; min-width: 88px; padding: .45rem .7rem; border: 1px solid var(--line-2); background: #fff; font-weight: 700; text-align: left; }
  .admin .table .quick.is-low { background: var(--amber-50); border-color: #F5D9A6; }
  .admin .table .quick-input { width: 100%; min-height: 44px; }
  .admin .table .icon-btn { width: 40px; height: 40px; }
  .admin .table tr.is-hidden-row { background: #FAFAFA; }
  .admin .kpis { gap: .5rem; }
  .admin .kpi { padding: .7rem .8rem; }
}

.login { max-width: 380px; margin: 2rem auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; display: flex; flex-direction: column; gap: .9rem; text-align: center; }
.login > i { font-size: 2rem; color: var(--blue); }
.login label { display: flex; flex-direction: column; gap: .3rem; font-size: .82rem; font-weight: 600; color: var(--ink-2); text-align: left; }
.login input { border: 1.5px solid var(--line-2); border-radius: var(--radius-sm); padding: .65rem .75rem; font-size: .95rem; }

.draft-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 80; display: flex; align-items: center; gap: .8rem; background: var(--ink); color: #fff; padding: .6rem .7rem .6rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-size: .85rem; width: max-content; max-width: calc(100% - 100px); flex-wrap: wrap; }
.draft-bar > i { color: #FCD34D; }
.draft-bar .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.draft-bar .btn-outline:hover { border-color: #fff; color: #fff; }
body.has-draft .toasts { bottom: 90px; }

@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .draft-bar { left: 12px; right: 76px; transform: none; max-width: none; width: auto; }
  .draft-bar span { flex-basis: 100%; }
}
