/* ══════════════════════════════════════
   PA ACOUSTIC — styles.css
   TEMA CLARO PERMANENTE - Sin modo oscuro
   ══════════════════════════════════════ */

:root {
  --bg:          #f0f5f9;
  --bg2:         #ffffff;
  --bg3:         #fefdfb;
  --borde:       #d1d9e6;
  --rojo:        #c41e3a;
  --rojo2:       #e63950;
  --rojo-grad:   linear-gradient(135deg, #c41e3a 0%, #e63950 100%);
  --texto:       #1a1a2e;
  --muted:       #5a6a7a;
  --titulo:      #0d1b2a;
  --blanco:      #ffffff;
  --wp:          #2d8c4e;
  --accent-glow: rgba(196, 30, 58, 0.25);
  --shadow-sm:   0 1px 2px rgba(13, 27, 42, 0.06);
  --shadow-md:   0 4px 12px rgba(13, 27, 42, 0.1);
  --shadow-lg:   0 8px 24px rgba(13, 27, 42, 0.12);
  --sidebar-w:   250px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; overflow-x: hidden; }
body { background: var(--bg); color: var(--texto); font-family: 'Nunito', sans-serif; overflow-x: clip; position: relative; }

.page-watermark {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: -1; opacity: 0.30;
  background-image: url('https://res.cloudinary.com/djlr3wszq/image/upload/v1776290344/mafondo_mo86qx.jpg');
  /* Móvil / tablet: una sola imagen que cubre el fondo */
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  mix-blend-mode: normal; filter: grayscale(100%) brightness(0.7);
}

@media (min-width: 1025px) {
  .page-watermark {
    /* Escritorio: mosaico como antes */
    background-size: contain;
    background-repeat: repeat;
    background-position: center;
  }
}

.theme-toggle { display: none !important; }
.prod-category-header { display: none; }
.nav-category-mobile { display: none; }

/* ── SEARCH FIELD (navbar) ── */
.nav-search-field { position: relative; overflow: visible; }
.nav-search-field::before { content: ''; position: absolute; inset: -2px; border-radius: 10px; background: linear-gradient(135deg, var(--rojo), var(--rojo2)); opacity: 0; z-index: -1; transition: opacity 0.3s ease; }
.nav-search-field:focus-within::before { opacity: 0.15; animation: searchPulse 2s ease-in-out infinite; }
@keyframes searchPulse { 0%, 100% { opacity: 0.1; } 50% { opacity: 0.2; } }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rojo); border-radius: 4px; }

/* ── NAV ── */
/* ── NAVBAR (Fixed + Sidebar-aware) ── */
#mainNavbar {
  position: fixed;
  top: 0; left: var(--sidebar-w); right: 0;
  z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(168deg, #141f33 0%, var(--titulo) 48%, #0a121f 100%);
  border-bottom: 2px solid var(--rojo);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
  backdrop-filter: none;
}
/* Escritorio: el botón menú no se usa (sidebar fijo); si no se oculta, se ve un cuadrado junto al logo */
#mainNavbar .nav-sidebar-toggle {
  display: none;
}
.nav-links a:active, .nav-links a:focus { background: transparent !important; outline: none; }
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 48px; object-fit: contain; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; transition: color .2s, background .2s, padding .2s; position: relative; padding: 0.5rem 0.8rem; border-radius: 6px; display: inline-block; }
.nav-links a:hover { color: var(--rojo); background: rgba(196,30,58,0.08); }
.nav-links a.active { color: var(--rojo); background: rgba(196,30,58,0.12); }
.nav-links a.active::after { content: ''; position: absolute; bottom: -4px; left: 0; right: 0; height: 2px; background: var(--rojo); border-radius: 2px; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 50%; width: 0; height: 2px; background: var(--rojo); border-radius: 2px; transition: width .3s ease, left .3s ease; }
.nav-links a:hover::after { width: 100%; left: 0; }

/* ── Overlay: solo móvil / tablet (cajón hamburguesa) ── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.66);
  z-index: 240;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ── SIDEBAR: escritorio = fijo a la izquierda; móvil = cajón ── */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  max-height: 100dvh;
  background: #fff;
  border-right: 1px solid var(--borde);
  z-index: 260;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: none;
}
.sidebar-panel-header {
  position: relative;
  flex-shrink: 0;
  padding: 0.72rem 1rem;
  text-align: center;
  background: var(--rojo);
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(196, 30, 58, 0.25);
}
.sidebar-panel-title {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
}
.sidebar-close-btn {
  position: absolute;
  top: max(0.55rem, env(safe-area-inset-top, 0px));
  right: 0.55rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--rojo);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.35);
  transition: background 0.2s, transform 0.15s;
}
.sidebar-close-btn:hover {
  background: var(--rojo2);
  transform: scale(1.05);
}
.sidebar-close-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.35);
}
.sidebar-close-ico {
  position: relative;
  width: 14px;
  height: 14px;
  display: block;
}
.sidebar-close-ico::before,
.sidebar-close-ico::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transform-origin: center;
}
.sidebar-close-ico::before { transform: translate(-50%, -50%) rotate(45deg); }
.sidebar-close-ico::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* Escritorio: mismo tono que navbar + cabecera roja */
@media (min-width: 1025px) {
  /* Altura exacta del navbar: padding 0.8rem + logo 48px + borde inferior 2px (coincide con .nav-logo img) */
  :root {
    --topbar-unified-h: calc(0.8rem + 48px + 0.8rem + 2px);
  }
  #mainNavbar {
    height: var(--topbar-unified-h);
    min-height: var(--topbar-unified-h);
    max-height: var(--topbar-unified-h);
    box-sizing: border-box;
    /* Solapa 1px el borde del sidebar y evita la “costura” clara entre rojo y barra */
    left: calc(var(--sidebar-w) - 1px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.16);
  }
  .sidebar-close-btn {
    display: none !important;
  }
  .sidebar {
    padding: 0 0.85rem 0.85rem;
    background: linear-gradient(168deg, #141f33 0%, var(--titulo) 48%, #0a121f 100%);
    border-right: 2px solid var(--rojo);
    box-shadow: 6px 0 28px rgba(0, 0, 0, 0.28);
  }
  .sidebar-panel-header {
    margin: 0 -0.85rem 0.85rem -0.85rem;
    background: var(--rojo);
    /* Sin sombra hacia la derecha: unifica visualmente con el navbar */
    box-shadow: none;
    /* Misma caja que #mainNavbar: sin padding vertical extra (evita que el rojo quede más alto) */
    padding: 0 1rem;
    height: var(--topbar-unified-h);
    min-height: var(--topbar-unified-h);
    max-height: var(--topbar-unified-h);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid rgba(0, 0, 0, 0.12);
  }
  .sidebar-panel-title {
    color: #fff;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    letter-spacing: 0.12em;
    line-height: 1.1;
  }
  .sidebar-section-label {
    color: rgba(255, 255, 255, 0.75);
  }
  .sidebar-nav-footer .sidebar-divider {
    background: rgba(255, 255, 255, 0.12);
  }
  .sidebar-link {
    color: rgba(255, 255, 255, 0.72);
  }
  .sidebar-link:hover,
  .sidebar-link.active {
    color: #fff;
    background: rgba(196, 30, 58, 0.22);
  }
  .sidebar-link.active::before {
    background: var(--rojo2);
  }
  .sidebar-cat {
    color: rgba(255, 255, 255, 0.92);
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  .sidebar-cat:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
  .sidebar-cat.active {
    background: rgba(196, 30, 58, 0.22);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--rojo);
  }
  .sidebar-cat--parent.has-sub-filter {
    background: rgba(196, 30, 58, 0.14);
    box-shadow: inset 3px 0 0 rgba(255, 255, 255, 0.35);
  }
  .sidebar-cat-ico {
    color: rgba(255, 255, 255, 0.88);
  }
  .sidebar-cat-count {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .sidebar-cat.active .sidebar-cat-count {
    background: rgba(196, 30, 58, 0.35);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
  }
  .sidebar-nav-scroll {
    scrollbar-color: var(--rojo) rgba(255, 255, 255, 0.06);
  }
  /* Con flyout abierto por hover: "Todas" no debe verse como filtro activo */
  .sidebar.sidebar--flyout-preview .sidebar-cat.sidebar-cat--all.active {
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    box-shadow: none;
  }
  .sidebar.sidebar--flyout-preview .sidebar-cat.sidebar-cat--all.active .sidebar-cat-count {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
  }
  .sidebar.sidebar--flyout-preview .sidebar-cat.sidebar-cat--all.active:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
  .nav-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3), 0 6px 18px rgba(0, 0, 0, 0.18);
  }
  .nav-logo img {
    height: 44px;
  }
}

