/* Product page: gallery, buy box, spec sheet, made for band, related row, sticky add bar. */

.product { padding-top: 12px; padding-bottom: var(--section-y); }
.product__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.product__crumbs { min-width: 0; }
.product__crumbs ol { flex-wrap: nowrap; overflow: hidden; }
.product__crumbs li { white-space: nowrap; }
.product__crumbs li:last-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.product__media { margin-inline: calc(-1 * var(--gutter)); }
.product__details { margin-top: var(--sp-7); }

/* Gallery */
.gallery { position: relative; }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__track:focus-visible { outline-offset: -3px; }
.gallery__slide { position: relative; flex: 0 0 100%; aspect-ratio: 1; background: var(--salt); scroll-snap-align: start; overflow: hidden; }
.gallery .pack { padding: 6%; }
.gallery .pack--rod-gallery { padding: 3%; }
.gallery .pack--photo { padding: 0; }
.gallery .pack--photo img { object-fit: cover; }
.gallery__counter { position: absolute; right: var(--gutter); bottom: 12px; padding: 3px 8px; background: var(--white); border-radius: var(--r-sticker); font-size: var(--fs-micro); font-weight: 600; font-variant-numeric: tabular-nums; }
.gallery__thumbs { display: none; }

/* Buy box */
.buy { padding-top: var(--sp-5); }
.buy__vendor { display: inline-block; padding-block: 11px; min-width: 44px; font-size: var(--fs-small); font-weight: 600; color: var(--strait); text-decoration: none; }
.buy__vendor:hover { text-decoration: underline; text-underline-offset: 3px; }
.buy__title { margin-top: 0; }
.buy__price { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; }
.buy__use { margin-top: 16px; max-width: 52ch; }
.buy__dealer { margin-top: 8px; font-weight: 600; color: var(--strait); }
.picker { display: grid; gap: 24px; margin-top: 28px; }
.picker__option { border: 0; margin: 0; padding: 0; min-width: 0; }
.picker__legend { padding: 0; margin-bottom: 10px; font-weight: 600; }
.picker__value { font-weight: 400; }
.picker__values { display: flex; flex-wrap: wrap; gap: 8px; }
.picker__input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.value-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 64px; padding: 0 16px; border: 1.5px solid var(--input-edge); border-radius: var(--r-die); background: var(--white); font-size: var(--fs-ui); font-weight: 600; cursor: pointer; transition: background-color var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.value-btn:hover { border-color: var(--mat); }
.picker__input:checked + .value-btn { background: var(--mat); border-color: var(--mat); color: var(--white); }
.picker__input:focus-visible + .value-btn, .picker__input:focus-visible + .swatch .swatch__img { outline: 3px solid var(--strait); outline-offset: 2px; }
.value-btn.is-unavailable { color: var(--lead); border-style: dashed; text-decoration: line-through; }
.picker__input:checked + .value-btn.is-unavailable { color: var(--white); }
.swatch { display: flex; flex-direction: column; gap: 6px; width: 64px; cursor: pointer; }
.swatch__img { position: relative; width: 64px; height: 64px; padding: 4px; background: var(--salt); border: 2px solid transparent; border-radius: var(--r-die); overflow: hidden; }
.swatch__img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.picker__input:checked + .swatch .swatch__img { border-color: var(--mat); }
.swatch:hover .swatch__img { border-color: var(--input-edge); }
.picker__input:checked + .swatch:hover .swatch__img { border-color: var(--mat); }
.swatch__name { font-size: var(--fs-micro); line-height: 1.25; }
.swatch.is-unavailable .swatch__img img { opacity: 0.45; }
.swatch.is-unavailable .swatch__img::after { content: ""; position: absolute; left: -10%; top: 50%; width: 120%; height: 1.5px; background: var(--lead); transform: rotate(-45deg); }
.stock-badge { margin-top: 24px; }
.stock-badge .stock__dot { width: 10px; height: 10px; }
.stock-badge .stock { align-items: baseline; }
.stock-badge .stock__dot { transform: translateY(1px); }
.buy__form { margin-top: 16px; }
.buy__row { display: flex; gap: 12px; }
.buy__row .qty { height: 56px; }
.buy__add { flex: 1; }
.buy__add-check { display: none; }
.is-added .buy__add-check { display: inline-flex; }
.buy__note { margin-top: 16px; padding: 12px 16px; background: var(--salt); border-radius: var(--r-die); }
.fulfil { margin-top: 24px; border-top: 1px solid var(--rule); }
.fulfil__row { display: flex; align-items: flex-start; gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--rule); font-size: var(--fs-small); line-height: 1.45; }
.fulfil__row .icon { margin-top: -1px; }
.ask-shop { margin-top: 24px; padding: 20px; border-radius: var(--r-die); }
.ask-shop p.small { margin-top: 6px; }
.ask-shop__btn { margin-top: 16px; width: 100%; border-color: var(--mat); }
.ask-shop__call { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; font-weight: 600; }
.ask-shop .micro { margin-top: 4px; }

