/* ============================================================
   RESPONSIVE Y MOBILE FIRST — Mayorista a tu Casa
   Una iniciativa de AdminYAAA
   ============================================================ */

/* Navegación y elementos solo móviles */
.nav-mobile-toggle {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* PANTALLAS GRANDES Y MEDIANAS (hasta 1400px) */
@media (max-width: 1400px) {
  .nav-link--secondary {
    display: none;
  }
}

/* LAPTOPS Y PANTALLAS COMPACTAS (hasta 1240px) */
@media (max-width: 1240px) {
  .nav-desktop-shortcuts {
    display: none;
  }

  .nav-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--touch-target);
    height: var(--touch-target);
    color: var(--color-primary-800);
  }

  .brand-tagline {
    display: none;
  }
}

/* TABLET Y PANTALLAS MEDIANAS (hasta 1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-visual-card {
    max-width: 480px;
    margin: 0 auto;
  }

  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* SMARTPHONES Y DISPOSITIVOS MÓVILES (hasta 768px) */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
    --topbar-height: 32px;
  }

  .topbar-messages span:not(.topbar-badge):not(:first-child) {
    display: none;
  }

  .topbar-links {
    display: none;
  }

  .brand-logo-img {
    height: 38px;
  }

  .brand-name {
    font-size: 1.0625rem;
  }

  .brand-tagline {
    font-size: 0.65rem;
  }

  .header-search {
    display: none; /* Se abre vía drawer o modal de búsqueda */
  }

  .brand-texts {
    display: none; /* El logo img/logo.png ya contiene el texto y nombre */
  }

  .action-btn--cart span:not(.action-badge) {
    display: none;
  }

  .action-btn--cart {
    padding: 0;
    width: var(--touch-target);
    height: var(--touch-target);
    min-width: var(--touch-target);
  }

  .action-btn--fav {
    display: none; /* Accesible desde la barra inferior */
  }

  .action-btn--account {
    display: none; /* Accesible desde el menú móvil */
  }

  /* Mega Menú adaptativo en Móviles */
  .mega-menu-dropdown {
    left: 0.5rem;
    width: calc(100vw - 1rem);
    top: calc(100% + 2px);
  }

  .mega-menu-inner {
    flex-direction: column;
    min-height: auto;
    max-height: calc(100vh - var(--header-height) - 40px);
  }

  .mega-menu-sidebar {
    width: 100%;
    max-height: 170px;
    border-right: none;
    border-bottom: 1px solid #E2E8F0;
  }

  .mega-menu-arrow {
    display: none;
  }

  .btn-mega-categories {
    padding: 0.5rem 0.75rem;
    font-size: 0.76rem;
  }

  .hero {
    padding: 2.5rem 0 3rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  /* Catálogo en móvil: 2 columnas limpias */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
  }

  .product-card-top {
    min-height: 140px;
    padding: 0.75rem 0.5rem 0.25rem;
  }

  .product-card-img {
    width: 100px;
    height: 100px;
  }

  .product-card-body {
    padding: 0.75rem 0.875rem 1rem;
  }

  .product-card-title {
    font-size: 0.875rem;
    height: 2.4rem;
    margin-bottom: 0.5rem;
  }

  .product-card-price {
    font-size: 1.15rem;
  }

  .product-card-qv-btn {
    display: none; /* En mobile se toca la tarjeta directo */
  }

  /* Combos en móvil */
  .combos-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Barra de Navegación Inferior Móvil Fija */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #FFFFFF;
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 10px rgba(15, 23, 42, 0.08);
    z-index: 950;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    color: var(--color-text-subtle);
    font-size: 0.6875rem;
    font-weight: 600;
    gap: 0.2rem;
    position: relative;
    text-decoration: none;
    transition: color var(--transition-fast);
  }

  .mobile-nav-item.is-active,
  .mobile-nav-item:hover {
    color: var(--color-accent-600);
  }

  .mobile-nav-badge {
    position: absolute;
    top: 6px;
    right: 25%;
    background: var(--color-accent-500);
    color: #FFFFFF;
    font-size: 0.625rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
  }

  /* Ajustar botón flotante de WhatsApp en móvil para no tapar la barra inferior */
  .wa-float {
    bottom: 4.75rem;
    right: 1rem;
    padding: 0.625rem 1rem 0.625rem 0.75rem;
    font-size: 0.8125rem;
  }

  /* Añadir padding al final del body para que la barra móvil no tape el footer */
  body {
    padding-bottom: 60px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .shipping-zones-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .coupons-strip {
    grid-template-columns: 1fr;
  }

  .multi-search-box {
    padding: 1rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .shipping-zones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

