/* Menú móvil */
@media (max-width: 900px) {
  .main-nav {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    background: #fff;
    z-index: 1200;
    justify-content: center;
    gap: 1.2rem;
    box-shadow: 0 2px 8px rgba(12,18,30,0.08);
    padding: 0.7rem 0;
  }
  .mobile-menu { display: none; }
}

@media (max-width: 900px) {
  .mobile-menu[style*='block'] { display: flex !important; }
}

@media (max-width: 600px) {
  .mobile-menu > div { width: 90vw !important; max-width: 340px !important; }
  .main-nav {
    font-size: 1.1rem;
    gap: 0.7rem;
    padding: 0.5rem 0;
  }
}
.hero-carousel {
  display: flex;
  width: 100vw;
  height: 420px;
  position: relative;
  overflow-x: hidden;
}
@media (max-width: 600px) {
  .hero-carousel {
    height: 220px;
    min-width: 100vw;
    overflow-x: hidden;
  }
  .carousel-slide {
    min-width: 100vw;
    padding: 1rem 0.5rem;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .slide-content {
    max-width: 100vw;
    padding: 0.5rem;
    margin: 0 auto;
    text-align: center;
  }
  .hero-carousel-wrapper {
    overflow-x: hidden;
  }
}
/* ===================================
   VARIABLES CSS GLOBALES
   =================================== */
:root {
  /* Colores */
  --bg: #f9f6f3;
  --card: #ffffff;
  --accent: #0b79d0;
  --accent-dark: #054a99;
  --muted: #6b7280;
  --text-primary: #0f172a;
  --success: #16a34a;
  --danger: #dc2626;
  --danger-dark: #b91c1c;
  --border-light: #e6e9ef;
  --border-lighter: #f0f2f5;
  
  /* Dimensiones */
  --logo-size: 96px;
  --container: 1100px;
  --radius: 8px;
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(12, 18, 30, 0.04);
  --shadow-md: 0 4px 12px rgba(12, 18, 30, 0.06);
  --shadow-lg: 0 6px 18px rgba(12, 18, 30, 0.08);
  --shadow-xl: 0 8px 20px rgba(12, 18, 30, 0.12);
  --shadow-2xl: 0 12px 30px rgba(12, 18, 30, 0.15);
}

/* ===================================
   RESET Y ESTILOS BASE
   =================================== */
* {
  box-sizing: border-box;
}

body {
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.25rem;
}

/* ===================================
   HEADER - ESTILOS BASE
   =================================== */
.site-header {
  background: linear-gradient(90deg, #fff, #fbfdff);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  gap: 0.3rem;
}

.brand-controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.logo {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
}

.logo img {
  height: var(--logo-size);
  margin-right: 4px;
  vertical-align: middle;
}

/* ===================================
   NAVEGACIÓN PRINCIPAL
   =================================== */
.main-nav {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.main-nav a {
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  transition: all 220ms ease;
}

.main-nav a:hover {
  background: linear-gradient(90deg, rgba(11, 121, 208, 0.06), rgba(11, 121, 208, 0.02));
  color: var(--accent);
  transform: translateY(-2px);
}

/* ===================================
   HEADER HOME - ESTILOS ESPECÍFICOS
   =================================== */
.site-header--home .brand-controls .logo img {
  height: var(--logo-size);
}

.site-header--home .main-nav a {
  padding: 0.6rem 0.85rem;
}

/* Botón hamburguesa */
.menu-toggle,
.site-header--home .menu-toggle {
  background: #ffffff;
  border: 1px solid rgba(11, 121, 208, 0.08);
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  padding: 0;
  cursor: pointer;
  transition: all 300ms ease;
}

.menu-toggle:hover {
  background: #f0f7ff;
}

.menu-toggle .hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  position: relative;
}

.menu-toggle .hamburger::before,
.menu-toggle .hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.menu-toggle .hamburger::before {
  top: -7px;
}

.menu-toggle .hamburger::after {
  top: 7px;
}

/* ===================================
   HEADER SEARCH
   =================================== */
.site-header--home .header-search {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.site-header--home .search-box {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 0.18rem;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.site-header--home .search-box input {
  border: none;
  padding: 0.6rem 0.8rem;
  min-width: 300px;
  font-size: 0.96rem;
  outline: none;
}

.site-header--home .search-box input::placeholder {
  color: #94a3b8;
}

.site-header--home .search-btn {
  background: transparent;
  border: none;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  color: var(--accent);
  font-size: 1.05rem;
}

/* ===================================
   MODAL DE CATEGORÍAS
   =================================== */
.categories-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 200;
  align-items: flex-start;
  justify-content: flex-start;
}

.categories-modal.active {
  display: flex;
}

.categories-modal-content {
  background: white;
  width: 100%;
  max-width: 400px;
  height: 100%;
  overflow-y: auto;
  padding: 2rem 1.5rem;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  animation: slideIn 300ms ease;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-primary);
}

.categories-modal h2 {
  margin: 0 0 1.5rem 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.categories-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-menu-item {
  border-bottom: 1px solid var(--border-light);
}

.category-toggle {
  width: 100%;
  padding: 1rem;
  background: none;
  border: none;
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 300ms ease;
  font-size: 1rem;
}

.category-toggle:hover,
.category-toggle.active {
  background: var(--bg);
  color: var(--accent);
}

.subcategories-list {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border-radius: 6px;
  margin: 0.5rem 0;
}

.subcategories-list.active {
  display: flex;
}

.subcategories-list a {
  padding: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: all 300ms ease;
}

.subcategories-list a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  padding-left: 1rem;
}

/* ===================================
   BOTONES
   =================================== */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 300ms ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn.small {
  padding: 0.45rem 0.6rem;
  font-size: 0.9rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  background: var(--danger);
}

.btn-large:hover {
  background: var(--danger-dark);
}

/* ===================================
   FEATURES SECTION
   =================================== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem 0;
}

.feature-card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 300ms ease;
}

.feature-card h3 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-2xl);
}

/* ===================================
   PRODUCTOS
   =================================== */
.products-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  position: sticky;
  top: 60px;
  background: var(--bg);
  z-index: 40;
  border-bottom: 2px solid var(--border-light);
  box-shadow: var(--shadow-lg);
}

.search-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1;
}

