/* product — the product page's own styles, on this page only. Two columns from 721px: the gallery and the
   description on the left, the buy box on the right, staying in sight while the left side scrolls (product.js
   sets .is-sticky when it fits the window). One column up to 720px, a bar at the bottom once the buy box's
   button has scrolled away. Colours and sizes through var(--*). */

.product-page { padding-top: 1.6rem; }

.product-back { display: inline-block; margin-bottom: 1.4rem; color: var(--muted); font-size: .92rem; }

.product-back:hover { color: var(--mark, var(--primary)); }

.product-crumbs { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .45rem; margin: 0 0 1.4rem; color: var(--muted); font-size: .92rem; }

.product-crumbs .product-back { margin-bottom: 0; }

.product-crumbs__cat { color: var(--muted); }

.product-crumbs__cat:hover { color: var(--mark, var(--primary)); }

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  grid-template-areas: "gallery buy" "about buy";
  grid-template-rows: auto 1fr;
  column-gap: clamp(2rem, 4vw, 3rem);
  row-gap: 2.4rem;
  align-items: start;
}

.product-gallery { grid-area: gallery; min-width: 0; }

.product-buy { grid-area: buy; min-width: 0; }

.product-about { grid-area: about; min-width: 0; }

.product-layout--nophoto { grid-template-areas: "about buy"; grid-template-rows: auto; }

.product-layout--single { grid-template-columns: minmax(0, 640px); grid-template-areas: "buy"; }

.product-buy.is-sticky { position: sticky; top: calc(var(--header-sticky-h, 0px) + 1.5rem); }

/* The gallery: one strip of photos that snaps — a swipe on a phone, the
   arrows, the thumbs and the keys elsewhere move the same strip. */

.product-gallery__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--hover-wash);
}

.product-gallery__track {
  display: flex; height: 100%;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}

.product-gallery__track::-webkit-scrollbar { display: none; }

.product-gallery__track:focus-visible { outline: 2px solid var(--mark, var(--primary)); outline-offset: -2px; }

.product-gallery__slide { flex: 0 0 100%; height: 100%; margin: 0; scroll-snap-align: start; cursor: zoom-in; }

