/* Keep a complete product photo comfortably within the visible screen. */
:root { --product-photo-limit: min(320px, 52vh); }
@supports (height: 1svh) {
  :root { --product-photo-limit: min(320px, 52svh); }
}

.collection-page .home-collection-intro {
  width: min(100%, 620px);
  margin: 1.25rem auto 1.5rem;
  padding: 1rem 1.4rem;
  border: 2px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(115deg, #e1f0eb, #e9dff1 38%, #fbefe2 68%, #d8eeef) padding-box,
    linear-gradient(125deg, #a9e8de, #c8afe5, #f6c5dc, #fff0c9, #b5e7ec) border-box;
  color: #234f5c;
}
.collection-page .home-collection-intro h1 {
  margin: 0 0 .35rem;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .025em;
  color: #234f5c;
}
.collection-page .home-collection-intro > p {
  max-width: 52ch;
  margin: 0 auto;
  font-family: "Trebuchet MS", "Avenir Next", sans-serif;
  font-size: .9rem;
  line-height: 1.4;
  color: #355b65;
}

.product-list,
.home-inventory { width: min(100%, 760px); margin: 1.5rem auto 2.5rem; }
.home-inventory { gap: 2.5rem; }
.product-list .inventory-product:not(.electronics-card),
.home-inventory .inventory-product {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
  scroll-margin-top: 5.5rem;
}
.inventory-product .product-gallery,
.inventory-product .product-photos {
  width: min(100%, var(--product-photo-limit));
  margin-inline: auto;
}
.inventory-product .product-photos { border-radius: 10px; }
.inventory-product .product-photo {
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
}
.inventory-product .product-photos img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: var(--product-photo-limit);
  object-fit: contain;
}
.inventory-product .product-details { padding: 1rem 1.1rem; border-radius: 12px; }
.inventory-product .product-details h2 {
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 400;
}
.inventory-product .product-details p { margin: 0 0 .6rem; font-size: .9rem; line-height: 1.5; }
.inventory-product .product-details .product-meta {
  display: block; color: #49636b; font-size: .75rem; font-weight: 400;
}
.inventory-product .product-details .product-price { margin: .5rem 0; font-size: 1.5rem; line-height: 1.2; }
.inventory-product .product-cart-actions { margin: .75rem 0; }
.inventory-product .product-cart-actions .cart-add-button { min-height: 44px; padding: .6rem 1rem; font-size: .9rem; }
.inventory-product .product-details .product-note { margin: .6rem 0 0; font-size: .8rem; }
.inventory-product .product-specs { margin-top: .75rem; }
.inventory-product .product-specs summary { padding: .7rem 0; font-size: .9rem; }
.inventory-product .product-specs dl > div { padding: .45rem 0; font-size: .85rem; }
.inventory-product .gallery-dots { margin: 0; }

.new-arrivals { max-width: 660px; margin: 2.25rem auto 3rem; }
.new-arrivals-grid { gap: 1.25rem; }
.arrival-card .arrival-photo { width: min(100%, var(--product-photo-limit)); margin-inline: auto; }
.arrival-card h3 { margin: .75rem 0 .35rem; font-size: 1.1rem; line-height: 1.35; }
.arrival-card p { margin: .35rem 0; font-size: .85rem; line-height: 1.5; }
.arrival-card .arrival-price { font-size: 1.1rem; }
.arrival-card .product-cart-actions { margin: .6rem 0; }
.arrival-card .cart-add-button { min-height: 44px; padding: .6rem 1rem; font-size: .9rem; }

.electronics-card { max-width: 340px; margin-inline: auto; }
.electronics-card .opal-frame { width: min(100%, var(--product-photo-limit)); margin-inline: auto; }
.electronics-card h2 { font-size: 1.2rem; }
.ps5-layout { width: min(100%, 800px); grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 1.5rem; }
.ps5-layout .ps5-photo { width: min(100%, var(--product-photo-limit)); margin-inline: auto; }
.ps5-layout .ps5-photo img { height: var(--product-photo-limit); max-height: var(--product-photo-limit); object-fit: contain; }
.ps5-layout .ps5-copy h1 { font-size: 1.5rem; line-height: 1.3; }
.ps5-layout .ps5-copy p,
.ps5-layout .ps5-copy li { font-size: .9rem; line-height: 1.5; }
.ps5-layout .ps5-copy .ps5-price { font-size: 1.5rem; margin-bottom: .75rem; }
.ps5-layout .compact-details { margin-top: 1rem; border-top: 1px solid #ffffff33; }
.ps5-layout .compact-details > summary { min-height: 44px; padding: .75rem 0; font-size: .95rem; cursor: pointer; }
.ps5-layout .product-shipping { margin: 1rem 0; padding: .25rem 1rem; }
.ps5-layout .compact-details summary:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media (max-width: 660px) {
  .product-list .inventory-product:not(.electronics-card),
  .home-inventory .inventory-product,
  .ps5-layout { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .product-list, .home-inventory, .ps5-layout { max-width: 380px; }
  .new-arrivals { max-width: 380px; }
  .new-arrivals-grid { grid-template-columns: minmax(0, 1fr); }
  .home-inventory .product-gallery { width: min(100%, 280px, var(--product-photo-limit)); }
  .collection-page .home-collection-intro { padding: .85rem 1rem; margin-block: 1rem; }
}