.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 0 0.65rem;
}
.sidebar-nav-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  margin-right: -0.25rem;
  padding-right: 0.25rem;
}
.sidebar-nav-footer {
  flex-shrink: 0;
  padding-top: 0.75rem;
  margin-top: auto;
}
.sidebar-cat-list {
  margin: 0;
  border-top: none;
}
.sidebar-nav ul { list-style: none; margin: 0; padding: 0; }
.sidebar-section { list-style: none; margin-top: 0; }
.sidebar-link {
  display: block; padding: 0.75rem 0.5rem;
  color: var(--muted); text-decoration: none;
  font-weight: 500; border-radius: 6px;
  transition: all 0.2s;
  position: relative;
}
.sidebar-link:hover, .sidebar-link.active {
  color: var(--rojo); background: rgba(196,30,58,0.08);
  padding-left: 1rem;
}
.sidebar-link.active::before {
  content: ''; position: absolute; left: 0.25rem; top: 50%;
  width: 4px; height: 20px; background: var(--rojo);
  border-radius: 2px; transform: translateY(-50%);
}
.sidebar-nav-footer .sidebar-divider {
  height: 1px; background: var(--borde); margin: 0 0 0.75rem 0;
  border: none;
}
.sidebar-section-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--rojo); margin: 0 0 0.35rem 0.35rem;
}
.sidebar-cat-group { margin: 0; padding: 0; }
.sidebar-cat {
  width: 100%;
  display: grid;
  grid-template-columns: 1.65rem 1fr auto;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.62rem 0.45rem;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--titulo);
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--borde);
  border-radius: 0;
  text-transform: uppercase;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.15s, color 0.15s;
}
.sidebar-cat:hover {
  background: rgba(196, 30, 58, 0.05);
  color: var(--rojo);
}
.sidebar-cat.active {
  background: rgba(196, 30, 58, 0.08);
  color: var(--rojo);
  box-shadow: inset 3px 0 0 var(--rojo);
}
.sidebar-cat--parent.has-sub-filter {
  background: rgba(196, 30, 58, 0.06);
  box-shadow: inset 3px 0 0 rgba(196, 30, 58, 0.45);
}
.sidebar-cat-ico {
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  color: var(--titulo);
  opacity: 0.88;
}
.sidebar-cat-label { font-weight: 700; min-width: 0; }
.sidebar-cat-meta {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}
.sidebar-cat-chev {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--rojo);
  vertical-align: middle;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}
.sidebar-cat--parent.is-flyout-open .sidebar-cat-chev {
  transform: rotate(180deg);
}
.sidebar-cat-count {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  min-width: 1.35rem;
  text-align: center;
  padding: 0.12rem 0.38rem;
  background: var(--bg);
  border-radius: 999px;
  border: 1px solid var(--borde);
}
.sidebar-cat.active .sidebar-cat-count {
  background: rgba(196, 30, 58, 0.12);
  color: var(--rojo);
  border-color: rgba(196, 30, 58, 0.25);
}

.sidebar-flyout {
  position: fixed;
  z-index: 600;
  width: min(272px, calc(100vw - 20px));
  max-height: min(70vh, 440px);
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--titulo);
  border-radius: 0;
  box-shadow: 0 12px 40px rgba(13, 27, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}
.sidebar-flyout.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.sidebar-flyout-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rojo);
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--borde);
  background: #fff;
}
.sidebar-flyout-inner { padding: 0; }
.sidebar-flyout-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  text-align: left;
  font: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--titulo);
  background: #fff;
  border: none;
  border-bottom: 1px solid var(--borde);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.sidebar-flyout-row:last-child { border-bottom: none; }
.sidebar-flyout-row:hover {
  background: rgba(196, 30, 58, 0.06);
  color: var(--rojo);
}
.sidebar-flyout-row.active {
  background: rgba(196, 30, 58, 0.12);
  color: var(--rojo);
  box-shadow: inset 3px 0 0 var(--rojo);
}
.sidebar-flyout-row.active .sidebar-flyout-n {
  color: var(--rojo);
}
.sidebar-flyout-n {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.sidebar-flyout--sheet {
  width: min(340px, 94vw) !important;
  border-radius: 14px 14px 0 0;
  box-shadow: 0 -12px 48px rgba(13, 27, 42, 0.28);
}
.sidebar-flyout-inner--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  padding: 0.75rem 0.65rem 1rem;
  background: var(--bg2);
}
.sidebar-flyout-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.sidebar-flyout-tile:active { transform: scale(0.98); }
.sidebar-flyout-tile.active .sidebar-flyout-tile-img {
  border-color: var(--rojo);
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.22);
  background: linear-gradient(145deg, rgba(196, 30, 58, 0.06) 0%, #eef2f7 100%);
}
.sidebar-flyout-tile.active .sidebar-flyout-pill {
  background: rgba(196, 30, 58, 0.12);
  color: var(--rojo);
  border-color: var(--rojo);
}
.sidebar-flyout-tile.active .sidebar-flyout-tile-n {
  color: var(--rojo);
}
.sidebar-flyout-tile-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(145deg, #eef2f7 0%, #e2e8f0 100%);
  border: 1px solid var(--borde);
  display: flex;
  align-items: center;
  justify-content: center;
}
.sidebar-flyout-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.35rem;
}
.sidebar-flyout-placeholder {
  width: 42%;
  height: 42%;
  border-radius: 50%;
  background: repeating-linear-gradient(-45deg, var(--borde), var(--borde) 2px, transparent 2px, transparent 5px);
  opacity: 0.5;
}
.sidebar-flyout-pill {
  display: inline-block;
  max-width: 100%;
  padding: 0.28rem 0.5rem;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--titulo);
  border: 1px solid var(--rojo);
  border-radius: 999px;
  background: #fff;
  line-height: 1.2;
}
.sidebar-flyout-tile-n {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
}
#main-content { margin-left: var(--sidebar-w); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.nav-mobile-controls { display: none; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; max-width: min(320px, 55vw); }
.nav-mobile-trailing { display: none; align-items: center; gap: 0.4rem; flex-shrink: 0; }

.nav-catalog-controls {
  flex: 1; display: flex; align-items: center; justify-content: center;
  min-width: 0; padding: 0 0.5rem;
}
.nav-search-field {
  display: flex; align-items: center; gap: 0.65rem;
  width: 100%; max-width: 420px;
  padding: 0.5rem 0.9rem;
  background: #ffffff;
  border: 1px solid var(--borde);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.nav-search-field:focus-within {
  border-color: rgba(196,30,58,0.45);
  box-shadow: 0 0 0 2px rgba(196,30,58,0.1);
}
.nav-search-field .nav-search-icon { font-size: 1rem; opacity: 0.75; flex-shrink: 0; pointer-events: none; }
.nav-search-field .nav-search-input {
  flex: 1; min-width: 0; width: 100%;
  padding: 0.2rem 0;
  background: none; border: none;
  color: var(--texto);
  font-family: 'Nunito', sans-serif;
  font-size: 0.875rem;
}
.nav-search-input::placeholder { color: var(--muted); opacity: 0.85; }
.nav-search-input:focus { outline: none; }

.nav-voice-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(13, 27, 42, 0.07);
  color: #4a5a6a;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.nav-voice-btn:hover {
  background: rgba(196, 30, 58, 0.14);
  color: var(--rojo);
}
.nav-voice-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.35);
}
.nav-voice-btn--active {
  background: rgba(196, 30, 58, 0.22);
  color: var(--rojo);
  animation: navVoicePulse 1.1s ease-in-out infinite;
}
@keyframes navVoicePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 30, 58, 0.35); }
  50% { box-shadow: 0 0 0 7px rgba(196, 30, 58, 0); }
}
.nav-voice-icon {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  overflow: visible;
  color: inherit;
}

