/* ==========================================================================
   Shop, category, search, product page and the order dialog.
   ========================================================================== */

/* Page headers ----------------------------------------------------------- */
.page-hero--band { background: var(--color-surface); padding-block: var(--space-xl); }
.page-hero--band h1 { font-size: var(--step-4); }
.category-banner { position: relative; background: var(--color-primary); color: var(--color-white); }
.category-banner__img { width: 100%; height: clamp(180px, 26vw, 320px); object-fit: cover; opacity: .55; }
.category-banner__text {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
  gap: var(--space-2xs);
}
.category-banner h1 { color: var(--color-white); font-size: var(--step-4); }
.category-banner .lead { color: color-mix(in srgb, var(--color-white) 88%, transparent); max-width: 46ch; }

.breadcrumb { margin-bottom: var(--space-m); font-size: var(--step--1); color: var(--color-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-2xs); list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: var(--space-2xs); color: var(--color-line-strong); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--color-text); }

/* Listing layout --------------------------------------------------------- */
.shop__layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
.shop__filters { position: sticky; top: 90px; max-height: calc(100vh - 110px); overflow-y: auto; }
.shop__scrim { display: none; }
.shop__toolbar { display: none; margin-bottom: var(--space-s); }
.results__bar { margin-bottom: var(--space-m); }
.results__count { color: var(--color-muted); font-size: var(--step--1); }
.load-more { display: flex; justify-content: center; margin-top: var(--space-xl); }

.filters { display: grid; gap: var(--space-m); }
.filters__head, .filters__foot { display: none; }
.filters__body { display: grid; gap: var(--space-m); }
.filter { border: 0; padding: 0; min-width: 0; display: grid; gap: var(--space-2xs); }
.filter legend {
  padding: 0; margin-bottom: var(--space-2xs); font-weight: 500; color: var(--color-primary);
  border-bottom: 1px solid var(--color-line); width: 100%; padding-bottom: var(--space-2xs);
}
.filter select, .filter__range input {
  width: 100%; min-height: 44px; padding: 0 var(--space-xs); background: var(--color-white);
  border: 1.5px solid var(--color-line-strong); border-radius: var(--radius-m);
}
.filter__range { display: grid; grid-template-columns: 1fr auto 1fr; gap: var(--space-2xs); align-items: center; color: var(--color-muted); }
.check { min-height: 32px; align-items: center; cursor: pointer; }
.check--sub { padding-left: var(--space-m); color: var(--color-muted); }

@media (max-width: 899px) {
  .shop__layout { grid-template-columns: 1fr; }
  .shop__toolbar { display: block; }
  .shop__filters {
    position: fixed; inset: 0; z-index: 80; max-height: none; overflow: visible; display: none;
  }
  .shop__filters.is-open { display: block; }
  .shop__scrim { display: block; position: absolute; inset: 0; background: color-mix(in srgb, var(--color-primary-dark) 45%, transparent); }
  .shop__sheet {
    position: absolute; left: 0; right: 0; bottom: 0; max-height: 86vh; overflow-y: auto;
    background: var(--color-bg); border-radius: var(--radius-l) var(--radius-l) 0 0;
    padding: var(--space-m) var(--gutter) var(--space-l);
  }
  .filters__head { display: flex; justify-content: space-between; align-items: center; }
  .filters__title { font-size: var(--step-2); }
  .filters__foot {
    display: flex; gap: var(--space-xs); position: sticky; bottom: calc(var(--space-l) * -1);
    background: var(--color-bg); padding-block: var(--space-s);
  }
  .filters__foot .btn { flex: 1; }
}
@media (min-width: 900px) {
  .filters__apply { display: none; }
  .filters__foot { display: flex; }
}

.empty { text-align: center; padding-block: var(--space-2xl); display: grid; gap: var(--space-s); justify-items: center; }
.empty .btn-row { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-2xs); justify-content: center; list-style: none; padding: 0; }
.chip { display: inline-block; padding: .4em 1em; border: 1.5px solid var(--color-line-strong); border-radius: var(--radius-pill); text-decoration: none; }
.chip:hover { background: var(--color-primary); color: var(--color-white); }
.search-inline { display: flex; gap: var(--space-2xs); max-width: 520px; margin: var(--space-m) auto 0; }
.search-inline input { flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-s); border: 1.5px solid var(--color-line-strong); border-radius: var(--radius-pill); background: var(--color-white); }

/* Product page --------------------------------------------------------------- */
.product-page__layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-xl); align-items: start; }
@media (max-width: 899px) { .product-page__layout { grid-template-columns: 1fr; gap: var(--space-l); } }

.gallery { display: grid; gap: var(--space-xs); }
.gallery__main {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--radius-s); background: var(--color-surface);
}
.gallery__main::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; scroll-snap-align: center; cursor: zoom-in; display: block; aspect-ratio: 4 / 5; }
.gallery__slide img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: flex; gap: var(--space-2xs); list-style: none; padding: 0; overflow-x: auto; }
.gallery__thumbs button { width: 68px; aspect-ratio: 4 / 5; border-radius: var(--radius-s); overflow: hidden; border: 2px solid transparent; opacity: .7; }
.gallery__thumbs button.is-active { border-color: var(--color-primary); opacity: 1; }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }


.product-info { display: grid; gap: var(--space-s); align-content: start; }
.product-info__badges { display: flex; gap: var(--space-3xs); list-style: none; padding: 0; }
.product-info__badges .badge { box-shadow: inset 0 0 0 1px var(--color-line); }
.product-info__category a { color: var(--color-muted); text-decoration: none; font-size: var(--step--1); }
.product-info__name { font-size: var(--step-4); }
.stock { font-size: var(--step--1); }
.stock--in { color: var(--color-success); }
.stock--low { color: var(--color-accent-dark); }
.stock--out { color: var(--color-muted); }
.product-info__short { color: var(--color-muted); }

.product-form { display: grid; gap: var(--space-m); margin-top: var(--space-xs); }
.product-form__actions { display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.product-form__actions .btn { flex: 1 1 200px; }

.share { display: flex; align-items: center; gap: var(--space-2xs); flex-wrap: wrap; }
.share__label { font-size: var(--step--1); color: var(--color-muted); margin-right: var(--space-2xs); }

.info-tabs { margin-top: var(--space-s); border-top: 1px solid var(--color-line); }
.info-tabs details { border-bottom: 1px solid var(--color-line); }
.info-tabs summary { list-style: none; cursor: pointer; padding: var(--space-s) 0; font-weight: 500; display: flex; justify-content: space-between; color: var(--color-primary); }
.info-tabs summary::-webkit-details-marker { display: none; }
.info-tabs summary::after { content: "+"; font-size: 1.4em; line-height: 1; }
.info-tabs details[open] summary::after { content: "–"; }
.info-tabs .prose { padding-bottom: var(--space-m); }
.specs { display: grid; gap: var(--space-2xs); padding-bottom: var(--space-m); }
.specs > div { display: flex; gap: var(--space-s); }
.specs dt { flex: 0 0 9rem; color: var(--color-muted); }

