/* Phone-only recommendation carousel: two cards and a glimpse of the next. */
@media (max-width: 760px) {
  .product-recommendations .product-recommendations-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 44%;
    gap: 0.75rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 0;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: var(--clay) transparent;
  }

  .product-recommendations-grid > .product-card {
    min-width: 0;
    min-height: 0;
    height: auto;
    scroll-snap-align: start;
  }

  .product-recommendations-grid .product-visual {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 4;
  }

  .product-recommendations-grid .product-info {
    min-width: 0;
    height: auto;
    padding: 0.75rem;
    gap: 0.4rem;
  }

  .product-recommendations-grid .product-kicker {
    margin-bottom: 0;
    font-size: 0.65rem;
    letter-spacing: 0.06em;
  }

  .product-recommendations-grid h3 {
    font-size: clamp(0.95rem, 3.6vw, 1.2rem);
    overflow-wrap: break-word;
  }

  .product-recommendations-grid .product-info > p:not(.product-kicker) {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 0;
    margin-top: 0;
    font-size: 0.8rem;
  }

  .product-recommendations-grid .product-meta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    font-size: 0.85rem;
  }

  .product-recommendations-grid .mini-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    width: 100%;
    padding: 0.5rem;
    font-size: 0.8rem;
    text-align: center;
  }
}

/* Desktop: scroll all five suggestions using the existing three-card widths. */
@media (min-width: 761px) {
  .product-recommendations .product-recommendations-grid {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2rem) / 3);
    gap: 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: 1rem;
    scrollbar-color: var(--clay) transparent;
  }

  .product-recommendations-grid > .product-card {
    min-width: 0;
    scroll-snap-align: start;
  }

  .product-recommendations-grid:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 4px;
  }
}

/* Keep the existing two-card widths on smaller computer/tablet screens. */
@media (min-width: 761px) and (max-width: 1050px) {
  .product-recommendations .product-recommendations-grid {
    grid-auto-columns: calc((100% - 1rem) / 2);
  }
}