#mainNavbar .nav-voice-btn--mobile {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
}
#mainNavbar .nav-voice-btn--mobile:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}
#mainNavbar .nav-voice-btn--mobile.nav-voice-btn--active {
  background: rgba(196, 30, 58, 0.45);
  color: #fff;
}

.nav-wp { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.2rem; background: var(--wp); color: white; border-radius: 6px; text-decoration: none; font-size: 0.8rem; font-weight: 700; transition: all .2s; flex-shrink: 0; }
.nav-wp:hover { background: #1e6b35; box-shadow: 0 0 20px rgba(45,140,78,0.4); }
.nav-wp svg { width: 16px; height: 16px; fill: white; }
.nav-wp-mobile { display: none; }
.nav-mobile-search { display: none; }
.nav-mobile-category { display: none; }

/* ── HERO ── */
.hero { min-height: 100vh; display: flex; align-items: center; position: relative; overflow: hidden; padding: 6rem 3rem 4rem; }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 65% 50%, rgba(196,30,58,0.04) 0%, transparent 65%); }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(13,27,42,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(13,27,42,0.06) 1px, transparent 1px); background-size: 50px 50px; mask-image: radial-gradient(ellipse at 30% 50%, black 20%, transparent 70%); }
.hero-content { position: relative; z-index: 2; max-width: 600px; opacity: 0; animation: fadeUp .9s ease forwards .3s; }
.hero-logo-img { height: 180px; max-width: min(480px, 80vw); width: auto; margin-bottom: 1.5rem; object-fit: contain; display: block; }
.hero-tag { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.3rem 1rem; border: 1px solid rgba(196,30,58,0.4); border-radius: 999px; font-size: 0.7rem; color: var(--rojo); letter-spacing: 0.2em; text-transform: uppercase; background: rgba(196,30,58,0.06); margin-bottom: 1.5rem; }
.hero-tag::before { content: '●'; font-size: 0.45rem; animation: blink 2s infinite; }
.hero-titulo { font-family: 'Rajdhani', sans-serif; font-size: clamp(2.8rem,7vw,6rem); font-weight: 700; line-height: 0.95; text-transform: uppercase; color: var(--titulo); margin-bottom: 1.25rem; }
.hero-titulo .linea2 { color: var(--rojo); display: block; }
.hero-intro {
  max-width: 520px;
  margin-bottom: 2.25rem;
  padding: 1.1rem 1.25rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(105deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.72) 55%, rgba(255, 255, 255, 0.35) 100%);
  border: 1px solid rgba(209, 217, 230, 0.75);
  box-shadow: 0 8px 28px rgba(13, 27, 42, 0.07);
}
.hero-sub { font-size: 0.95rem; line-height: 1.7; color: var(--titulo); max-width: 100%; margin: 0; }
.hero-sub .hero-sub-line { display: block; }
.hero-sub .hero-sub-line + .hero-sub-line { margin-top: 0.4rem; color: var(--muted); }
.hero-sub strong { color: var(--titulo); font-weight: 600; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; align-items: stretch; }
.btn-rojo { display: inline-flex; align-items: center; padding: 0.8rem 2rem; background: var(--rojo); color: white; border: none; border-radius: 6px; font-family: 'Rajdhani', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: all .25s; }
.btn-rojo:hover { background: var(--rojo2); box-shadow: 0 0 28px rgba(196,30,58,0.3); transform: translateY(-2px); }
.btn-outline { display: inline-flex; align-items: center; padding: 0.8rem 2rem; background: transparent; color: var(--texto); border: 1px solid var(--borde); border-radius: 6px; font-family: 'Rajdhani', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; transition: all .25s; }
.btn-outline:hover { border-color: var(--rojo); color: var(--rojo); }
.btn-hero-wp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.65rem;
  background: var(--wp);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s;
  box-shadow: 0 2px 14px rgba(45, 140, 78, 0.35);
}
.btn-hero-wp:hover {
  background: #1e6b35;
  color: #fff;
  box-shadow: 0 0 26px rgba(45, 140, 78, 0.45);
  transform: translateY(-2px);
}
.btn-hero-wp .btn-hero-wp-ico { width: 1.15rem; height: 1.15rem; flex-shrink: 0; fill: #fff; }

/* ── MARCAS ── */
.marcas-wrap { background: var(--bg2); border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); padding: 1.25rem 0; overflow: hidden; }
.marcas-track { display: flex; gap: 3rem; animation: scrollX 20s linear infinite; width: max-content; }
.marca-item { font-family: 'Rajdhani', sans-serif; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; white-space: nowrap; padding: 0 1rem; }

/* ── SECCIONES ── */
#products {
  scroll-margin-top: calc(4.75rem + env(safe-area-inset-top, 0px));
}
.sec { padding: 5rem 3rem; background: var(--bg2); }
.sec-alt { padding: 5rem 3rem; background: var(--bg); }
.sec-label { font-size: 0.68rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--rojo); margin-bottom: .5rem; }
.sec-titulo { font-family: 'Rajdhani', sans-serif; font-size: clamp(1.8rem,4vw,3rem); font-weight: 700; text-transform: uppercase; color: var(--titulo); line-height: 1; margin-bottom: 2.5rem; }

/* ── PRODUCTOS ── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap: 1.75rem; }
.prod-card { background: #ffffff; border: 1px solid var(--borde); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .3s; opacity: 0; animation: fadeUp .6s ease forwards var(--card-delay, 0s); box-shadow: var(--shadow-sm); }
.prod-card:hover { border-color: rgba(196,30,58,0.4); transform: translateY(-4px); box-shadow: 0 8px 24px rgba(13,27,42,0.1), 0 0 0 1px rgba(196,30,58,0.1); }

/* ── IMAGEN DE PRODUCTO — altura fija uniforme ── */
.prod-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: linear-gradient(145deg, #f0f5f9 0%, #e4eaf2 100%);
  border-bottom: 1px solid var(--borde);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.prod-img-wrap img:first-child {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  transition: transform .4s ease;
}
.prod-card:hover .prod-img-wrap img:first-child {
  transform: scale(1.07);
  filter: drop-shadow(0 0 16px rgba(196,30,58,0.4));
}

.prod-badge { position: absolute; top: .75rem; left: .75rem; background: var(--rojo); color: white; font-size: 0.6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 4px; z-index: 2; }

/* Contador de medios en la tarjeta (no estilo “chip de categoría”) */
.prod-gallery-count {
  position: absolute;
  bottom: .55rem;
  right: .55rem;
  background: rgba(255, 255, 255, 0.92);
  color: var(--titulo);
  font-size: 0.58rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--borde);
  z-index: 2;
  pointer-events: none;
  letter-spacing: 0.06em;
  box-shadow: none;
}

.prod-body { padding: 1.25rem; background: #ffffff; }
.prod-cat { font-size: 0.62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--rojo); margin-bottom: .35rem; }
.prod-cat .prod-sub {
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 600;
}
.prod-name { font-family: 'Rajdhani', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--titulo); margin-bottom: .35rem; line-height: 1.2; }
.prod-desc { font-size: 0.75rem; color: var(--muted); line-height: 1.6; margin-bottom: 1rem; }
.prod-specs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.spec-tag { font-size: 0.62rem; padding: .2rem .5rem; border-radius: 3px; background: rgba(196,30,58,0.06); border: 1px solid rgba(196,30,58,0.2); color: var(--rojo); }
.prod-footer { display: flex; align-items: center; justify-content: space-between; padding-top: .85rem; border-top: 1px solid var(--borde); }
.prod-btn { padding: .45rem 1rem; background: var(--rojo); color: white; border: none; border-radius: 5px; font-family: 'Rajdhani', sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: all .2s; }
.prod-btn:hover { background: var(--rojo2); box-shadow: 0 0 14px rgba(196,30,58,0.3); }

