/* ============================================================
   RESPONSIVE.CSS
   Ajustes responsivos transversales que complementan los
   estilos definidos en cada hoja específica (catalog.css,
   product.css, cart.css, etc.) Se carga al final para
   sobrescribir reglas cuando sea necesario.
   ============================================================ */

/* ============================================================
   TABLET (≤ 1024px)
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --space-xl: 4.5rem;
    --space-lg: 3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ============================================================
   MÓVIL GRANDE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --space-xl: 3.5rem;
    --space-lg: 2.5rem;
    --navbar-height: 64px;
  }

  .container {
    padding: 0 var(--space-sm);
  }

  .section {
    padding: var(--space-lg) 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--space-sm);
  }

  .catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: none;
  }

  .filter-tabs {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.4rem;
  }
}

/* ============================================================
   MÓVIL PEQUEÑO (≤ 480px)
   ============================================================ */
@media (max-width: 480px) {
  .product-card-name {
    font-size: 1.15rem;
  }

  .product-card-actions {
    flex-direction: column;
  }

  .product-card-actions .btn-icon-only {
    width: 100%;
    height: 40px;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: var(--space-sm);
    right: var(--space-sm);
  }

  .toast {
    width: calc(100% - 2rem);
    text-align: center;
    justify-content: center;
  }
}