input[type=search],
input[type=text] {
  flex: 1;
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  outline: none;
  transition: border-color 300ms ease;
}

input[type=search]:focus,
input[type=text]:focus {
  border-color: var(--accent);
}

select {
  padding: 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  outline: none;
  transition: border-color 300ms ease;
  background: white;
}

select:focus {
  border-color: var(--accent);
}

.product-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
  padding: 1rem 0 !important;
  width: 100% !important;
}

.product-card {
  background: var(--card);
  padding: 1rem;
  border-radius: 10px;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem;
  animation: fadeIn 320ms ease both;
  transition: all 300ms ease;
  border: 1px solid var(--border-lighter);
  overflow: hidden;
}

.product-card:hover {
  box-shadow: var(--shadow-2xl);
  transform: translateY(-6px);
  border-color: var(--accent);
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 300ms ease;
}

.product-card:hover img {
  transform: scale(1.08);
}

.product-card > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.category-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

/* Badges */
.cat-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.subcat-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: rgba(11, 121, 208, 0.1);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
}

.badge.in {
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
}

.badge.out {
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

/* ===================================
   SECCIÓN DE MARCAS (CARRUSEL)
   =================================== */
.brands-section {
  background: linear-gradient(135deg, #f7f8fb 0%, #ffffff 100%);
  padding: 3rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.brands-section h2 {
  text-align: center;
  margin: 0 0 2rem 0;
  font-size: 1.8rem;
  color: var(--text-primary);
}

.carousel-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0 1rem;
}

.brands-carousel {
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.brands-carousel::-webkit-scrollbar {
  display: none;
}

.carousel-track {
  display: flex;
  gap: 2rem;
  padding: 0 0.5rem;
  width: fit-content;
}

.brand-item {
  flex: 0 0 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  padding: 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: all 300ms ease;
  cursor: pointer;
}

.brand-item img {
  max-width: 100%;
  max-height: 80px;
  object-fit: contain;
  filter: grayscale(70%);
  transition: filter 300ms ease;
}

.brand-item:hover {
  box-shadow: var(--shadow-xl);
  transform: scale(1.05);
}

.brand-item:hover img {
  filter: grayscale(0%);
}

/* ===================================
   SECCIÓN DE CATEGORÍAS (CARRUSEL)
   =================================== */
.categories-section {
  background: #fafbff;
  padding: 3rem 0;
  margin: 2rem 0;
  border-radius: 10px;
}

.categories-section h2 {
  text-align: center;
  margin: 0 0 2rem 0;
  font-size: 1.8rem;
  color: var(--text-primary);
}

.categories-carousel {
  width: 100%;
  max-width: 900px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.categories-carousel::-webkit-scrollbar {
  display: none;
}

.categories-track {
  display: flex;
  gap: 1.5rem;
  padding: 0 0.5rem;
  width: fit-content;
}

.category-card {
  flex: 0 0 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  transition: all 300ms ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-primary);
  border: 2px solid transparent;
}

.category-card .icon {
  font-size: 2.5rem;
  line-height: 1;
}

.category-card p {
  margin: 0;
  font-weight: 600;
  text-align: center;
  font-size: 0.95rem;
}

.category-card:hover {
  box-shadow: 0 12px 30px rgba(12, 18, 30, 0.15);
  transform: translateY(-8px);
  border-color: var(--accent);
  background: linear-gradient(135deg, #f0f7ff, #ffffff);
}

/* Botones de carrusel */
.carousel-btn {
  background: var(--accent);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 300ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.carousel-btn:hover {
  background: var(--accent-dark);
  transform: scale(1.1);
}

/* ===================================
   HERO CARRUSEL (BANNER PRINCIPAL)
   =================================== */
.hero-carousel-wrapper {
  position: relative;
  overflow: hidden;
}

.hero-carousel {
  display: flex;
  width: 100%;
  height: 420px;
  position: relative;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem;
  color: #fff;
}

.slide-content {
  max-width: 600px;
}

.slide-content h2 {
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
}

.slide-content p {
  margin: 0.25rem 0;
  color: rgba(255,255,255,0.95);
}

.hero-carousel .btn {
  margin-top: 1rem;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  color: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
}

.carousel-nav-prev { left: 12px; }
.carousel-nav-next { right: 12px; }

.carousel-indicators {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicators .indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
}

.carousel-indicators .indicator.active {
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ======= Responsiveness ======= */
@media (max-width: 900px) {
  .hero-carousel { height: 360px; }
  .slide-content { max-width: 480px; padding-right: 1rem; }
  .slide-content h2 { font-size: 1.8rem; }
}

@media (max-width: 600px) {
  .hero-carousel { height: 260px; }
  .slide-content { max-width: 100%; padding: 1rem; text-align: left; }
  .slide-content h2 { font-size: 1.2rem; }
  .slide-content p { display: none; }
  .carousel-nav { width: 36px; height: 36px; }
  .carousel-nav-prev { left: 8px; }
  .carousel-nav-next { right: 8px; }
  .carousel-indicators { bottom: 8px; gap: 6px; }
}

/* Ajustes del buscador en móviles para evitar desbordes */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-search { margin-left: auto; }
  .site-header--home .search-box input { min-width: 0; width: 160px; }
}

@media (max-width: 600px) {
  .site-header--home .search-box {
    position: static !important;
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 120px;
  }

  .site-header--home .search-box input {
    display: none;
    width: 0;
    padding: 0;
    border: none;
    background: transparent;
  }

  /* Mostrar solo el icono de búsqueda en el header móvil */
  .site-header--home .search-btn.search-icon {
    display: inline-flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
  }

  /* Si se necesita mostrar la caja de búsqueda, expandirla por encima del contenido */
  .search-box.expanded input {
    display: block;
    position: absolute;
    right: 12px;
    top: 60px;
    width: calc(100% - 24px);
    max-width: 420px;
    background: #fff;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    box-shadow: 0 12px 30px rgba(12,18,30,0.12);
    z-index: 1200;
  }
}

/* ===================================
   FOOTER
   =================================== */
.site-footer {
  background: linear-gradient(135deg, #0b79d0 0%, #054a99 100%);
  color: white;
  padding: 1.5rem 0 0 0;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 0.8fr 1.5fr 1.1fr 1.2fr 1.1fr;
  gap: 1.5rem;
  margin-bottom: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 8px 8px 0 0;
}

.footer-column h3,
.footer-column h4 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: #fff;
}

.footer-column {
  color: #fff;
}

.footer-column p {
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #fff;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 300ms ease;
}

.footer-column ul li a:hover {
  color: white;
}

/* Footer brand - centrado */
.footer-brand-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
}

.footer-logo-large {
  height: 160px;
  width: auto;
  border-radius: 6px;
  margin-bottom: 8px;
}

.brand-underline {
  width: 120px;
  height: 3px;
  background: #e53935;
  border: none;
  margin: 6px 0;
  border-radius: 2px;
}

.follow-text {
  color: #fff;
  font-weight: 700;
  margin: 6px 0 10px 0;
}

.footer-socials {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
}

.footer-socials a {
  display: inline-block;
  transition: transform 300ms ease;
}

.footer-socials a:hover {
  transform: scale(1.1);
}

.footer-socials img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Métodos de pago */
.payment-methods {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.payment-methods img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: contain;
  background: white;
  padding: 2px;
}

.payment-methods--small img {
  width: 28px;
  height: 28px;
  padding: 1px;
}

.footer-bottom {
  background: #ffffff;
  padding: 1rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* ===================================
   WHATSAPP FAB
   =================================== */
.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #25D366;
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.18);
  font-weight: 700;
  transition: all 300ms ease;
  z-index: 99;
}

.whatsapp-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 16px 40px rgba(37, 211, 102, 0.28);
}

/* ===================================
   ANIMACIONES
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* ===================================
   MEDIA QUERIES - RESPONSIVE
   =================================== */

/* Tablets y pantallas medianas */
@media (max-width: 900px) {
  .site-header--home .search-box input {
    min-width: 200px;
  }
  
  .site-header--home .brand-controls .logo img {
    height: 64px;
  }
  
  .site-header--home .menu-toggle,
  .menu-toggle {
    width: 44px;
    height: 44px;
  }
  
  /* Grid de productos */
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-logo-large {
    height: 80px;
  }
}

/* Móviles */
@media (max-width: 600px) {
  /* Header */
  .site-header--home .search-box input {
    display: none;
  }
  
  .site-header--home .search-box {
    padding: 0.12rem;
  }
  
  .logo img {
    height: 60px !important;
  }
  
  .main-nav {
    gap: 0.3rem;
  }
  
  .main-nav a {
    font-size: 0.85rem;
    padding: 0.4rem 0.5rem;
  }
  
  /* Grid de productos */
  .product-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  
  /* Productos hero */
  .products-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
  }
  
  .products-hero h2 {
    font-size: 1.5rem;
  }
  
  .filter-row {
    width: 100%;
    flex-direction: column !important;
    gap: 0.5rem !important;
  }
  
  .filter-row select,
  .filter-row label,
  .filter-row button {
    width: 100%;
  }
  
  .search-row {
    width: 100%;
    flex-direction: column;
  }
  
  /* Hero section */
  .hero h2 {
    font-size: 1.75rem !important;
  }
  
  .hero p {
    font-size: 0.95rem !important;
  }
  
  /* Features */
  .features {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Categorías section */
  .categories-section h2,
  .brands-section h2 {
    font-size: 1.5rem;
  }
  
  .category-card,
  .brand-item {
    flex: 0 0 120px;
  }
  
  .carousel-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
  
  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-logo-large {
    height: 100px;
  }
  
  .footer-column h3,
  .footer-column h4 {
    font-size: 1rem;
  }
  
  /* WhatsApp FAB */
  .whatsapp-fab {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
    right: 15px;
    bottom: 15px;
  }
  
  /* Container padding */
  .container {
    padding: 0.75rem;
  }
}

/* Móviles muy pequeños */
@media (max-width: 375px) {
  .logo img {
    height: 50px !important;
  }
  
  .main-nav a {
    font-size: 0.75rem;
    padding: 0.3rem 0.4rem;
  }
  
  .menu-toggle {
    width: 40px !important;
    height: 40px !important;
  }
  
  .hero h2 {
    font-size: 1.5rem !important;
  }
  
  .category-card,
  .brand-item {
    flex: 0 0 100px;
  }
}

/* ===================================
   PRODUCTOS DESTACADOS EN INDEX
   =================================== */
.featured-products {
  padding: 3rem 0;
  background: #fff;
}

.featured-products--alt {
  background: #f9fafb;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.section-title .icon {
  font-size: 2.5rem;
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  margin: 0 0 2rem 0;
  font-size: 1.1rem;
}

.products-carousel-wrapper {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.products-carousel {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.products-carousel::-webkit-scrollbar {
  height: 8px;
}

.products-carousel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.products-carousel::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.products-track {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem;
  width: fit-content;
}

.featured-product-card {
  flex: 0 0 280px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(12, 18, 30, 0.08);
  overflow: hidden;
  transition: all 300ms ease;
  position: relative;
}

.featured-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(12, 18, 30, 0.15);
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 2;
}

.featured-product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #f0f2f5;
}

.product-info {
  padding: 1rem;
}

.product-info .brand {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.product-info h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.4;
  min-height: 2.8em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-info .sku {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 0.75rem 0;
}

.product-info .price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}

.product-info .old-price {
  font-size: 1rem;
  color: var(--muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 0.5rem;
}

.product-info .installments {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.btn-add {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 300ms ease;
  font-size: 0.9rem;
}

.btn-add:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 121, 208, 0.3);
}

.btn-view-more {
  display: inline-block;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  transition: all 300ms ease;
  text-align: center;
  display: block;
  max-width: 200px;
  margin: 0 auto;
}

.btn-view-more:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 121, 208, 0.3);
}