.prod-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-15deg); width: 70%; max-width: 180px; opacity: 0.08; pointer-events: none; z-index: 1; mix-blend-mode: normal; object-fit: contain; filter: grayscale(100%) brightness(0.4); }

/* ── BANNER CARRUSEL — alto del marco = proporción real de la imagen (sin caja 4:3) ── */
.banner-wrap {
  width: 100%;
  overflow: hidden;
  background: #000;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid var(--borde);
  padding: 0.85rem clamp(0.5rem, 2.5vw, 1.75rem);
  position: relative;
}
.banner-track {
  display: flex;
  align-items: stretch;
  gap: 0;
  animation: bannerScroll 48s linear infinite;
  width: max-content;
  min-height: 0;
  box-sizing: border-box;
}
.banner-wrap:hover .banner-track { animation-play-state: paused; }
.banner-item {
  width: min(820px, calc(100vw - 2.5rem));
  height: auto;
  background: #000;
  border: 1px solid #1a1a1a;
  border-radius: 16px;
  display: block;
  position: relative;
  padding: 0;
  line-height: 0;
  box-sizing: border-box;
  box-shadow: var(--shadow-md);
  transition: border-color .3s, box-shadow .3s, transform .3s;
  cursor: pointer;
  flex-shrink: 0;
  overflow: hidden;
  min-height: 140px;
}
.banner-item:hover {
  border-color: rgba(196,30,58,0.35);
  box-shadow: 0 10px 28px rgba(196,30,58,0.18);
  transform: translateY(-4px);
}
/* Imagen anclada al marco w×H (JS): evita huecos por % height en algunos navegadores */
.banner-item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  filter: drop-shadow(0 2px 8px rgba(13,27,42,0.12));
  transition: filter .3s;
}
.banner-item:hover img {
  filter: drop-shadow(0 6px 18px rgba(196,30,58,0.35));
}
@keyframes bannerScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── NOSOTROS ── */
.nos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.nos-logo-box { width: 100%; aspect-ratio: 1; background: var(--bg); border: 1px solid var(--borde); border-radius: 16px; display: flex; align-items: center; justify-content: center; padding: 3rem; }
.nos-logo-box img { width: 100%; object-fit: contain; }
.nos-titulo { font-family: 'Rajdhani', sans-serif; font-size: clamp(1.8rem,3.5vw,3rem); font-weight: 700; text-transform: uppercase; color: var(--titulo); line-height: 1; margin-bottom: 1.25rem; }
.nos-titulo span { color: var(--rojo); }
.nos-texto { font-size: 0.88rem; color: var(--muted); line-height: 1.8; margin-bottom: 1rem; }
.nos-items { display: flex; flex-direction: column; gap: .85rem; margin-top: 1.5rem; }
.nos-item { display: flex; align-items: flex-start; gap: .85rem; background: rgba(13,27,42,0.02); padding: 0.75rem; border-radius: 8px; }
.nos-ico { width: 38px; height: 38px; border-radius: 8px; background: rgba(196,30,58,0.06); border: 1px solid rgba(196,30,58,0.2); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.nos-item h4 { font-size: 0.88rem; font-weight: 600; color: var(--titulo); margin-bottom: .15rem; }
.nos-item p { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }

/* ── CONTACTO ── */
.con-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.con-titulo { font-family: 'Rajdhani', sans-serif; font-size: clamp(1.8rem,3.5vw,3rem); font-weight: 700; text-transform: uppercase; color: var(--titulo); line-height: 1; margin-bottom: 1rem; }
.con-titulo span { color: var(--rojo); }
.con-sub { font-size: 0.88rem; color: var(--muted); line-height: 1.75; margin-bottom: 2rem; }
.con-items { display: flex; flex-direction: column; gap: 1.25rem; }
.con-item { display: flex; align-items: center; gap: .85rem; background: rgba(13,27,42,0.02); padding: 0.75rem; border-radius: 8px; }
.con-ico { width: 44px; height: 44px; border-radius: 8px; background: rgba(196,30,58,0.06); border: 1px solid rgba(196,30,58,0.2); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.con-lbl { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.con-val { font-size: 0.9rem; color: var(--titulo); font-weight: 500; }
.con-map-block { margin: 1rem 0 0; }
.con-map-unified {
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--borde);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 245, 249, 0.9) 100%);
  box-shadow: var(--shadow-sm);
  box-sizing: border-box;
}
.con-map-unified-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.con-map-unified-pin { font-size: 1.35rem; line-height: 1; flex-shrink: 0; margin-top: 0.1rem; }
.con-map-unified-text { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; }
.con-map-unified-kicker {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.con-map-unified-addr {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--titulo);
  line-height: 1.25;
  letter-spacing: 0.02em;
}
.con-map-unified-hint { font-size: 0.76rem; color: var(--muted); line-height: 1.35; }
.con-map-unified-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.95rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(209, 217, 230, 0.85);
}
.con-map-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
  text-align: center;
  box-sizing: border-box;
}
.con-map-app--google {
  background: #fff;
  border: 1px solid var(--borde);
  color: var(--titulo);
}
.con-map-app--google:hover {
  border-color: rgba(196, 30, 58, 0.45);
  color: var(--rojo);
  box-shadow: 0 2px 10px rgba(196, 30, 58, 0.12);
  transform: translateY(-1px);
}
.con-map-app--waze {
  background: linear-gradient(145deg, #33ccff 0%, #0c8eb8 100%);
  border: 1px solid rgba(12, 142, 184, 0.5);
  color: #fff;
}
.con-map-app--waze:hover {
  box-shadow: 0 2px 14px rgba(14, 165, 233, 0.35);
  transform: translateY(-1px);
}
.con-map-app-w {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}
.con-map-app:focus-visible {
  outline: 2px solid var(--rojo);
  outline-offset: 2px;
}
.con-map-app--waze:focus-visible {
  outline-color: #0ea5e9;
}
.con-card { background: #fefdfb; border: 1px solid var(--borde); border-radius: 14px; padding: 2rem; box-shadow: var(--shadow-sm); }
.btn-wp-grande { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1.1rem 2rem; background: var(--wp); color: white; border: none; border-radius: 8px; font-family: 'Rajdhani', sans-serif; font-size: 1.1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; transition: all .25s; margin-top: 2rem; width: 100%; }
.btn-wp-grande:hover { background: #1e6b35; box-shadow: 0 0 28px rgba(45,140,78,0.4); transform: translateY(-2px); }
.btn-wp-grande svg { width: 22px; height: 22px; fill: white; }

/* ── FOOTER ── */
footer { background: #ffffff; border-top: 1px solid var(--borde); padding: 2.5rem 3rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; box-shadow: 0 -2px 12px rgba(13,27,42,0.06); }
.footer-logo img { height: 40px; object-fit: contain; }
footer p { font-size: 0.72rem; color: var(--muted); }
.footer-info { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.footer-credit { font-size: 0.75rem; color: var(--muted); opacity: 0.8; }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; z-index: 1000; background: rgba(13,27,42,0.7); backdrop-filter: blur(8px); display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: #ffffff; border: 1px solid var(--borde); border-radius: 16px; width: 100%; max-width: 960px; max-height: 90vh; overflow-y: auto; animation: modalIn .3s ease; position: relative; box-shadow: var(--shadow-lg); }
.modal-body { padding: 2rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; position: relative; z-index: 1; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.5rem 2rem; border-bottom: 1px solid var(--borde); background: #ffffff; z-index: 10; position: relative; }
.modal-titulo { font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--titulo); }
.modal-close { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--borde); background: transparent; color: var(--texto); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.modal-close:hover { border-color: var(--rojo); color: var(--rojo); background: rgba(196,30,58,0.05); }
.modal-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-15deg); width: 70%; opacity: 0.06; pointer-events: none; z-index: 0; mix-blend-mode: normal; object-fit: contain; filter: grayscale(100%) brightness(0.4) contrast(1.2); }

.modal-imgs { display: flex; flex-direction: column; gap: 1rem; }

/* Imagen principal del modal con posición relativa para flechas */
.modal-img-main {
  width: 100%;
  aspect-ratio: 1/1;
  max-height: 65vh;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;  /* ✅ Fondo blanco sólido móvil también */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

@media (max-width: 768px) {
  .modal-img-main {
    background: #ffffff;  /* ✅ Blanco sólido móvil */
  }
}

.modal-video-wrap {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.modal-video-wrap iframe,
.modal-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16/9;
}
.modal-img-main img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* ✅ Imagen COMPLETA sin cortar/dimensionada perfecta */
  padding: 0.5rem;
  image-rendering: -webkit-optimize-contrast;
  transition: opacity .15s ease, transform .15s ease;
}

/* Flechas de navegación de galería */
.modal-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--borde);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--titulo);
  z-index: 5;
  transition: background .2s, border-color .2s, transform .2s;
  box-shadow: 0 2px 10px rgba(13,27,42,0.14);
  user-select: none;
  line-height: 1;
}
.modal-nav-arrow:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
}
.modal-nav-arrow.left  { left: .65rem; }
.modal-nav-arrow.right { right: .65rem; }