/* Description and spec sheet */
.product__details h2 { margin-bottom: 16px; }
.product__desc { margin-bottom: var(--sp-7); }
.spec { width: 100%; max-width: 760px; background: var(--white); border-radius: var(--r-die); overflow: hidden; }
.spec__caption { caption-side: top; text-align: left; }
.spec__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; padding: 8px 16px; background: var(--salt); border-radius: var(--r-die) var(--r-die) 0 0; }
.spec__title { font-weight: 600; }
.spec__sku { color: var(--mat); text-align: right; }
.spec th, .spec td { padding: 12px 16px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.spec tr:last-child th, .spec tr:last-child td { border-bottom: 0; }
.spec th { width: 40%; font-size: var(--fs-small); font-weight: 500; color: var(--lead); line-height: 1.55; }
.spec td { color: var(--mat); overflow-wrap: anywhere; }

@media (min-width: 1024px) {
  .product { padding-top: 24px; }
  .product__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--col-gap); }
  .product__crumbs { grid-column: 1 / -1; }
  .product__crumbs ol { flex-wrap: wrap; }
  .product__media { grid-column: 1 / 8; grid-row: 2; margin: 0; }
  .product__details { grid-column: 1 / 8; grid-row: 3; margin-top: var(--sp-8); }
  .product__buy { grid-column: 8 / 13; grid-row: 2 / 4; }
  .buy { position: sticky; top: calc(var(--header-h) + 24px); padding: 0 0 var(--sp-5) var(--sp-4); }
  .gallery__track { display: block; overflow: visible; }
  .gallery__slide { display: none; }
  .gallery__slide.is-active { display: block; }
  .gallery__counter { display: none; }
  .gallery__thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
  .gallery__thumb { width: 72px; height: 72px; padding: 6px; background: var(--salt); border-radius: var(--r-die); }
  .gallery__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
  .gallery__thumb[aria-current="true"] { outline: 2px solid var(--mat); outline-offset: 2px; }
  .gallery__thumb:focus-visible { outline: 3px solid var(--strait); outline-offset: 2px; }
}
@media (min-width: 1440px) {
  .product__buy { grid-column: 9 / 13; }
  .buy { padding-left: 0; }
}

/* Made for */
.made-for { min-height: clamp(280px, 34vw, 520px); }
.made-for__heading { max-width: 16ch; }
.made-for__link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; color: var(--white); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.made-for__link .icon { transition: transform var(--t-fast) var(--ease-out); }
.made-for__link:hover .icon { transform: translateX(4px); }
.made-for .credit--on-photo { bottom: 10px; }
.made-for .band__img { object-position: var(--pos, 50% 50%); }
/* Text over the sky: for photos whose subject stands in the lower left, where the heading would sit. */
.made-for--top { align-items: flex-start; }
.made-for--top::after { background: linear-gradient(180deg, rgba(19, 35, 58, 0.86) 0%, rgba(19, 35, 58, 0.5) 28%, rgba(19, 35, 58, 0) 48%); }
.made-for.made-for--top .band__content { padding-block: 24px 0; }
.band.made-for--top .credit--on-photo { top: auto; bottom: 10px; }
@media (min-width: 768px) { .made-for.made-for--top .band__content { padding-top: 32px; } }
@media (max-width: 1023px) {
  .made-for .band__img { object-position: var(--pos-m, var(--pos, 50% 50%)); }
  .made-for--top { min-height: 400px; }
}
@media (max-width: 767px) {
  .made-for .band__content { padding-bottom: 40px; }
  .made-for--top { min-height: 460px; }
}

/* Related */
.related__heading { margin-bottom: var(--head-gap); color: var(--white); }
.related__scroller { overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.related__scroller::-webkit-scrollbar { display: none; }
.related__track { display: flex; gap: 12px; padding-inline: var(--gutter); }
.related__item { flex: 0 0 44vw; scroll-snap-align: start; }
.related__item:last-child { margin-right: var(--gutter); }
.related__item > .card { height: 100%; }
@media (min-width: 600px) { .related__item { flex-basis: 30vw; } }
@media (min-width: 1024px) {
  .related__scroller { overflow: visible; width: var(--wrap-wide); margin-inline: auto; }
  .related__track { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--col-gap); padding: 0; }
  .related__item:last-child { margin-right: 0; }
  .related__item:nth-child(n + 5) { display: none; }
}

/* Sticky add bar */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--rule); box-shadow: var(--sh-bar); transform: translateY(100%); visibility: hidden; transition: transform var(--t-slow) var(--ease-out), visibility 0s linear var(--t-slow); }
.sticky-bar.is-visible { transform: none; visibility: visible; transition-delay: 0s; }
.sticky-bar__thumb { flex: none; width: 48px; height: 48px; padding: 3px; background: var(--salt); }
.sticky-bar__thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.sticky-bar__text { flex: 1; min-width: 0; }
.sticky-bar__title { font-size: var(--fs-small); font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-bar__meta { line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-bar__btn { flex: none; min-width: 112px; min-height: 48px; padding: 0 20px; }
body.has-sticky-bar { padding-bottom: 72px; }
@media (min-width: 1024px) { .sticky-bar { display: none; } body.has-sticky-bar { padding-bottom: 0; } }