/* Responsive para productos destacados */
@media (max-width: 900px) {
  .featured-product-card {
    flex: 0 0 240px;
  }
  
  .section-title {
    font-size: 1.5rem;
  }
  
  .section-title .icon {
    font-size: 2rem;
  }
}

@media (max-width: 600px) {
  .featured-product-card {
    flex: 0 0 220px;
  }
  
  .section-title {
    font-size: 1.3rem;
    flex-direction: column;
  }
  
  .section-subtitle {
    font-size: 0.95rem;
  }
  
  .products-carousel-wrapper {
    flex-direction: column;
  }
  
  .carousel-btn {
    display: none;
  }
}

/* ===================================
   CHATBOT IA
   =================================== */
.chatbot-container {
  position: fixed;
  right: 20px;
  bottom: 90px;
  z-index: 98;
}

.chatbot-toggle {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.9rem 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 300ms ease;
  font-size: 0.95rem;
}

.chatbot-toggle:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
}

.chatbot-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

.chatbot-toggle .icon {
  font-size: 1.3rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.chatbot-window {
  position: fixed;
  right: 20px;
  bottom: 90px;
  width: 380px;
  height: 550px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99;
}

.chatbot-window.active {
  display: flex;
  animation: slideUp 300ms ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chatbot-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.chatbot-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

.chatbot-header p {
  margin: 0.3rem 0 0 0;
  font-size: 0.85rem;
  opacity: 0.9;
}

.chatbot-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 200ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chatbot-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 3px;
}

.message {
  max-width: 80%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  animation: fadeIn 300ms ease;
}

.user-message {
  align-self: flex-end;
  background: #667eea;
  color: white;
  margin-left: auto;
}

.bot-message {
  align-self: flex-start;
  background: white;
  color: #333;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.message p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.9rem;
  white-space: pre-line;
}

.message a {
  color: #667eea;
  font-weight: 600;
  text-decoration: underline;
}

.typing {
  opacity: 0.6;
  font-style: italic;
}

.quick-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.quick-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
  text-align: left;
}

