/*
 * The shop, category and search pages — Web 2.8 §3, reworked by Web 2.10
 * (Henri, 24.10.2026). On a computer: the filters in the left column (white
 * box, light border) and the cards beside them, "1–40 nga 480 produkte" and
 * the sort above. On a phone (under 992 px): «Filtrat» + the sort in one row,
 * the count under them, and the filters in a white panel from the bottom
 * with the red «Shfaq X produkte». Red = the cart button's red: ticked
 * filters, the slider, its handles and the buttons. Buttons 44 px and more;
 * no sideways scroll.
 */
.bzs-shop {
  /* the cart button's red: the site's own CSS paints a.meili-wp-prefixed-search__card-cart #d23f2d (Henri: the filters take that red) */
  --bzs-red: #d23f2d;
  --bzs-line: #e4e4e4;
  --bzs-text: #3f3f46;
  --bzs-muted: #71717a;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 28px;
  margin: 4px 0 48px;
  font-family: "Segoe UI", Helvetica, Arial, sans-serif;
}

.bzs-shop--search {
  grid-template-columns: minmax(0, 1fr);
}

.bzs-shop__main {
  min-width: 0;
}

.bzs-shop__main .shop-archive-header {
  margin-bottom: 22px;
}

/* ---- the filters (the column on a computer) ---------------------------------- */
.bzs-shop .bzs-side {
  min-width: 0;
}

.bzs-shop .bzs-side__head {
  display: none;
}

.bzs-shop .bzs-filter {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--bzs-line);
  border-radius: 12px;
  background: #fff;
}

.bzs-shop .bzs-box {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
}

.bzs-shop .bzs-filter__kinds {
  display: grid;
  gap: 10px;
}

/* «Produktet në seta» / «Në ofertë»: a ticked row turns red. */
.bzs-shop .bzs-check {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 6px 10px 6px 12px;
  border: 1px solid var(--bzs-line);
  border-radius: 10px;
  background: #fff;
  color: var(--bzs-text);
  font-size: 14px;
  line-height: 1.3;
  cursor: pointer;
  user-select: none;
}

.bzs-shop .bzs-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.bzs-shop .bzs-check__box {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  border: 2px solid #c4c4c8;
  border-radius: 4px;
  background: #fff;
}

.bzs-shop .bzs-check__text {
  flex: 1 1 auto;
  min-width: 0;
}

.bzs-shop .bzs-check input:checked + .bzs-check__box {
  border-color: var(--bzs-red);
  background: var(--bzs-red);
}

.bzs-shop .bzs-check input:checked + .bzs-check__box::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 4.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.bzs-shop .bzs-check:has(input:checked) {
  border-color: var(--bzs-red);
  background: #fff5f5;
}

.bzs-shop .bzs-check input:focus-visible + .bzs-check__box {
  outline: 2px solid rgba(239, 59, 53, 0.4);
  outline-offset: 2px;
}

.bzs-shop .bzs-tag {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 5px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.04em;
}

.bzs-shop .bzs-tag--seta {
  background: #f5a524;
}

.bzs-shop .bzs-tag--sale {
  background: var(--bzs-red);
}

/* ---- price ------------------------------------------------------------------ */
.bzs-shop .bzs-box__title {
  margin: 4px 0 10px;
  color: #52525b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.bzs-shop .bzs-price__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin: 0 0 14px;
}

.bzs-shop .bzs-price__field {
  display: grid;
  gap: 5px;
  min-width: 0;
  margin: 0;
}