.product-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-gallery--contain .product-gallery__stage { background: var(--plate, #fff); }

.product-gallery--contain .product-gallery__slide img { object-fit: contain; padding: 1.5rem; }

.product-gallery__arrow,
.product-gallery__zoom,
.product-gallery__count {
  position: absolute;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
}

.product-gallery__arrow {
  top: 50%; transform: translateY(-50%);
  width: 2.75rem; height: 3.5rem; padding: 0; cursor: pointer;
  opacity: 0; transition: opacity .15s ease;
}

/* The arrows over the photo: the chevron alone, white and half see-through, a soft shadow to
   stay readable on a light photo — no disc to cover the picture. */

.product-gallery__arrow.product-gallery__arrow { border: 0; background: none; color: #fff; }

.product-gallery__arrow svg { width: 2rem; height: 2rem; filter: drop-shadow(0 1px 3px rgb(0 0 0 / .55)); }

.product-gallery__arrow--prev { left: .8rem; }

.product-gallery__arrow--next { right: .8rem; }

.product-gallery__stage:hover .product-gallery__arrow,
.product-gallery__stage:focus-within .product-gallery__arrow { opacity: .75; }

.product-gallery__stage .product-gallery__arrow:hover,
.product-gallery__stage .product-gallery__arrow:focus-visible { opacity: 1; }

.product-gallery__arrow:disabled { opacity: 0 !important; pointer-events: none; }

.product-gallery__zoom:hover { border-color: var(--mark, var(--primary)); color: var(--mark, var(--primary)); }

.product-gallery__count { right: .8rem; bottom: .8rem; padding: .2rem .65rem; font-size: .8rem; font-variant-numeric: tabular-nums; }

.product-gallery__zoom { left: .8rem; bottom: .8rem; width: 2.3rem; height: 2.3rem; padding: 0; cursor: pointer; }

/* Over the photo, not on it: the zoom and the counter are a light veil until the hand is near. */

.product-gallery__zoom, .product-gallery__count {
  border-color: transparent; background: color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: .7; transition: opacity .15s ease;
}

.product-gallery__zoom svg { width: 1.05rem; height: 1.05rem; }

.product-gallery__stage:hover .product-gallery__zoom, .product-gallery__zoom:focus-visible,
.product-gallery__stage:hover .product-gallery__count { opacity: 1; }

.product-gallery__thumbs { display: flex; gap: .5rem; margin-top: .7rem; overflow-x: auto; scrollbar-width: none; padding: 2px; }

.product-gallery__thumb {
  flex: none; width: 4.5rem; height: 4.5rem; padding: 0;
  border: 2px solid transparent; border-radius: var(--radius-small);
  overflow: hidden; background: var(--hover-wash); cursor: pointer;
}

.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.product-gallery--contain .product-gallery__thumb { background: var(--plate, #fff); }

.product-gallery--contain .product-gallery__thumb img { object-fit: contain; }

.product-gallery__thumb.is-active { border-color: var(--ink); }

.product-gallery__thumb:focus-visible { outline: 2px solid var(--mark, var(--primary)); outline-offset: 2px; }

/* The buy box. */

.product-buy__title { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.12; margin-bottom: .6rem; text-wrap: balance; }

.product-buy__lead { font-size: 1rem; color: var(--body-text); max-width: 46ch; margin: 0 0 .5rem; }

.product-buy__sku { font-size: .8rem; color: var(--muted); margin: 0; }

.product-buy__price { display: grid; gap: .2rem; margin: 1.2rem 0 .7rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--ink); }

.product-buy__was { display: flex; align-items: center; gap: .5rem; }

.product-buy__was .price-was { font-size: .95rem; margin: 0; color: var(--muted); }

.product-buy__price .price-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .45rem; }

.product-buy__price .price { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }

.product-buy__price .price-from,
.product-buy__price .price-unit { font-size: 1rem; color: var(--muted); }

.product-buy__price .price-ask { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }

.product-buy .product-detail__stock { margin: 0 0 1.2rem; font-size: .9rem; }

.product-buy__action { margin-top: 1.2rem; }

.product-buy__note { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }

/* How it is received and paid. */

.product-terms {
  list-style: none; margin: 1.6rem 0 0; padding: .3rem 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}

.product-terms__row { display: grid; gap: .1rem; padding: .75rem 0; border-top: 1px solid var(--line); font-size: .9rem; }

.product-terms__name { color: var(--ink); font-weight: 600; }

.product-terms__note { color: var(--muted); }

.product-section-title { font-size: 1.45rem; margin-bottom: 1rem; }

.product-related__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }

.product-related__head .product-section-title { font-size: 1.6rem; margin: 0; }

/* The bar at the bottom of a narrow screen. */

.product-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem 16px calc(.7rem + env(safe-area-inset-bottom, 0px));
  background: var(--surface); border-top: 1px solid var(--line);
}

.product-bar__text { display: grid; min-width: 0; flex: 1; }

.product-bar__name { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.product-bar__price { font-family: var(--font-display); font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.product-bar__form { margin: 0; flex: none; }

html.has-product-bar body { padding-bottom: 4.5rem; }

/* Two columns down to 721px: a laptop's builder preview is 760–880px wide, and a page that stacked
   there below 900px put a 600px-wide booking card under a full-width photo. Between 721 and 1100px the
   columns are equal, so the buy side keeps a card's width (~340px). */

@media (min-width: 721px) { .product-bar { display: none !important; } }

@media (max-width: 1100px) { .product-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 2rem; } }

@media (max-width: 720px) {
  .product-layout, .product-layout--nophoto { display: flex; flex-direction: column; gap: 1.8rem; }
  .product-buy.is-sticky { position: static; }
}

@media (max-width: 560px) {
  .product-gallery__stage { margin: 0 -24px; border-radius: 0; }
  .product-gallery__thumbs, .product-gallery__arrow { display: none; }
  .product-buy__price .price { font-size: 1.85rem; }
}

/* The price and the buy form in the buy box are the price and buy_form components: bigger here. */

.product-buy .price-line { margin: 1.2rem 0 .7rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }

.product-buy .price-line .price { font-size: 2.1rem; line-height: 1.1; }

.product-buy .price-line .price-ask { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; color: var(--ink); }

.product-stock { margin: 0 0 1.2rem; font-size: .9rem; color: var(--muted); }

.buy-form { display: flex; gap: .6rem; align-items: stretch; margin-top: 1.2rem; }

.buy-qty { width: 5rem; }

.buy__note { margin: .6rem 0 0; font-size: .85rem; color: var(--muted); }

.product-bar .price-line { margin: 0; padding: 0; border: 0; }

.product-bar .price-line .price { font-size: 1rem; }

.crumbs { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .45rem; margin: 0 0 1.4rem; color: var(--muted); font-size: .92rem; }

.crumbs a:hover { color: var(--mark, var(--primary)); }

.product-about h2 { font-size: 1.45rem; margin-bottom: 1rem; }

/* ---------- product_list.twig ---------- */

/* product_list — the catalogue's own: the chips row, the bar, the empty state. On this page only.
   The cards are the products component's, their styles its own. */

/* the filters' own look is the component's; this page only keeps its categories under the header while the
   list scrolls — the filters step aside (contents), so the sticky reaches over the whole list, not only over
   their own height */

.filters { display: contents; }

.filter[data-filter="category"] { position: sticky; top: var(--header-sticky-h, 0px); z-index: 1; background: var(--bg); margin-block-end: .5rem; }

/* With the filters stepped aside, the toggles and the price are the section's own children: one row of them. */
.filter:not(.filter--list) { display: inline-flex; vertical-align: middle; margin: 0 .5rem .5rem 0; }

.catalog-bar   { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-block: 1rem var(--grid-gap); }

.catalog-bar__found { margin: 0; color: var(--muted); font-size: .95rem; font-variant-numeric: tabular-nums; }

.catalog-bar .sort { margin-left: auto; }

/* ---------- The price line (_price.twig) and the buy box (_buy_card.twig) ----------
   Last in this file on purpose: they were the components' stylesheets, linked after the page's, and the page's
   own rules above size them in their places. */

/* The price line (_price.twig) — its parts: the old price struck through with the discount, «from», the amount, the unit. */
.price-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem; color: var(--ink); }
.price-line .price { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.price-line .price-was { color: var(--muted); font-size: .9rem; }
.price-line .price-off { color: var(--mark, var(--primary)); font-size: .82rem; font-weight: 700; }
.price-line .price-from, .price-line .price-unit { color: var(--muted); font-size: .9rem; }
.price-line .price-ask { color: var(--muted); }

/* The buy box (_buy_card.twig) — in a card it stands above the card's link and at the card's bottom. */

.buy--card { position: relative; z-index: 1; margin-top: auto; }

.buy-form { display: flex; align-items: center; gap: .8rem; }

.buy-qty {
  width: 74px;
  height: 48px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
}

.buy-qty:focus { outline: none; border-color: var(--mark, var(--primary)); }
