/* ====================================================
   MOBIDIK — Catalog page styles
   (loads after home.css, reuses tokens + header/footer/product)
   ==================================================== */

/* ============== BREADCRUMBS ============== */
.breadcrumbs {
  background: var(--dark-base);
  color: var(--dark-muted);
  border-bottom: 1px solid var(--dark-border);
  font-size: 12px;
}
.breadcrumbs__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 10px var(--gutter);
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumbs a { color: var(--dark-muted); }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { color: #444; }
.breadcrumbs .cur { color: #fff; }

/* ============== CATEGORY COVER (dark) ============== */
.cat-cover {
  background: var(--dark-base);
  color: #fff;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--dark-border);
}
.cat-cover__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 32px var(--gutter) 28px;
  position: relative;
  z-index: 2;
}
.cat-cover__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
}
.cat-cover__left .eyebrow {
  color: var(--red);
  display: inline-flex; align-items: center; gap: 10px;
}
.cat-cover__left .eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--red);
}
.cat-cover__title {
  font-family: var(--headline);
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -1.4px;
  text-transform: uppercase;
  line-height: 0.95;
  margin: 14px 0 8px;
}
.cat-cover__sub {
  font-size: 14px;
  color: var(--dark-muted);
}
.cat-cover__sub b { color: #fff; font-weight: 600; }
.cat-cover__stats {
  display: flex;
  gap: 36px;
  margin-bottom: 6px;
}
.cat-cover__stat .k {
  font: 500 10px/1 var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dark-muted);
}
.cat-cover__stat .v {
  font-family: var(--headline);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.3px;
  margin-top: 8px;
}
.cat-cover__stat .v .red { color: var(--red); }

.cat-cover__brands {
  display: flex;
  gap: 8px;
  margin-top: 24px;
}
.cat-cover__brand {
  flex: 1;
  border: 1px solid var(--dark-border);
  background: rgba(255,255,255,.02);
  border-radius: var(--r-btn);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 120ms ease, background 120ms ease;
  cursor: pointer;
}
.cat-cover__brand:hover { border-color: #fff; background: rgba(255,255,255,.05); }
.cat-cover__brand.is-active { border-color: var(--red); background: rgba(227,30,36,.08); }
.cat-cover__brand .name {
  font-family: var(--headline);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.2px;
  text-transform: uppercase;
  color: #fff;
}
.cat-cover__brand .count {
  font: 500 11px/1 var(--mono);
  color: var(--dark-muted);
  letter-spacing: 0.5px;
}

.cat-cover__shards {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* ============== MAIN LAYOUT ============== */
.catalog {
  background: var(--light-bg);
  padding: 24px 0 64px;
}
.catalog__inner {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}

/* ============== FILTERS PANEL ============== */
.filters {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-card);
  padding: 16px;
  position: sticky;
  top: 140px; /* header height with nav */
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: #ddd; border-radius: 3px; }

.filter-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--light-border);
}
.filter-group:first-child { padding-top: 4px; }
.filter-group:last-child { border-bottom: 0; padding-bottom: 4px; }

.filter-group__head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 0 0 12px;
  font: 600 12px/1 var(--body);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--light-text);
}
.filter-group__head .small {
  font: 500 11px/1 var(--body);
  color: var(--light-muted);
  letter-spacing: 0;
  text-transform: none;
}