.bzs-shop .bzs-price__caption {
  color: var(--bzs-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bzs-shop .bzs-price__input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid var(--bzs-line);
  border-radius: 8px;
  background: #f6f6f7;
  box-shadow: none;
  color: #18181b;
  font-family: inherit;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.bzs-shop .bzs-price__input:focus {
  border-color: var(--bzs-red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(239, 59, 53, 0.15);
}

.bzs-shop .bzs-price__dash {
  padding-bottom: 12px;
  color: #a1a1aa;
}

.bzs-shop .bzs-price__slider {
  position: relative;
  height: 28px;
  margin: 0 0 6px;
}

.bzs-shop .bzs-price__track {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: #e4e4e7;
}

.bzs-shop .bzs-price__fill {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 2px;
  background: var(--bzs-red);
}

.bzs-shop .bzs-price__range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}

.bzs-shop .bzs-price__range::-webkit-slider-runnable-track {
  height: 28px;
  border: 0;
  background: transparent;
}

.bzs-shop .bzs-price__range::-moz-range-track {
  border: 0;
  background: transparent;
}

.bzs-shop .bzs-price__range::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  border: 2px solid var(--bzs-red);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
  appearance: none;
}

.bzs-shop .bzs-price__range::-moz-range-thumb {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border: 2px solid var(--bzs-red);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  pointer-events: auto;
}

.bzs-shop .bzs-price__range:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 4px rgba(239, 59, 53, 0.22);
}

.bzs-shop .bzs-price__label {
  margin: 0;
  color: var(--bzs-muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* ---- «Filtroji» / «Shfaq X produkte» and «Pastro filtrat» ------------------------ */
.bzs-shop .bzs-filter__foot {
  display: grid;
  gap: 6px;
}

.bzs-shop .bzs-apply {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: var(--bzs-red);
  box-shadow: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.bzs-shop .bzs-apply:hover,
.bzs-shop .bzs-apply:focus-visible {
  filter: brightness(0.92);
  color: #fff;
}

.bzs-shop .bzs-apply--phone {
  display: none;
}

.bzs-shop .bzs-clear,
.bzs-shop .bzs-bar__clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  color: var(--bzs-muted);
  font-size: 14px;
  text-decoration: underline;
}

.bzs-shop .bzs-clear:hover,
.bzs-shop .bzs-bar__clear:hover {
  color: var(--bzs-red);
}

/* ---- above the cards: "1–40 nga 480 produkte" and the sort --------------------- */
.bzs-shop .bzs-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.bzs-shop .bzs-bar__info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-right: auto;
}

.bzs-shop .bzs-bar__count {
  margin: 0;
  color: var(--bzs-muted);
  font-size: 15px;
  line-height: 1.3;
}

/* a tap or a script moving the focus draws no ring; the keyboard still does */
.bzs-shop .bzs-side__close:focus:not(:focus-visible),
.bzs-shop .bzs-filters-toggle:focus:not(:focus-visible) {
  outline: none;
}

.bzs-shop .bzs-bar__count b {
  color: #18181b;
  font-weight: 700;
}

.bzs-shop .bzs-filters-toggle,
.bzs-shop .bzs-bar__clear {
  display: none;
}

.bzs-shop .bzs-sort {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: 0;
  padding: 0 4px 0 12px;
  border: 1px solid var(--bzs-line);
  border-radius: 10px;
  background: #fff;
}

/* Web 2.9 §2: the same colour and size as the words beside it. */
.bzs-shop .bzs-sort__icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: var(--bzs-text);
}

/* Web 2.9 §7: our own small arrow — an iPhone otherwise draws its grey box inside the white one. */
.bzs-shop .bzs-sort__select {
  max-width: 230px;
  height: 42px;
  margin: 0;
  padding: 0 26px 0 4px;
  border: 0;
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%233f3f46' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 4px center / 16px 16px;
  box-shadow: none;
  color: var(--bzs-text);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.bzs-shop .bzs-sort__select:focus-visible {
  outline: 2px solid rgba(239, 59, 53, 0.35);
  outline-offset: 2px;
}

/* the products' top, where the page links land, clear of a sticky header */
.bzs-shop #bzs-products {
  scroll-margin-top: 16px;
}

.bzs-overlay {
  display: none;
}