/* Thumbs de galería — más grandes, scroll horizontal */
.modal-img-thumbs {
  display: flex;
  gap: .65rem;
  overflow-x: auto;
  padding-bottom: .3rem;
  scrollbar-width: thin;
  scrollbar-color: var(--rojo) var(--borde);
}
.modal-img-thumbs::-webkit-scrollbar       { height: 4px; }
.modal-img-thumbs::-webkit-scrollbar-track { background: var(--bg); border-radius: 4px; }
.modal-img-thumbs::-webkit-scrollbar-thumb { background: var(--rojo); border-radius: 4px; }

.modal-thumb {
  width: 90px;
  height: 90px;
  border-radius: 8px;
  border: 2px solid var(--borde);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg);
  transition: border-color .2s, transform .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.modal-thumb:hover { border-color: rgba(196,30,58,0.5); transform: translateY(-2px); }
.modal-thumb.active { border-color: var(--rojo); box-shadow: 0 0 0 2px rgba(196,30,58,0.22); }
.modal-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; transition: transform .2s; }
.modal-thumb:hover img { transform: scale(1.08); }

.modal-badge { display: inline-block; background: var(--rojo); color: white; font-size: 0.6rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .25rem .7rem; border-radius: 4px; margin-bottom: 1rem; }
.modal-cat { font-size: 0.68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--rojo); margin-bottom: .4rem; }
.modal-cat .modal-subcat {
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--muted);
  font-weight: 600;
}
.modal-name { font-family: 'Rajdhani', sans-serif; font-size: 1.8rem; font-weight: 700; color: var(--titulo); line-height: 1; margin-bottom: 1rem; }
.modal-desc { font-size: 0.82rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.5rem; }
.modal-tabla { width: 100%; border-collapse: collapse; font-size: 0.75rem; margin-bottom: 1.5rem; }
.modal-tabla tr { border-bottom: 1px solid var(--borde); }
.modal-tabla tr:nth-child(even) { background: rgba(13,27,42,0.02); }
.modal-tabla td { padding: .45rem .6rem; }
.modal-tabla td:first-child { color: var(--muted); font-weight: 600; width: 45%; }
.modal-tabla td:last-child { color: var(--texto); }
.modal-apps h4 { font-family: 'Rajdhani', sans-serif; font-size: 0.85rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--titulo); margin-bottom: .6rem; }
.modal-apps ul { list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.modal-apps li { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.modal-apps li::before { content: '▸'; color: var(--rojo); }
.modal-wp { display: flex; align-items: center; justify-content: center; gap: .6rem; padding: .85rem; background: var(--wp); color: white; border: none; border-radius: 8px; font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all .25s; width: 100%; margin-top: 1rem; }
.modal-wp:hover { background: #1e6b35; box-shadow: 0 0 24px rgba(45,140,78,0.3); }
.modal-wp svg { width: 20px; height: 20px; fill: white; }

/* ── BOTÓN PDF ── */
.modal-pdf-btn { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.85rem 1.25rem; background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%); color: white; border: none; border-radius: 8px; font-family: 'Rajdhani', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; text-decoration: none; transition: all 0.25s; width: 100%; margin: 1rem 0; justify-content: center; box-shadow: 0 4px 12px rgba(44,90,160,0.2); }
.modal-pdf-btn:hover { background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%); box-shadow: 0 6px 20px rgba(44,90,160,0.3); transform: translateY(-2px); }
.modal-pdf-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(44,90,160,0.3); }

