@media (max-width: 1023px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-image {
    justify-self: start;
    max-width: 520px;
    aspect-ratio: 2 / 4;
  }

  h1 {
    font-size: 40px;
  }

  .cart-layout,
  .checkout-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 24px;
  }
}

@media (max-width: 767px) {
  .container {
    padding: 0 var(--spacing-md);
  }

  .logo-img {
    height: 40px;
  }

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

  .page-title {
    font-size: 36px;
    margin-bottom: 36px;
  }

  .hero,
  .page-hero {
    padding: 64px 16px;
    min-height: auto;
  }

  /* Hero featured image: prevent overly-tall image on phones */
  .hero-image {
    justify-self: center;
    max-width: 100%;
    width: 100%;
    aspect-ratio: 16 / 10;
    max-height: 360px;
  }

  /* Product detail modal: keep image reasonable and improve scroll area */
  .product-modal-overlay {
    padding: 16px;
    align-items: flex-start;
  }

  .product-modal {
    max-height: calc(100vh - 32px);
    overflow-y: auto;
  }

  .product-image-section {
    padding: 16px;
    min-height: auto;
  }

  .product-image-section img {
    height: auto;
    max-height: 260px;
  }

  .product-info-section {
    max-height: none;
    overflow: visible;
  }

  .trust-section,
  .featured-section,
  .stats-section {
    padding: 48px 16px;
  }

  .featured-header {
    margin-bottom: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}
