/* ============================================================
   COLLECTION / CATEGORY PAGE
   CSS prefix: zb-clp   (standalone, append or use separately)
   ============================================================ */

.zb-clp {
  background: #fff;
  padding: 88px 40px 60px;
}

/* ---- Collection Header ---- */
.zb-clp__header { margin-bottom: 28px; }

.zb-clp__title {
  font-family: 'Inter', sans-serif;
  font-size: 28px; font-weight: 600; color: #1a1a1a;
  margin: 0 0 8px; letter-spacing: -0.5px;
}

.zb-clp__desc {
  font-family: 'Inter', sans-serif;
  font-size: 13.5px; font-weight: 400; color: #666;
  margin: 0; line-height: 1.55; max-width: 460px;
}

/* ---- Sub-category Cards ---- */
.zb-clp__subcats {
  display: flex; gap: 14px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: 0 0 28px;
}

.zb-clp__subcats::-webkit-scrollbar { display: none; }

.zb-clp__subcat {
  flex: 0 0 auto; width: 130px;
  text-decoration: none; display: block;
}

.zb-clp__subcat-img {
  width: 130px; height: 170px;
  border-radius: 10px; overflow: hidden;
  background: #f0ebe6; position: relative;
}

.zb-clp__subcat-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.35s ease;
}

.zb-clp__subcat:hover .zb-clp__subcat-img img { transform: scale(1.06); }

.zb-clp__subcat-label {
  display: block; text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 11.5px; font-weight: 500; color: #fff;
  position: relative; margin-top: -28px;
  padding: 6px 4px; z-index: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Dark gradient at bottom of subcat image */
.zb-clp__subcat-img::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 50%; background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  border-radius: 0 0 10px 10px;
}


/* ============================================================
   FILTER BAR
   ============================================================ */
.zb-clp__filters {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
  padding: 12px 0; margin-bottom: 24px;
  flex-wrap: wrap; gap: 8px;
}

.zb-clp__filters-left {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}

.zb-clp__filters-right {
  display: flex; align-items: center; gap: 16px;
}

.zb-clp__count {
  font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 400; color: #666;
}

/* ---- Individual Filter ---- */
.zb-clp__filter {
  position: relative;
}

.zb-clp__filter-btn {
  background: none; border: 0; cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px; font-weight: 500; color: #1a1a1a;
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 4px;
  transition: background 0.15s ease;
}

.zb-clp__filter-btn:hover { background: #f5f5f5; }

.zb-clp__filter-btn svg {
  transition: transform 0.25s ease;
}

.zb-clp__filter.is-open .zb-clp__filter-btn svg {
  transform: rotate(180deg);
}

.zb-clp__filter.is-open .zb-clp__filter-btn {
  font-weight: 700;
}

/* ---- Dropdown ---- */
.zb-clp__dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  background: #fff; border: 1px solid #e0e0e0;
  border-radius: 10px; padding: 16px 20px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  min-width: 200px; z-index: 50;
  display: none;
}

.zb-clp__filter.is-open .zb-clp__dropdown { display: block; }

.zb-clp__dropdown--wide { min-width: 320px; }

.zb-clp__dropdown--right { left: auto; right: 0; }

/* ---- Price Filter ---- */
.zb-clp__price-row {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}

.zb-clp__price-field {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid #ccc; border-radius: 6px; padding: 8px 10px;
}

.zb-clp__price-field span {
  font-family: 'Inter', sans-serif; font-size: 13px; color: #888;
}

.zb-clp__price-field input {
  border: 0; outline: 0; width: 70px;
  font-family: 'Inter', sans-serif; font-size: 13px; color: #1a1a1a;
}

.zb-clp__price-to {
  font-family: 'Inter', sans-serif; font-size: 13px; color: #888;
}

.zb-clp__price-hint {
  font-family: 'Inter', sans-serif; font-size: 11.5px; color: #999;
  margin: 0;
}

/* ---- Size Pills ---- */
.zb-clp__size-pills {
  display: flex; gap: 8px; flex-wrap: wrap;
}