.quick-btn:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.chatbot-input {
  display: flex;
  padding: 1rem;
  background: white;
  border-top: 1px solid #e5e7eb;
  gap: 0.5rem;
}

.chatbot-input input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 0.7rem;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 200ms ease;
}

.chatbot-input input:focus {
  border-color: #667eea;
}

.chatbot-input button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms ease;
}

.chatbot-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Estilos para productos sin precios */
.featured-product-card-simple {
  flex: 0 0 280px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(12, 18, 30, 0.08);
  overflow: hidden;
  transition: all 300ms ease;
}

.featured-product-card-simple:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(12, 18, 30, 0.15);
}

.featured-product-card-simple img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #f0f2f5;
}

.product-info-simple {
  padding: 1rem;
}

.product-info-simple .brand {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  text-transform: uppercase;
}

.product-info-simple h3 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  line-height: 1.4;
  min-height: 2.8em;
}

.product-info-simple .sku {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 0.75rem 0;
}

.product-info-simple .badge {
  display: inline-block;
  margin-bottom: 1rem;
}

.btn-consult {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 300ms ease;
  font-size: 0.9rem;
}

.btn-consult:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 121, 208, 0.3);
}

/* Responsive para chatbot */
@media (max-width: 600px) {
  .chatbot-container {
    right: 10px;
    bottom: 80px;
  }
  
  .chatbot-window {
    right: 10px;
    bottom: 80px;
    width: calc(100vw - 20px);
    height: 500px;
  }
  
  .chatbot-toggle {
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
  }
  
  .chatbot-toggle .text {
    display: none;
  }
}