/* ── ANIMACIONES ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .2; } }
@keyframes scrollX { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes modalIn { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── HAMBURGER ── */
/* ── MOBILE SIDEBAR ── */
@media (max-width: 1024px) {
  :root {
    --sidebar-w: min(300px, 92vw);
    /* Altura aproximada de la barra (hamburguesa + logo + iconos + padding) */
    --mobile-nav-stack-height: calc(env(safe-area-inset-top, 0px) + 3.65rem);
  }
  #main-content {
    margin-left: 0;
  }
  /* Hero: misma imagen que la marca de página, visible en móvil (el watermark fijo a veces no se nota detrás del hero). */
  .hero-bg {
    background-image:
      radial-gradient(ellipse 60% 70% at 65% 50%, rgba(196, 30, 58, 0.07) 0%, transparent 65%),
      linear-gradient(to bottom, rgba(240, 245, 249, 0.9) 0%, rgba(240, 245, 249, 0.5) 42%, rgba(240, 245, 249, 0.18) 100%),
      url('https://res.cloudinary.com/djlr3wszq/image/upload/v1776290344/mafondo_mo86qx.jpg');
    background-size: auto, auto, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
  }
  /* Oscurece solo el contenido detrás del menú; la barra superior queda limpia */
  .sidebar-overlay {
    display: block;
    top: var(--mobile-nav-stack-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.78);
    backdrop-filter: blur(4px);
  }
  /* Menú categorías: ancho completo debajo del navbar (como referencia) */
  .sidebar {
    top: var(--mobile-nav-stack-height);
    left: 0;
    right: 0;
    /* Deja una franja inferior para poder tocar el overlay y cerrar */
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    width: 100%;
    max-width: none;
    height: auto;
    transform: translateY(calc(-100% - 8px));
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 32px rgba(13, 27, 42, 0.12);
    padding: 0;
    background: #fff;
    border-right: none;
    border-radius: 0;
    overflow: hidden;
    max-height: none;
    will-change: transform;
  }
  .sidebar:not(.open) {
    pointer-events: none;
  }
  .sidebar.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  /* Si se abre la búsqueda en la barra, bajar el panel del menú */
  body:has(#mainNavbar.nav-search-open) .sidebar.open {
    top: calc(env(safe-area-inset-top, 0px) + 6.35rem);
  }
  body:has(#mainNavbar.nav-search-open) .sidebar-overlay.open {
    top: calc(env(safe-area-inset-top, 0px) + 6.35rem);
  }
  /* Cierre con la X del navbar; lista empieza en “Todas las categorías” */
  .sidebar-panel-header {
    display: none;
  }
  .sidebar-nav {
    padding: 0.65rem 0.85rem 1rem;
  }
  .sidebar-cat {
    padding: 0.72rem 0.5rem;
    font-size: 0.82rem;
    letter-spacing: 0.05em;
  }
  .sidebar-cat.active {
    background: rgba(196, 30, 58, 0.09);
    color: var(--rojo);
    box-shadow: inset 0 0 0 1px rgba(196, 30, 58, 0.12);
  }
  .sidebar-cat--parent.has-sub-filter {
    background: rgba(196, 30, 58, 0.1);
  }
  .sidebar-cat-count {
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.64rem;
  }
  .sidebar.sidebar--flyout-preview .sidebar-cat.sidebar-cat--all.active {
    background: #fff;
    color: var(--titulo);
    box-shadow: none;
  }
  .sidebar.sidebar--flyout-preview .sidebar-cat.sidebar-cat--all.active .sidebar-cat-count {
    background: var(--bg);
    color: var(--muted);
    border: 1px solid var(--borde);
  }

  /* Flyout subcategorías: tarjeta blanca redondeada sobre el listado */
  .sidebar-flyout--sheet {
    width: min(360px, calc(100vw - 1.25rem)) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    top: auto !important;
    bottom: max(12px, env(safe-area-inset-bottom, 12px)) !important;
    border-radius: 16px !important;
    border: 1px solid var(--borde) !important;
    box-shadow:
      0 12px 40px rgba(13, 27, 42, 0.2),
      0 0 0 1px rgba(255, 255, 255, 0.5) !important;
    max-height: min(72vh, 520px) !important;
  }
  .sidebar-flyout--sheet .sidebar-flyout-title {
    text-align: left;
    padding: 0.75rem 1rem 0.55rem;
    font-size: 0.9rem;
    border-radius: 16px 16px 0 0;
  }
  .sidebar-flyout--sheet .sidebar-flyout-inner--grid {
    padding: 0.65rem 0.75rem 1rem;
  }
  .sidebar-flyout-row {
    font-size: 0.76rem;
  }
  .sidebar-flyout-n {
    font-size: 0.68rem;
  }
  .sidebar-flyout-pill {
    font-size: 0.66rem;
  }
  .sidebar-flyout-tile-n {
    font-size: 0.68rem;
  }
  .sidebar-section-label {
    font-size: 0.76rem;
  }

  /* Navbar móvil / tablet — barra oscura marca + logo centrado + acciones */
  #mainNavbar.nav-shell {
    left: 0;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas:
      "menu logo actions"
      "search search search";
    align-items: center;
    gap: 0.35rem 0.55rem;
    padding: max(0.5rem, env(safe-area-inset-top, 0px)) 0.65rem 0.55rem;
    background: linear-gradient(168deg, #141f33 0%, var(--titulo) 48%, #0a121f 100%);
    border-bottom: 2px solid var(--rojo);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
    backdrop-filter: none;
  }
  #mainNavbar .nav-sidebar-toggle {
    grid-area: menu;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    cursor: pointer;
    z-index: 255;
  }
  #mainNavbar .nav-sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2.5px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  #mainNavbar .nav-sidebar-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  #mainNavbar .nav-sidebar-toggle.active span:nth-child(2) { opacity: 0; }
  #mainNavbar .nav-sidebar-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  #mainNavbar .nav-logo {
    grid-area: logo;
    justify-self: center;
  }
  #mainNavbar .nav-logo a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.55rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35), 0 6px 18px rgba(0, 0, 0, 0.22);
  }
  #mainNavbar .nav-logo img { height: 36px; max-width: 110px; object-fit: contain; }

  #mainNavbar .nav-mobile-trailing {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }
  .nav-icon-btn,
  .nav-icon-link {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.95);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
  }
  .nav-icon-btn:hover,
  .nav-icon-link:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(196, 30, 58, 0.55);
  }
  .nav-wp-icon {
    border-color: rgba(45, 140, 78, 0.55);
    background: rgba(45, 140, 78, 0.32);
  }
  .nav-wp-icon:hover {
    background: rgba(45, 140, 78, 0.5);
    border-color: rgba(45, 140, 78, 0.85);
  }
  .nav-icon-svg { width: 22px; height: 22px; fill: currentColor; }

  #mainNavbar .nav-catalog-controls { display: none !important; }
  #mainNavbar .nav-wp { display: none !important; }

  #mainNavbar .nav-mobile-controls {
    grid-area: search;
    display: flex;
    width: 100%;
    max-width: none;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: max-height 0.3s ease, opacity 0.22s ease, padding 0.22s ease, margin 0.22s ease;
  }
  #mainNavbar.nav-search-open .nav-mobile-controls {
    max-height: 56px;
    opacity: 1;
    margin-top: 0.15rem;
    padding-top: 0.35rem;
  }
  #mainNavbar .nav-mobile-search-input {
    flex: 1;
    width: 100%;
    padding: 0.55rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
  }
  #mainNavbar .nav-mobile-search-input::placeholder { color: rgba(255, 255, 255, 0.48); }
  #mainNavbar .nav-mobile-search-input:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 2px rgba(196, 30, 58, 0.28);
  }

  .sidebar-link.active { padding-left: 0.75rem; }
  .sidebar-link.active::before { display: none; }

}