.zb-clp__size-pill {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #ddd; background: #fff;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 600;
  color: #1a1a1a; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.zb-clp__size-pill:hover { border-color: #999; }

.zb-clp__size-pill.is-active {
  background: #1a1a1a; color: #fff; border-color: #1a1a1a;
}

/* ---- Color Grid ---- */
.zb-clp__color-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px 24px; margin-bottom: 12px;
}

.zb-clp__color-item {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13px; color: #444;
  padding: 4px 0; border-radius: 4px;
  transition: color 0.15s ease;
}

.zb-clp__color-item:hover { color: #1a1a1a; }

.zb-clp__color-item.is-active { font-weight: 700; color: #1a1a1a; }

.zb-clp__color-swatch {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: inline-block;
}

.zb-clp__color-item.is-active .zb-clp__color-swatch {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px #1a1a1a;
}

.zb-clp__color-clear {
  background: none; border: 0; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500;
  color: #888; padding: 4px 0; text-align: right; width: 100%;
  transition: color 0.15s ease;
}

.zb-clp__color-clear:hover { color: #1a1a1a; }

/* ---- Checkbox Filters (Availability, Fabric, Type, Specs, PCS) ---- */
.zb-clp__check {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13.5px; color: #444;
  padding: 6px 0;
}

.zb-clp__check input[type="checkbox"] {
  width: 18px; height: 18px; border-radius: 4px;
  accent-color: #1a1a1a; cursor: pointer; flex-shrink: 0;
}

/* ---- Sort Options ---- */
.zb-clp__sort-opt {
  display: block; width: 100%;
  background: none; border: 0; cursor: pointer;
  font-family: 'Inter', sans-serif; font-size: 13.5px; font-weight: 400;
  color: #555; padding: 8px 4px; text-align: left;
  border-radius: 4px; transition: background 0.15s ease, color 0.15s ease;
}

.zb-clp__sort-opt:hover { background: #f5f5f5; color: #1a1a1a; }

.zb-clp__sort-opt.is-active { font-weight: 700; color: #1a1a1a; }


/* ============================================================
   PRODUCT GRID — 4 columns
   ============================================================ */
.zb-clp__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.zb-clp__product {
  text-decoration: none; color: inherit; display: block;
}

.zb-clp__product-img {
  width: 100%; aspect-ratio: 3 / 4.2;
  overflow: hidden;
  background: #f0ebe6;
}

.zb-clp__product-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s ease;
}

.zb-clp__product:hover .zb-clp__product-img img { transform: scale(1.04); }

.zb-clp__product-info { padding: 10px 2px 0; }

.zb-clp__product-name {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 13px; font-weight: 500; color: #1a1a1a;
  line-height: 1.35; margin-bottom: 4px;
}

.zb-clp__product-pricing { display: flex; align-items: center; gap: 8px; }

.zb-clp__product-price {
  font-family: 'Inter', sans-serif;
  font-size: 14px; font-weight: 700; color: #1a1a1a;
}

.zb-clp__product-old {
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 400; color: #707070;
  text-decoration: line-through;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (min-width: 1400px) {
  .zb-clp { padding: 92px 56px 72px; }
  .zb-clp__grid { gap: 24px; }
  .zb-clp__subcat { width: 145px; }
  .zb-clp__subcat-img { width: 145px; height: 190px; }
}

@media screen and (max-width: 991px) {
  .zb-clp { padding: 82px 28px 48px; }
  .zb-clp__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .zb-clp__title { font-size: 24px; }
  .zb-clp__subcat { width: 110px; }
  .zb-clp__subcat-img { width: 110px; height: 145px; }
}

@media screen and (max-width: 749px) {
  .zb-clp { padding: 74px 16px 40px; }
  .zb-clp__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .zb-clp__title { font-size: 22px; }
  .zb-clp__desc { font-size: 12.5px; }

  .zb-clp__filters { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .zb-clp__filters::-webkit-scrollbar { display: none; }
  .zb-clp__filters-left { flex-wrap: nowrap; }
  .zb-clp__filter-btn { font-size: 12px; padding: 6px 8px; white-space: nowrap; }
  .zb-clp__count { font-size: 11px; white-space: nowrap; }

  .zb-clp__subcat { width: 100px; }
  .zb-clp__subcat-img { width: 100px; height: 130px; }
  .zb-clp__subcat-label { font-size: 10px; margin-top: -24px; }

  .zb-clp__product-name { font-size: 12px; }
  .zb-clp__product-price { font-size: 13px; }
}

@media screen and (max-width: 374px) {
  .zb-clp { padding: 68px 12px 36px; }
  .zb-clp__title { font-size: 20px; }
}


/* ============================================================
   FILTERS: shared component (components/product-listing.blade.php)
   Desktop: dropdown row. Phones: "Filter" button + panel from the left.
   ============================================================ */
.zb-clp__mfilter, .zb-clp__panel-head, .zb-clp__panel-foot, .zb-clp__sheet-head, .zb-clp__backdrop { display: none; }

.zb-clp__filter-btn > span:first-child { pointer-events: none; }
.zb-clp__filter-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #1a1a1a; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1;
}
.zb-clp__filter-badge[hidden] { display: none; }
.zb-clp__filter.has-value .zb-clp__filter-btn { font-weight: 700; }
.zb-clp__sort-current { font-weight: 400; color: #6b6b6b; }

.zb-clp__clear-all {
  background: none; border: 0; cursor: pointer; padding: 6px 10px;
  font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 500; color: #1a1a1a;
  text-decoration: underline; text-underline-offset: 3px; white-space: nowrap;
}
.zb-clp__clear-all[hidden] { display: none; }

/* sizes like "4.5 meter", "100 ml", "Custom Size" need room, so pills grow with their text */
.zb-clp__size-pill { width: auto; min-width: 44px; height: 40px; padding: 0 14px; border-radius: 999px; gap: 6px; white-space: nowrap; }
.zb-clp__dropdown small { font-size: 11px; font-weight: 400; color: #6b6b6b; }
.zb-clp__size-pill.is-active small { color: rgba(255, 255, 255, 0.75); }

.zb-clp__color-item { background: none; border: 0; font: inherit; text-align: left; width: 100%; font-family: 'Inter', sans-serif; font-size: 13px; color: #444; }
.zb-clp__color-swatch { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.zb-clp__dropdown--wide { min-width: 340px; }
.zb-clp__filter[data-filter="size"] .zb-clp__dropdown { min-width: 300px; }

.zb-clp__clear-one {
  display: block; margin: 12px 0 0 auto; background: none; border: 0; cursor: pointer; padding: 4px 0;
  font-family: 'Inter', sans-serif; font-size: 12px; font-weight: 500; color: #6b6b6b;
}
.zb-clp__clear-one:hover { color: #1a1a1a; }

.zb-clp__apply {
  margin-top: 10px; padding: 8px 18px; border: 1px solid #1a1a1a; border-radius: 8px;
  background: #1a1a1a; color: #fff; font-family: 'Inter', sans-serif; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.zb-clp__empty { text-align: center; padding: 40px 20px; color: #666; font-family: 'Inter', sans-serif; }
.zb-clp__empty p { font-size: 15px; margin-bottom: 8px; }
.zb-clp__empty[hidden] { display: none; }

/* ---- two-handle price slider ---- */
.zb-clp__range { position: relative; height: 28px; margin: 4px 10px 14px; }
.zb-clp__range::before, .zb-clp__range::after {
  content: ''; position: absolute; top: 50%; height: 3px; border-radius: 3px; transform: translateY(-50%);
}
.zb-clp__range::before { left: 0; right: 0; background: #ddd; }
.zb-clp__range::after { left: var(--lo); right: calc(100% - var(--hi)); background: #1a1a1a; }
.zb-clp__range input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: none;
  -webkit-appearance: none; appearance: none; pointer-events: none; z-index: 1;
}
.zb-clp__range input::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; border: 2px solid #1a1a1a; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.zb-clp__range input::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; border: 2px solid #1a1a1a; cursor: pointer;
}
.zb-clp__range input::-webkit-slider-runnable-track { background: none; }
.zb-clp__range input::-moz-range-track { background: none; }

/* ============================================================
   PHONES
   ============================================================ */
@media screen and (max-width: 749px) {
  .zb-clp__filters { overflow: visible; flex-wrap: nowrap; padding: 10px 0; }
  .zb-clp__count { display: none; }

  .zb-clp__mfilter {
    display: inline-flex; align-items: center; gap: 8px; background: none; border: 0; padding: 8px 4px; cursor: pointer;
    font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500; color: #1a1a1a;
  }
  .zb-clp__filter--sort .zb-clp__filter-btn { font-size: 14px; padding: 8px 4px; }

  /* ---- the panel ---- */
  .zb-clp__filters-left {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 330;
    width: min(88vw, 380px); display: flex; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0;
    padding: 0 22px; overflow-y: auto; overscroll-behavior: contain;
    background: rgba(28, 28, 28, 0.9);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    color: #fff; box-shadow: 10px 0 40px rgba(0, 0, 0, 0.3);
    transform: translateX(-102%); visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.32s;
  }
  body.zb-clp-panel-open .zb-clp__filters-left {
    transform: none; visibility: visible;
    transition: transform 0.32s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s;
  }

  .zb-clp__panel-head {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 2; margin: 0 -22px; padding: 20px 22px 16px;
    background: rgba(28, 28, 28, 0.96); border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 600;
  }
  .zb-clp__panel-close { background: none; border: 0; color: #fff; padding: 6px; margin-right: -6px; cursor: pointer; display: inline-flex; }

  .zb-clp__filters-left .zb-clp__filter { position: static; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
  .zb-clp__filters-left .zb-clp__filter-btn {
    width: 100%; justify-content: flex-start; padding: 18px 0; border-radius: 0; background: none;
    color: rgba(255, 255, 255, 0.9); font-size: 16px; font-weight: 500;
  }
  .zb-clp__filters-left .zb-clp__filter-btn:hover { background: none; }
  .zb-clp__filters-left .zb-clp__filter.is-open .zb-clp__filter-btn,
  .zb-clp__filters-left .zb-clp__filter.has-value .zb-clp__filter-btn { color: #fff; font-weight: 600; }
  .zb-clp__filters-left .zb-clp__chev { margin-left: auto; width: 12px; height: 8px; opacity: 0.8; }
  .zb-clp__filters-left .zb-clp__filter-badge { background: #fff; color: #1a1a1a; }

  .zb-clp__filters-left .zb-clp__dropdown {
    position: static; display: none; min-width: 0; padding: 0 0 18px; border: 0; border-radius: 0;
    background: none; box-shadow: none; color: #fff;
  }
  .zb-clp__filters-left .zb-clp__filter.is-open .zb-clp__dropdown { display: block; }
  .zb-clp__filters-left .zb-clp__apply[data-apply-price],
  .zb-clp__filters-left .zb-clp__price-hint { display: none; }
  .zb-clp__filters-left small { color: rgba(255, 255, 255, 0.55); }

  /* price */
  .zb-clp__filters-left .zb-clp__range::before { background: rgba(255, 255, 255, 0.35); }
  .zb-clp__filters-left .zb-clp__range::after { background: #fff; }
  .zb-clp__filters-left .zb-clp__range input::-webkit-slider-thumb { background: #1a1a1a; border-color: #fff; }
  .zb-clp__filters-left .zb-clp__range input::-moz-range-thumb { background: #1a1a1a; border-color: #fff; }
  .zb-clp__filters-left .zb-clp__price-row { gap: 8px; margin: 0; }
  .zb-clp__filters-left .zb-clp__price-field { flex: 1; border-color: rgba(255, 255, 255, 0.3); }
  .zb-clp__filters-left .zb-clp__price-field span,
  .zb-clp__filters-left .zb-clp__price-to { color: rgba(255, 255, 255, 0.7); }
  .zb-clp__filters-left .zb-clp__price-field input { width: 100%; background: none; color: #fff; font-size: 16px; }

  /* sizes */
  .zb-clp__filters-left .zb-clp__size-pill { background: none; color: #fff; border-color: rgba(255, 255, 255, 0.4); height: 42px; }
  .zb-clp__filters-left .zb-clp__size-pill.is-active { background: #fff; color: #1a1a1a; border-color: #fff; }
  .zb-clp__filters-left .zb-clp__size-pill.is-active small { color: #6b6b6b; }

  /* fabric / availability: checkbox list */
  .zb-clp__filters-left .zb-clp__check { color: rgba(255, 255, 255, 0.9); font-size: 15px; padding: 7px 0; gap: 12px; }
  .zb-clp__filters-left .zb-clp__check input[type="checkbox"] {
    -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.7); border-radius: 5px; background: none; display: grid; place-items: center;
  }
  .zb-clp__filters-left .zb-clp__check input[type="checkbox"]:checked { background: #fff; border-color: #fff; }
  .zb-clp__filters-left .zb-clp__check input[type="checkbox"]:checked::after {
    content: ''; width: 5px; height: 10px; margin-top: -2px; border: solid #1a1a1a; border-width: 0 2px 2px 0; transform: rotate(45deg);
  }

  /* colours: swatches only */
  .zb-clp__filters-left .zb-clp__color-grid { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
  .zb-clp__filters-left .zb-clp__color-item { width: auto; padding: 0; font-size: 0; gap: 0; }
  .zb-clp__filters-left .zb-clp__color-item small { display: none; }
  .zb-clp__filters-left .zb-clp__color-swatch {
    width: 38px; height: 38px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  }
  .zb-clp__filters-left .zb-clp__color-item.is-active .zb-clp__color-swatch { box-shadow: 0 0 0 2px #1c1c1c, 0 0 0 4px #fff; }

  .zb-clp__filters-left .zb-clp__clear-one { color: rgba(255, 255, 255, 0.7); }
  .zb-clp__filters-left .zb-clp__clear-all { color: #fff; align-self: flex-start; margin: 14px 0 0 -10px; }

  .zb-clp__panel-foot {
    display: block; position: sticky; bottom: 0; margin: auto -22px 0; padding: 18px 22px calc(18px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(28, 28, 28, 1) 70%, rgba(28, 28, 28, 0));
  }
  .zb-clp__see {
    width: 100%; padding: 15px 18px; border: 0; border-radius: 10px; background: #fff; color: #1a1a1a;
    font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer;
  }

  /* ---- sort: sheet from the bottom ---- */
  .zb-clp__filter--sort .zb-clp__dropdown {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; min-width: 0; width: 100%;
    max-height: 75vh; overflow-y: auto; overscroll-behavior: contain;
    border: 0; border-radius: 18px 18px 0 0; padding: 0 20px calc(20px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18); z-index: 330;
  }
  .zb-clp__filter--sort.is-open .zb-clp__dropdown { animation: zbSheetUp 0.25s ease-out; }
  .zb-clp__sheet-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: #fff;
    padding: 16px 0 12px; margin-bottom: 8px; border-bottom: 1px solid #eee;
    font-family: 'Inter', sans-serif; font-size: 15px; font-weight: 700; color: #1a1a1a;
  }
  .zb-clp__sheet-close {
    width: 36px; height: 36px; margin-right: -8px; border: 0; border-radius: 50%; background: #f3f3f3; color: #1a1a1a;
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
  }
  .zb-clp__sort-opt { padding: 13px 4px; font-size: 14.5px; }

  .zb-clp__backdrop { display: block; position: fixed; inset: 0; z-index: 320; background: rgba(0, 0, 0, 0.4); touch-action: none; }
  .zb-clp__backdrop[hidden] { display: none; }
  body.zb-clp-sheet-open { overflow: hidden; }
}
@keyframes zbSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }