/* Loaded last: preserve the product layout at every viewport width. */
.product-layout { width: 100%; }
.product-layout > *, .gallery > *, .product-details > *, .catalogue-card { min-width: 0; }
.product-details h1,.product-meta,.image-story,.card-copy { overflow-wrap: anywhere; }
.product-colours .colour-options__list { flex-wrap: wrap; }
.product-actions-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-actions-row .add-to-bag { white-space: normal; overflow-wrap: anywhere; }
.delivery-note { flex-wrap: wrap; text-align: center; }
.mobile-menu:not(.open) { visibility: hidden; }
.header .mega-menu { max-width: 100vw; overflow-x: auto; }
.header .mega-content { max-width: 100%; }
.gt-modal { max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
.gt-table { width: 100%; }
.sticky-buy { gap: 12px; }
.sticky-buy > span { min-width: 0; }
.sticky-buy button { flex-shrink: 0; }
.toast:not(.is-visible) { visibility: hidden; }
.main-image figcaption { max-width: calc(100% - 100px); overflow-wrap: anywhere; }
@media (max-width: 1000px) {
    .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; padding-inline: 24px; }
    .product-actions-row { grid-template-columns: minmax(0, 1fr); }
    footer.home-footer .footer-top { flex-wrap: wrap; }
}
@media (max-width: 850px) {
    .product-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 24px 48px; }
    .product-details { position: static; width: 100%; max-width: none; }
    .product-actions-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
    .outfit-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 768px) {
    .announcement { margin-top: 80px; }
    .product-layout { margin-top: 0; }
    .gt-measure-cards { grid-template-columns: minmax(0, 1fr); }
    .gt-table th,.gt-table td { padding: 8px 4px; font-size: 11px; }
}
@media (max-width: 580px) {
    .product-layout { padding: 20px 16px 36px; }
    .gallery { gap: 12px; }
    .main-image { aspect-ratio: auto; margin: 0; }
    .gallery-photo img,.main-image > img { max-width: 100%; height: auto; }
    .image-story { padding: 24px 18px; }
    .image-story li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .fabric-specs { grid-template-columns: minmax(0, 1fr); }
    .product-actions-row { grid-template-columns: minmax(0, 1fr); }
    .fit-row { gap: 12px; flex-wrap: wrap; }
    .configuration-list > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
    .configuration-list dd { margin: 0; }
    .related-products { padding: 36px 16px; }
    .related-products .card-image .style { max-width: calc(100% - 12px); right: 6px; top: 6px; line-height: 1.3; }
    .outfits { grid-template-columns: minmax(0, 1fr); }
    .sticky-buy { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
    body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
    footer.home-footer .footer-links { flex-wrap: wrap; min-width: 0; }
    .gt-modal { padding: 16px; }
}

/* Mobile product gallery: one large view and a scrollable thumbnail strip. */
.product-mobile-thumbnails { display: none; }
@media (max-width: 850px) {
  .product-mobile-gallery .main-image { aspect-ratio: 1 / 1.05; background: #f0f1f3; }
  .product-mobile-gallery .main-image > img { width: 100%; height: 100%; object-fit: contain; }
  .product-mobile-gallery .main-image figcaption,
  .product-mobile-gallery .main-image > .style { display: none; }
  .product-mobile-thumbnails { display: flex; gap: 8px; overflow-x: auto; padding: 2px 1px 8px; scrollbar-width: thin; scroll-snap-type: x proximity; }
  .product-mobile-thumbnails .thumbnail { flex: 0 0 64px; width: 64px; height: 72px; padding: 2px; border: 1px solid transparent; border-radius: 9px; background: #f0f1f3; overflow: hidden; scroll-snap-align: start; }
  .product-mobile-thumbnails .thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
  .product-mobile-thumbnails .thumbnail.is-active { border: 2px solid #222; padding: 1px; }
  .product-mobile-thumbnails .thumbnail:focus-visible { outline: 2px solid #222; outline-offset: 2px; }
  .product-mobile-gallery > .gallery-photo,
  .product-mobile-gallery > .gallery-views { display: none; }
}