.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 28px; height: 28px; background: none; border: none; cursor: pointer; padding: 0; z-index: 210; }
.nav-hamburger span { display: block; width: 100%; height: 2px; background: var(--muted); border-radius: 2px; transition: all .3s ease; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
.nav-hamburger:hover span { background: var(--rojo); }
/* ── Hide old mobile menu ── */
.nav-links { display: none !important; }
.nav-mobile-overlay { display: none !important; }
.nav-hamburger { display: none !important; }

/* ── RESPONSIVE TABLET ── */
@media (max-width: 1024px) {
  #mainNavbar.nav-shell { overflow-x: clip; min-width: 0; }
  .nav-logo img { height: 40px; }
  .nav-logo { flex-shrink: 0; }
  .nav-links { gap: 1rem; }
  .nav-links a { font-size: 0.75rem; padding: 0.4rem 0.6rem; }
  .nav-catalog-controls { gap: 0.5rem; flex-shrink: 1; padding-inline: 0.25rem; }
  .nav-search-field { max-width: 100%; padding: 0.45rem 0.65rem; }
  .nav-search-field .nav-search-input { font-size: 0.8rem; }
  .nav-wp { padding: 0.4rem 0.8rem; font-size: 0.7rem; }
  .hero { padding: 5rem 2rem 3rem; }
  .sec, .sec-alt { padding: 4rem 2rem; }
  .nos-grid, .con-grid { gap: 3rem; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 1.5rem; }
  .banner-item {
    width: min(820px, calc(100vw - 2.5rem));
    padding: 0;
  }
}

/* Categoría en catálogo: solo vía sidebar / hamburguesa (el <select> sigue en el DOM para sincronía JS) */
#mobileCatalogCategoryWrap,
.mobile-catalog-category-wrap {
  display: none !important;
}

/* ── RESPONSIVE MÓVIL ── */
@media (max-width: 768px) {
  #mainNavbar.nav-shell {
    position: fixed;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 300;
    width: 100%;
  }
  .nav-hamburger { display: flex; }
  .nav-mobile-overlay { display: block; }
  .nav-links { position: fixed; top: 0; right: -100%; width: 280px; height: 100vh; flex-direction: column; gap: 0; background: var(--bg2); border-left: 1px solid var(--borde); padding: 5rem 1.5rem 2rem; transition: right .3s ease; z-index: 200; overflow-y: auto; }
  .nav-links.open { right: 0; }
  .nav-links li { border-bottom: 1px solid var(--borde); }
  .nav-links a { display: block; padding: 1rem 0; font-size: 0.9rem; color: var(--texto); }
  .nav-links a:hover, .nav-links a.active { color: var(--rojo); padding-left: 0.5rem; }
  .nav-links a::after { display: none; }
  .nav-catalog-controls { display: none !important; }
  .nav-category-mobile { display: block !important; }
  .nav-wp { display: none; }
  .nav-logo { cursor: pointer; }
  .nav-wp-mobile { display: block; }
  .nav-wp-mobile a { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 0; color: var(--wp) !important; font-weight: 600; border-top: 1px solid var(--borde); margin-top: 0.5rem; text-decoration: none; }
  .nav-wp-mobile svg { width: 20px; height: 20px; fill: var(--wp); }
  .nav-mobile-search { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 0; border-bottom: 1px solid var(--borde); margin-bottom: 0.5rem; }
  .nav-mobile-search-input { flex: 1; padding: 0.7rem 1rem; background: var(--bg); border: 1px solid var(--borde); border-radius: 8px; color: var(--texto); font-family: 'Nunito', sans-serif; font-size: 0.9rem; }
  .nav-mobile-search-input:focus { outline: none; border-color: var(--rojo); }
  .nav-mobile-search-input::placeholder { color: var(--muted); }
  .nav-mobile-category { display: flex; flex-direction: column; padding: 0.75rem 0; border-bottom: 1px solid var(--borde); margin-bottom: 0.5rem; width: 100%; }
  .nav-mobile-category-label { display: block; font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
  .nav-mobile-category-select { width: 100%; padding: 0.7rem 1rem; background: var(--bg); border: 1px solid var(--borde); border-radius: 8px; color: var(--texto); font-family: 'Nunito', sans-serif; font-size: 0.9rem; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
  .nav-mobile-category-select:focus { outline: none; border-color: var(--rojo); }
  .nav-links li { display: block !important; }
  .sec, .sec-alt { padding: 3rem clamp(0.65rem, 4vw, 1.5rem); }
  .hero { padding: 4rem clamp(0.65rem, 4vw, 1.5rem) 2.5rem; }
  .hero-content { max-width: 100%; }
  .hero-titulo { font-size: clamp(2rem,8vw,3rem); }
  .hero-sub { font-size: 0.9rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns a { width: 100%; justify-content: center; min-height: 44px; -webkit-tap-highlight-color: transparent; }
  .nav-logo img { height: 40px; }
  .hero-logo-img { height: 100px; max-width: min(260px, 70vw); }
  .hero-tag { font-size: 0.6rem; padding: 0.25rem 0.75rem; }
  .sec-titulo { font-size: 1.6rem; margin-bottom: 1.5rem; }
  .nos-titulo, .con-titulo { font-size: 1.6rem; }
  .btn-rojo, .btn-outline, .btn-hero-wp { padding: 0.7rem 1.5rem; font-size: 0.85rem; }

  /* Modal móvil */
  .modal { max-width: 100%; border-radius: 12px; max-height: 92vh; margin-top: 0; padding-bottom: 1.5rem; }
  .modal-overlay { padding: clamp(0.35rem, 2.5vw, 0.75rem); align-items: center; }
  .modal-body { grid-template-columns: 1fr; padding: 1rem; gap: 1rem; }
  .modal-header { padding: 0.75rem 1rem; }
  .modal-titulo { font-size: 1.2rem; }
  .modal-name { font-size: 1.4rem; }
  .modal-desc { font-size: 0.75rem; }
  .modal-tabla { font-size: 0.65rem; }
  .modal-tabla td { padding: 0.35rem 0.4rem; }
  .modal-img-main { aspect-ratio: 16/10; }
  .modal-thumb { width: 64px; height: 64px; }
  .modal-nav-arrow { width: 30px; height: 30px; font-size: 0.9rem; }
  .modal-apps h4 { font-size: 0.75rem; }
  .modal-apps li { font-size: 0.65rem; }
  .modal-wp { padding: 0.7rem; font-size: 0.85rem; }
  .modal-wp svg { width: 16px; height: 16px; }
  .modal-pdf-btn { padding: 0.75rem 1rem; font-size: 0.9rem; }

  /* Grids */
  .nos-grid, .con-grid { grid-template-columns: 1fr; gap: 2rem; }
  .products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;
    justify-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 clamp(0.5rem, 3vw, 1rem);
    margin: 0 auto;
    box-sizing: border-box;
  }
  .prod-card {
    width: 100%;
    max-width: min(400px, calc(100vw - 1.25rem));
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .prod-btn { padding: 0.55rem 1rem; min-height: 36px; }

  .products-count {
    width: 100%;
    justify-content: center;
    padding: 0.65rem 0.85rem;
    gap: 0.55rem 0.75rem;
  }
  .products-count .count-total-wrap {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    justify-content: center;
    flex: 1 1 100%;
    margin-top: 0.15rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(13, 27, 42, 0.1);
  }
  .products-count .count-total-num {
    font-size: 1.1rem;
  }

  .sidebar-nav-scroll {
    padding-bottom: 2rem;
  }

  /* Banner — ancho slide = --banner-slide-w (JS, interior real del wrap); sin 100vw para no desincronizar object-fit */
  .banner-wrap {
    padding: 0.35rem max(0px, env(safe-area-inset-left, 0px)) 0.45rem max(0px, env(safe-area-inset-right, 0px));
  }
  .banner-track { animation: bannerScroll 62s linear infinite; }
  .banner-item {
    flex: 0 0 var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    width: var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-width: none;
    padding: 0;
    border-radius: 12px;
  }
  .banner-item img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  footer { padding: 2rem clamp(0.65rem, 4vw, 1.5rem) max(2rem, env(safe-area-inset-bottom, 0px)); flex-direction: column; text-align: center; gap: 1.5rem; }
  body { overflow-x: clip; }
  .mobile-catalog-controls {
    display: flex;
    padding: 0.65rem clamp(0.5rem, 3vw, 1.25rem) max(0.75rem, env(safe-area-inset-bottom, 0px));
    bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  }

  .con-grid iframe { max-width: 100%; box-sizing: border-box; }
  .con-map-unified-actions { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .banner-wrap {
    padding-inline: max(0px, env(safe-area-inset-left, 0px)) max(0px, env(safe-area-inset-right, 0px));
  }
  .banner-item {
    flex: 0 0 var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    width: var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    padding: 0;
    border-radius: 10px;
  }

  .pagination-controls { gap: 0.5rem; padding: 0.75rem 1rem; border-radius: 30px; }
  .pagination-btn { width: 32px; height: 32px; font-size: 1rem; }
  .pagination-info { gap: 0.35rem; padding: 0.4rem 0.75rem; font-size: 0.8rem; border-radius: 20px; }
  .pagination-current { font-size: 0.9rem; min-width: 18px; }
}

@media (max-width: 360px) {
  .banner-wrap {
    padding-inline: max(0px, env(safe-area-inset-left, 0px)) max(0px, env(safe-area-inset-right, 0px));
  }
  .banner-item {
    flex: 0 0 var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    width: var(--banner-slide-w, calc(100vw - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    padding: 0;
    border-radius: 8px;
  }
  .modal-body { padding: 0.75rem; }
  .modal-badge { font-size: 0.55rem; padding: 0.2rem 0.5rem; }
  .modal-cat { font-size: 0.6rem; }
  .modal-name { font-size: 1.2rem; }
  .products-grid { gap: 1rem; padding-inline: clamp(0.35rem, 2vw, 0.65rem); }
  .prod-card { max-width: calc(100vw - 0.75rem); }
  .sec { padding: 2rem clamp(0.45rem, 3vw, 0.75rem); }
  .sec-alt { padding: 2rem clamp(0.45rem, 3vw, 0.75rem); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .hero-content, .reveal, .prod-card { animation: none !important; opacity: 1 !important; transform: none !important; }
  .banner-track { animation: none !important; }
}

.mobile-catalog-controls { display: none; position: fixed; bottom: 1rem; left: 0; right: 0; padding: 0.75rem 1rem; background: var(--bg2); border-top: 1px solid var(--borde); z-index: 150; gap: 0.75rem; justify-content: center; }

/* ── CONTADOR (contrasta con .sec blanco; contorno claro) ── */
.products-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.75rem 1.15rem;
  margin-bottom: 1.35rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  border: 2px solid #b8c5d6;
  border-top: 3px solid var(--rojo);
  border-radius: 10px;
  box-shadow: none;
  filter: none;
}
/* Ej.: "Página 1 6-6" = productos en esta página / máx. por página */
.products-count .count-page-line {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.28rem;
  min-width: 0;
  flex: 1 1 auto;
  font-family: 'Rajdhani', sans-serif;
}
.products-count .count-page-prefix {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.04em;
}
.products-count .count-page-num {
  color: var(--titulo);
  font-weight: 700;
  font-size: 1rem;
  min-width: 0.65rem;
}
.products-count .count-page-range {
  color: var(--texto);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.products-count .count-separator { color: var(--muted); margin: 0 0.1rem; font-weight: 400; }
/* Total: tipografía de dato (no botón rojo, para no confundir con categorías) */
.products-count .count-total-wrap {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.3rem 0.5rem;
  flex: 0 0 auto;
  font-family: 'Rajdhani', sans-serif;
  box-shadow: none;
  background: none;
  border: none;
  padding: 0 0 0 1rem;
  margin: 0 0 0 0.35rem;
  border-left: 1px solid rgba(13, 27, 42, 0.12);
}
.products-count .count-total-kicker {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.products-count .count-total-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--titulo);
  line-height: 1;
}
.products-count .count-total-suffix {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
@media (min-width: 769px) {
  .products-count .count-total-wrap {
    margin-left: auto;
  }
}
@media (min-width: 1025px) {
  .products-count {
    padding: 0.8rem 1.35rem;
    gap: 0.75rem 1.15rem;
    border-radius: 12px;
  }
  .products-count .count-total-num {
    font-size: 1.35rem;
  }
}

/* Refuerzo: mismo fondo que .sec (#fff) hacía invisible el borde; #products alza especificidad */
#products #productsCount.products-count.catalog-stats {
  background: var(--bg);
  border: 2px solid #9aacbd;
  border-top: 3px solid var(--rojo);
  box-shadow: none;
}

.products-count .count-total { color: var(--titulo); font-weight: 700; font-size: 0.9rem; font-family: 'Rajdhani', sans-serif; }
.products-count .count-suffix { color: var(--muted); font-size: 0.75rem; font-weight: 500; margin-left: 0.15rem; }

/* ── CATEGORÍA ACTIVA ── */
.category-active {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.45rem 0;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--borde);
  border-radius: 0;
  box-shadow: none;
  animation: fadeUp 0.4s ease;
}
.category-active .categoria-badge { font-size: 0.7rem; font-weight: 600; color: var(--rojo); text-transform: uppercase; letter-spacing: 0.08em; }
.category-active .category-name {
  font-size: 0.85rem;
  font-weight: 700;
  font-family: 'Rajdhani', sans-serif;
  background: transparent;
  color: var(--titulo);
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: 0.04em;
}
.categoria-activa {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--borde);
  border-radius: 0;
}
.categoria-activa .categoria-badge { font-size: 0.7rem; font-weight: 600; color: var(--rojo); text-transform: uppercase; letter-spacing: 0.08em; }
.categoria-activa .categoria-nombre { font-size: 0.85rem; font-weight: 600; color: var(--titulo); }

/* ── MOBILE FILTER ── */
.mobile-filter-btn { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.7rem 1.25rem; background: var(--bg3); border: 1px solid var(--borde); border-radius: 8px; color: var(--texto); font-family: 'Nunito', sans-serif; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; flex: 1; max-width: 160px; }
.mobile-filter-btn:hover { border-color: var(--rojo); color: var(--rojo); }
.mobile-filter-btn.active { background: var(--rojo); border-color: var(--rojo); color: white; }
.mobile-filter-panel { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg); z-index: 300; padding: 1.5rem; overflow-y: auto; }
.mobile-filter-panel.open { display: block; animation: fadeUp 0.3s ease; }
.mobile-filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--borde); }
.mobile-filter-title { font-family: 'Rajdhani', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--titulo); }
.mobile-filter-close { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--borde); background: transparent; color: var(--texto); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mobile-filter-close:hover { border-color: var(--rojo); color: var(--rojo); }
.mobile-search-input { width: 100%; padding: 0.85rem 1rem; background: var(--bg); border: 1px solid var(--borde); border-radius: 8px; color: var(--texto); font-family: 'Nunito', sans-serif; font-size: 0.9rem; margin-bottom: 1rem; }
.mobile-search-input:focus { outline: none; border-color: var(--rojo); }
.mobile-search-input::placeholder { color: var(--muted); }
.mobile-category-label { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.5rem; }
.mobile-category-select { width: 100%; padding: 0.85rem 1rem; background: var(--bg); border: 1px solid var(--borde); border-radius: 8px; color: var(--texto); font-family: 'Nunito', sans-serif; font-size: 0.9rem; cursor: pointer; margin-bottom: 1.5rem; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
.mobile-category-select:focus { outline: none; border-color: var(--rojo); }
.mobile-filter-apply { width: 100%; padding: 0.85rem; background: var(--rojo); border: none; border-radius: 8px; color: white; font-family: 'Rajdhani', sans-serif; font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; cursor: pointer; transition: all 0.2s ease; }
.mobile-filter-apply:hover { background: var(--rojo2); }
.mobile-filter-clear { width: 100%; padding: 0.85rem; background: transparent; border: 1px solid var(--borde); border-radius: 8px; color: var(--muted); font-family: 'Rajdhani', sans-serif; font-size: 0.9rem; font-weight: 600; cursor: pointer; margin-top: 0.75rem; transition: all 0.2s ease; }
.mobile-filter-clear:hover { border-color: var(--rojo); color: var(--rojo); }

/* ── PAGINACIÓN ── */
.pagination-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; padding: 1.25rem 2rem; background: var(--bg2); border-radius: 50px; border: 1px solid var(--borde); box-shadow: var(--shadow-sm); }
.pagination-btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--borde); background: var(--bg); color: var(--texto); font-size: 1.25rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.25s cubic-bezier(0.4,0,0.2,1); box-shadow: var(--shadow-sm); }
.pagination-btn:hover:not([disabled]) { border-color: var(--rojo); color: var(--rojo); background: rgba(196,30,58,0.06); transform: translateY(-2px) scale(1.05); box-shadow: 0 6px 20px rgba(196,30,58,0.2); }
.pagination-btn:active:not([disabled]) { transform: translateY(0) scale(0.98); }
.pagination-btn[disabled] { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.pagination-info { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: var(--bg); border-radius: 25px; font-size: 0.9rem; color: var(--muted); border: 1px solid var(--borde); }
.pagination-current { color: var(--rojo); font-weight: 700; font-size: 1.1rem; min-width: 24px; text-align: center; }
.pagination-separator { color: var(--muted); font-weight: 400; }
.pagination-total { color: var(--muted); font-weight: 500; }

/* ── LIGHTBOX — zoom + paneo ── */
#lightboxOverlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(255,255,255,0.98);  /* ✅ MODO BLANCO */
  backdrop-filter: blur(12px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
#lightboxOverlay.open { display: flex; animation: modalIn .2s ease; }

.lb-img-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: hidden;
}

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 42px;
  min-height: 44px;
  padding: 0 0.15rem;
  border-radius: 10px;
  border: 1px solid var(--borde);
  background: rgba(255, 255, 255, 0.94);
  color: var(--titulo);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: 'Rajdhani', sans-serif;
}
.lb-nav:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}
.lb-nav--prev { left: max(0.35rem, env(safe-area-inset-left, 0px)); }
.lb-nav--next { right: max(0.35rem, env(safe-area-inset-right, 0px)); }

