@media (max-width: 64rem) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .categories-panel {
    display: none;
  }

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

@media (max-width: 48rem) {
  :root {
    --container-padding: 1rem;
    --grid-gap: 1rem;
  }

  .modal__close {
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
  }

  .site-header {
    position: sticky;
    grid-template-columns: 1fr auto 1fr;
  }

  .menu-toggle {
    justify-self: start;
  }

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

  .product-card__image {
    aspect-ratio: 4 / 5;
  }

  .catalog__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .mobile-menu .menu-list button {
    font-size: var(--font-size-lg);
  }

  .product-detail {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .site-footer {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .modal__dialog {
    padding: 0;
    max-height: 100%;
    height: 100%;
    overflow: hidden;
  }

  .modal {
    padding: 0;
  }

  .product-detail__info {
    align-items: center;
    padding: 0 var(--space-md) var(--space-md) var(--space-md);
  }

  .modal__content {
    gap: var(--space-md);
    padding: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    justify-content: stretch;
    justify-items: stretch;
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery__main {
    flex: 1 1 auto;
    max-height: 100%;
    width: 100%;
    max-width: none;
  }

  .product-detail__name {
    font-size: var(--font-size-xl);
  }

  .product-detail__description {
    max-height: 30vh;
  }

  .action-button {
    font-size: var(--font-size-2xs);
    height: 3.25rem;
  }

  .product-detail__actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (min-width: 64.0625rem) {
  :root {
    --font-size-logo: 1.75rem;
    --font-size-card-brand: 1.375rem;
    --font-size-card-name: 1.25rem;
    --font-size-card-price: 0.9375rem;
    --font-size-detail-body: 1.0625rem;
  }

  .product-card__brand {
    font-weight: 600;
  }

  .product-card__name {
    font-weight: 400;
  }

  .product-card__price {
    font-weight: 400;
  }

  .menu-toggle {
    display: none;
  }

  .site-header {
    grid-template-columns: 1fr;
  }

  .logo {
    justify-self: center;
  }
}

@media (min-width: 120rem) {
  html {
    font-size: 1.0625rem;
  }
}

@media (min-width: 160rem) {
  html {
    font-size: 1.125rem;
  }
}

@media (min-width: 240rem) {
  html {
    font-size: 1.1875rem;
  }
}