/* Botón Ver más por sección */
.view-more-container {
  text-align: center;
  margin: 2rem 0;
}

.btn-view-more-section {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  padding: 0.8rem 2rem;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 300ms ease;
  font-size: 0.95rem;
}

.btn-view-more-section:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(11, 121, 208, 0.3);
}

/* ===================================
   MODAL DETALLE DE PRODUCTO
   =================================== */
.product-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 300ms ease;
}

.product-detail-content {
  background: white;
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  position: relative;
  animation: slideUp 300ms ease;
}

.close-detail {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--muted);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 200ms ease;
}

.close-detail:hover {
  background: var(--border-lighter);
  color: var(--accent);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .product-detail-content {
    padding: 1.5rem;
  }
  
  .product-detail-content > div {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
}

/* ================================================
   FIX NAVEGACIÓN MÓVIL - CORREGIDO
   ================================================ */

/* REMOVER el código que oculta la navegación */
@media (max-width: 900px) {
  /* Navegación visible en móvil */
  .main-nav {
    display: flex !important;
    position: static !important; /* NO fixed */
    width: auto !important;
    background: transparent !important;
    justify-content: center !important;
    gap: 1rem !important;
    padding: 0 !important;
    box-shadow: none !important;
    font-size: 0.9rem !important;
  }
  
  .main-nav a {
    padding: 0.5rem !important;
  }
}

/* Header STICKY (se queda fijo arriba) */
.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: white !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Carrusel NO se sale */
.categories-carousel,
.carousel-track,
.brands-carousel {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch !important;
}

.carousel-wrapper,
.categories-section {
  max-width: 100vw !important;
  overflow: hidden !important;
}

.category-card {
  flex-shrink: 0 !important;
}

/* Container sin overflow horizontal */
.container {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

/* Móvil específico */
@media (max-width: 600px) {
  .site-header .nav-row,
  .site-header .container {
    padding: 0.5rem 0.75rem !important;
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .logo img {
    max-height: 45px !important;
  }
  
  /* Navegación en segunda línea si no cabe */
  .main-nav {
    flex-basis: 100% !important;
    justify-content: center !important;
    margin-top: 0.5rem !important;
    font-size: 0.85rem !important;
  }
  
  .categories-carousel {
    display: flex !important;
    gap: 0.75rem !important;
  }
  
  .category-card {
    min-width: 90px !important;
    max-width: 90px !important;
  }
}

/* Z-index correcto */
.whatsapp-fab,
.chatbot-toggle {
  z-index: 90 !important;
}

.site-header {
  z-index: 100 !important;
}

.categories-modal {
  z-index: 1000 !important;
}

/* ================================================
   FIX FINAL - HEADER STICKY + BOTONES EN FILA
   ================================================ */

/* REMOVER cualquier flex-wrap que cause columna */
@media (max-width: 900px) {
  .site-header .container,
  .site-header .nav-row {
    flex-wrap: nowrap !important;
  }
  
  .main-nav {
    flex-basis: auto !important; /* NO 100% */
    flex-direction: row !important;
    margin-top: 0 !important;
  }
}

/* Header STICKY en todas las pantallas */
.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  background: white !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Layout correcto del header */
@media (max-width: 900px) {
  .site-header .nav-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem !important;
    padding: 0.75rem 1rem !important;
  }
  
  .brand-controls {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  
  .main-nav {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    gap: 1rem !important;
    order: 2 !important;
  }
  
  .header-search {
    order: 3 !important;
    width: 100% !important;
  }
}