.lb-counter {
  display: none;
  position: absolute;
  bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--borde);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  pointer-events: none;
}

#lbImg {
  position: relative;
  z-index: 1;
  max-width: 70vw;
  max-height: 55vh;  /* ✅ Más pequeña/representativa como modal */
  width: 85%;        /* ✅ Fija más pequeña */
  height: 70%;
  object-fit: contain;
  border-radius: 12px;
  user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: transform;
  box-shadow: 0 4px 24px rgba(13,27,42,0.12);
  border: none;
  background: transparent;
}
#lbImg:active { cursor: grabbing; }

.lb-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--borde);
  background: var(--bg2);
  color: var(--titulo); font-size: 1.1rem;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: background .2s, border-color .2s; z-index: 10;
  box-shadow: var(--shadow-sm);
}
.lb-close:hover { background: var(--bg); border-color: var(--rojo); color: var(--rojo); }

.lb-controls {
  display: flex; align-items: center;
  gap: 0.6rem; padding-top: 0.75rem;
  flex-wrap: wrap; justify-content: center;
}

.lb-ctrl-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--borde);
  background: var(--bg2);
  color: var(--titulo);
  font-size: 1rem; cursor: pointer;
  font-family: 'Nunito', sans-serif;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
  box-shadow: var(--shadow-sm);
}
.lb-ctrl-btn:hover { background: var(--rojo); border-color: var(--rojo); color: #fff; }

.lb-hint {
  flex: 1 1 100%;
  max-width: 28rem;
  margin: 0 auto;
  padding-top: 0.35rem;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.03em;
  line-height: 1.45;
  text-align: center;
}

#modalImgMain { cursor: zoom-in; }

@media (max-width: 768px) {
  #lbImg { max-width: 95%; max-height: 65vh; }
  .lb-hint { font-size: 0.58rem; max-width: 92vw; padding-top: 0.45rem; }
}