/* in-stock toggle */
.stock-toggle {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
}
.switch {
  position: relative;
  width: 40px; height: 22px;
  flex: none;
  background: #ddd;
  border-radius: 999px;
  cursor: pointer;
  transition: background 140ms ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 140ms ease;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.is-on { background: var(--red); }
.switch.is-on::after { transform: translateX(18px); }
.stock-toggle__body .title {
  font: 700 14px/1.2 var(--body);
  color: var(--light-text);
}
.stock-toggle__body .sub {
  font: 500 12px/1 var(--body);
  color: var(--light-muted);
  margin-top: 4px;
}

/* price range */
.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.price-inputs label {
  display: flex; flex-direction: column;
  font: 500 10px/1 var(--mono);
  color: var(--light-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.price-inputs input {
  margin-top: 4px;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  padding: 9px 10px;
  font: 600 13px/1 var(--body);
  color: var(--light-text);
  outline: 0;
  background: #fff;
}
.price-inputs input:focus { border-color: var(--light-text); }

.histo {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
  margin-bottom: 6px;
}
.histo .bar {
  flex: 1;
  background: #d8d8d8;
  border-radius: 1px;
  transition: background 120ms ease;
}
.histo .bar.in { background: var(--red); }

.range {
  position: relative;
  height: 18px;
  margin: 0 6px 4px;
}
.range__track {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 3px;
  transform: translateY(-50%);
  background: #e5e5e5;
  border-radius: 2px;
}
.range__active {
  position: absolute;
  top: 50%;
  height: 3px;
  transform: translateY(-50%);
  background: var(--red);
  border-radius: 2px;
}
.range__handle {
  position: absolute;
  top: 50%;
  width: 16px; height: 16px;
  background: #fff;
  border: 2px solid var(--red);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  cursor: grab;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.range__handle:active { cursor: grabbing; }

/* installment block (highlighted) */
.installment-block {
  background: var(--red-soft);
  border-radius: var(--r-btn);
  padding: 14px;
  margin: 4px 0;
}
.installment-block .head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
  font: 700 12px/1 var(--body);
  color: var(--red-hover);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.installment-block .head svg {
  width: 14px; height: 14px;
  color: var(--red);
}
.installment-block .price-inputs input {
  border-color: rgba(183,28,32,.25);
  background: #fff;
}
.installment-block .price-inputs input:focus { border-color: var(--red); }
.installment-block .price-inputs label { color: var(--red-hover); }
.installment-block .sub {
  font: 500 11px/1.3 var(--body);
  color: var(--red-hover);
  margin-top: 6px;
}

/* checkboxes */
.check-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font: 500 13px/1 var(--body);
  color: var(--light-text);
}
.check__box {
  width: 18px; height: 18px;
  border: 1.5px solid #c8c8c8;
  border-radius: 4px;
  flex: none;
  display: grid;
  place-items: center;
  background: #fff;
  transition: border-color 120ms ease, background 120ms ease;
}
.check__box svg {
  width: 12px; height: 12px;
  color: #fff;
  opacity: 0;
}
.check.is-on .check__box {
  border-color: var(--red);
  background: var(--red);
}
.check.is-on .check__box svg { opacity: 1; }
.check:hover .check__box { border-color: var(--light-text); }
.check.is-on:hover .check__box { border-color: var(--red); }
.check__label {
  flex: 1;
  display: flex; justify-content: space-between; gap: 8px;
}
.check__count {
  color: var(--light-muted);
  font-weight: 500;
}
.check-more {
  background: none;
  border: 0;
  padding: 8px 0 0;
  color: var(--red);
  font: 700 12px/1 var(--body);
  cursor: pointer;
  text-align: left;
}
.check-more:hover { color: var(--red-hover); }

/* chips */
.chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.chip-filter {
  background: #fff;
  border: 1px solid var(--light-border);
  color: var(--light-text);
  border-radius: 999px;
  padding: 7px 12px;
  font: 600 12px/1 var(--body);
  cursor: pointer;
  transition: all 120ms ease;
}
.chip-filter:hover { border-color: var(--light-text); }
.chip-filter.is-on { background: var(--red); border-color: var(--red); color: #fff; }

/* color circles */
.colors {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.color-swatch {
  width: 26px; height: 26px;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: inset 0 0 0 2px #fff;
  transition: transform 120ms ease;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.is-on {
  border: 2px solid var(--red);
  box-shadow: inset 0 0 0 2px #fff;
}

/* filter footer buttons */
.filters__footer {
  position: sticky;
  bottom: -16px;
  background: #fff;
  margin: 4px -16px -16px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--light-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.filters__footer .btn {
  width: 100%;
  justify-content: center;
}

/* ============== TOP SORT BAR ============== */
.toolbar {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-card);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  position: sticky;
  top: 140px;
  z-index: 20;
}
.toolbar__count {
  font: 500 13px/1 var(--body);
  color: var(--light-text);
}
.toolbar__count b { font-weight: 700; }
.toolbar__chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1;
}
.active-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red-soft);
  color: var(--red-hover);
  border-radius: 999px;
  padding: 6px 10px;
  font: 600 12px/1 var(--body);
  cursor: pointer;
  border: 0;
}
.active-chip svg {
  width: 10px; height: 10px;
}
.active-chip:hover { background: #ffd4d7; }

.toolbar__sort {
  position: relative;
}
.sort-btn {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  padding: 10px 14px;
  font: 600 13px/1 var(--body);
  color: var(--light-text);
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.sort-btn:hover { border-color: var(--light-text); }
.sort-btn .chev { width: 12px; height: 12px; transition: transform 140ms ease; }
.sort-btn.is-open .chev { transform: rotate(180deg); }
.sort-btn .label-muted {
  color: var(--light-muted);
  font-weight: 500;
}
.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  min-width: 240px;
  z-index: 30;
  display: none;
  padding: 6px;
}
.sort-menu.is-open { display: block; }
.sort-menu button {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%;
  background: none;
  border: 0;
  padding: 10px 12px;
  text-align: left;
  font: 500 13px/1 var(--body);
  color: var(--light-text);
  border-radius: 6px;
  cursor: pointer;
}
.sort-menu button:hover { background: var(--light-bg); }
.sort-menu button.is-on {
  background: var(--red-soft);
  color: var(--red-hover);
  font-weight: 700;
}
.sort-menu button svg { width: 14px; height: 14px; color: var(--red); opacity: 0; }
.sort-menu button.is-on svg { opacity: 1; }

.toolbar__view {
  display: flex; gap: 2px;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  padding: 2px;
}
.toolbar__view button {
  width: 32px; height: 32px;
  background: none;
  border: 0;
  border-radius: 6px;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--light-muted);
}
.toolbar__view button.is-on {
  background: var(--light-text);
  color: #fff;
}
.toolbar__view svg { width: 16px; height: 16px; }

/* ============== PRODUCTS GRID ============== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}

/* product cards reuse .product from home.css with minor tweaks */
.catalog-grid .product__name { min-height: 2.7em; }
.catalog-grid .product__stock {
  font: 500 12px/1 var(--body);
  color: var(--light-muted);
  margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.catalog-grid .product__stock .product__dot.amber { background: var(--amber); }

/* ============== INLINE PROMO STRIP ============== */
.inline-promo {
  grid-column: 1 / -1;
  background: var(--dark-base);
  color: #fff;
  border-radius: var(--r-card);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  min-height: 140px;
}
.inline-promo h3 {
  font-family: var(--headline);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.6px;
  text-transform: uppercase;
  margin: 0;
}
.inline-promo h3 .accent { color: var(--red); }
.inline-promo .sub {
  font-size: 13px;
  color: var(--dark-muted);
  margin-top: 6px;
  display: flex; gap: 16px;
  align-items: center;
}
.inline-promo .sub li {
  display: inline-flex; align-items: center; gap: 6px;
  list-style: none;
}
.inline-promo .sub svg { width: 14px; height: 14px; color: var(--red); }
.inline-promo .sub ul { display: flex; gap: 16px; margin: 0; padding: 0; }
.inline-promo__shard {
  position: absolute;
  right: 25%; top: -30px;
  width: 180px;
  opacity: .2;
  pointer-events: none;
}
.inline-promo__mascot {
  position: absolute;
  right: -90px; bottom: -50px;
  height: 220px;
  opacity: .12;
  pointer-events: none;
}

/* ============== PAGINATION ============== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}
.pagination__pages {
  display: flex;
  gap: 6px;
  margin: 0 auto;
}
.page-btn {
  min-width: 40px; height: 40px;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  font: 700 13px/1 var(--body);
  color: var(--light-text);
  cursor: pointer;
  padding: 0 12px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all 120ms ease;
}
.page-btn:hover { border-color: var(--light-text); }
.page-btn.is-current {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.page-btn.is-disabled {
  color: var(--light-muted);
  cursor: not-allowed;
  opacity: .5;
}
.page-btn svg { width: 12px; height: 12px; }
.page-dots {
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  color: var(--light-muted);
}

.show-more {
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-btn);
  padding: 10px 16px;
  font: 600 13px/1 var(--body);
  color: var(--light-text);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.show-more:hover { border-color: var(--light-text); }

/* ============== SEO TEXT ============== */
.seo {
  margin-top: 48px;
  background: #fff;
  border: 1px solid var(--light-border);
  border-radius: var(--r-card);
  padding: 28px 32px;
}
.seo h3 {
  font-family: var(--headline);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.4px;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.seo__body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--light-muted);
  max-height: 6.4em;
  overflow: hidden;
  position: relative;
  transition: max-height 280ms ease;
  text-wrap: pretty;
}
.seo__body.is-open { max-height: 1200px; }
.seo__body::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 80%);
  pointer-events: none;
  transition: opacity 200ms ease;
}
.seo__body.is-open::after { opacity: 0; }
.seo__body p { margin: 0 0 12px; }
.seo__body p:last-child { margin-bottom: 0; }
.seo__toggle {
  margin-top: 14px;
  background: none;
  border: 0;
  color: var(--red);
  font: 700 13px/1 var(--body);
  cursor: pointer;
  padding: 6px 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.seo__toggle:hover { color: var(--red-hover); }
.seo__toggle svg { width: 12px; height: 12px; transition: transform 200ms ease; }
.seo__toggle.is-open svg { transform: rotate(180deg); }