/* ---- a phone or a small tablet: «Filtrat» opens the panel from the bottom ------- */
@media (max-width: 991px) {
  .bzs-shop {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .bzs-shop .bzs-side {
    position: fixed;
    z-index: 100000;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 18px 18px 0 0;
    background: #fff;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform 0.28s ease, visibility 0.28s;
  }

  .bzs-shop .bzs-side.is-open {
    transform: none;
    visibility: visible;
  }

  .bzs-shop .bzs-side__head {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    padding: 0 12px 0 18px;
    border-bottom: 1px solid var(--bzs-line);
    color: #18181b;
    font-size: 17px;
    font-weight: 700;
  }

  .bzs-shop .bzs-side__close {
    display: grid;
    place-items: center;
    box-sizing: border-box;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--bzs-line);
    border-radius: 50%;
    background: #fff;
    box-shadow: none;
    color: #18181b;
    cursor: pointer;
  }

  .bzs-shop .bzs-filter {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 18px 0;
    border: 0;
    border-radius: 0;
  }

  .bzs-shop .bzs-check {
    min-height: 48px;
    font-size: 15px;
  }

  .bzs-shop .bzs-box__title {
    color: #18181b;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
  }

  .bzs-shop .bzs-price__input {
    height: 48px;
    font-size: 16px; /* 16 px and up: an iPhone does not zoom the page on tap */
  }

  .bzs-shop .bzs-price__slider,
  .bzs-shop .bzs-price__range,
  .bzs-shop .bzs-price__range::-webkit-slider-runnable-track {
    height: 44px;
  }

  .bzs-shop .bzs-price__range::-webkit-slider-thumb {
    width: 26px;
    height: 26px;
    margin-top: 9px;
  }

  .bzs-shop .bzs-price__range::-moz-range-thumb {
    width: 26px;
    height: 26px;
  }

  .bzs-shop .bzs-filter__foot {
    position: sticky;
    bottom: 0;
    margin: 6px -18px 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--bzs-line);
    background: #fff;
  }

  .bzs-shop .bzs-apply--wide {
    display: none;
  }

  .bzs-shop .bzs-apply--phone {
    display: block;
    min-height: 50px;
    font-size: 16px;
  }

  .bzs-overlay {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.45);
  }

  .bzs-overlay[hidden] {
    display: none;
  }

  body.bzs-drawer-open {
    overflow: hidden;
  }

  /* «Filtrat» and the sort in one row; the count (and «Pastro filtrat») under them. */
  .bzs-shop .bzs-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      "filters sort"
      "info info";
    align-items: center;
    gap: 10px 10px;
    margin-bottom: 14px;
  }

  .bzs-shop .bzs-bar__info {
    grid-area: info;
    justify-content: space-between;
    margin: 0;
  }

  .bzs-shop .bzs-filters-toggle {
    display: inline-flex;
    grid-area: filters;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    border: 1.5px solid #18181b;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
    color: #18181b;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    cursor: pointer;
  }

  .bzs-shop .bzs-filters-toggle__n {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    box-sizing: border-box;
    border-radius: 999px;
    background: var(--bzs-red);
    color: #fff;
    font-size: 12px;
    line-height: 1;
  }

  .bzs-shop .bzs-sort {
    grid-area: sort;
    justify-self: start;
    min-width: 0;
    max-width: 100%;
  }

  .bzs-shop .bzs-sort__select {
    min-width: 0;
    max-width: calc(100vw - 210px);
    font-size: 16px; /* as above: no zoom on iPhone */
    text-overflow: ellipsis;
  }

  .bzs-shop .bzs-bar__count {
    font-size: 14px;
  }

  .bzs-shop .bzs-bar__clear {
    display: inline-flex;
    flex: 0 0 auto;
    min-height: 32px;
  }

  /* Web 2.9 §5: on a phone the shop pages keep the footer's "Kategorite Top" list
   * (text widget 20) out — the categories are in the ☰ menu. */
  body.bzs-shop-page #text-20 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bzs-shop .bzs-side {
    transition: none;
  }
}
