/* ═══════════════════════════════════════════
   RESPONSIVE — Mobile-first breakpoints
   ═══════════════════════════════════════════ */

/* Tablet (≥ 640px) */
@media (min-width: 640px) {
  .hero {
    height: 340px;
  }

  .hero-slide-title {
    font-size: 2.25rem;
  }

  .hero-slide-subtitle {
    font-size: 1.05rem;
  }

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

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

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

  .location-grid {
    grid-template-columns: 1fr 1fr;
  }

  .location-map {
    height: 100%;
    min-height: 250px;
  }
}

/* Modal: centrado en tablet+ (≥ 640px) */
@media (min-width: 640px) {
  /* El overlay ya es flex — solo cambiamos la alineación vertical */
  .extra-overlay {
    align-items: center;
    justify-content: center;
  }

  .extra-modal {
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-2xl);
    max-height: 90vh;
    transform: none; /* cancela el translateY(100%) del base */
  }

  .extra-modal-handle {
    display: none;
  }
}

/* Desktop (≥ 1024px) */
@media (min-width: 1024px) {
  :root {
    --header-height: 72px;
  }

  .hero {
    height: 400px;
  }

  .hero-slide-overlay {
    padding: var(--space-3xl) var(--space-2xl);
  }

  .hero-slide-title {
    font-size: 2.75rem;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  .product-card-img-wrap {
    height: 200px;
  }

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

  .category-btn {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
  }

  .location-grid {
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-xl);
  }

  .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .footer-copy {
    margin-top: 0;
  }
}

/* Large Desktop (≥ 1280px) */
@media (min-width: 1280px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Small phone (≤ 374px) */
@media (max-width: 374px) {
  .hero {
    height: 220px;
  }

  .hero-slide-title {
    font-size: 1.4rem;
  }

  .category-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

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

  .floating-cart-btn {
    width: 52px;
    height: 52px;
  }

  .cart-drawer {
    max-width: 100%;
  }
}

/* Safe area for notched phones */
@supports (padding: env(safe-area-inset-bottom)) {
  .floating-cart {
    bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
  }

  .cart-footer {
    padding-bottom: calc(var(--space-md) + env(safe-area-inset-bottom));
  }

  .extra-modal {
    padding-bottom: env(safe-area-inset-bottom);
  }
}
