.catalog-page { background: #fff; }

.catalog-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.catalog-navbar {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr minmax(320px, 560px) 1fr;
  align-items: center;
  gap: 26px;
  padding: 0 3vw;
}
.catalog-search {
  height: 38px;
  display: grid;
  grid-template-columns: 1fr 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f8f6;
}
.catalog-search input {
  min-width: 0;
  padding: 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
}
.catalog-search button,
.catalog-actions button,
.catalog-actions a {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
}
.catalog-search svg,
.catalog-actions svg { width: 19px; height: 19px; stroke-width: 1.8; }
.catalog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.catalog-actions button,
.catalog-actions a {
  position: relative;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}
.catalog-actions button:hover,
.catalog-actions a:hover { background: var(--surface); }
.catalog-bag span {
  position: absolute;
  top: -1px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  padding: 0 4px;
  color: #fff;
  border-radius: 999px;
  background: #111;
  font-size: 9px;
  font-weight: 700;
}

.catalog-intro,
.catalog-content {
  width: min(1680px, calc(100% - 48px));
  margin: 0 auto;
}
.catalog-intro { padding: 32px 0 54px; }
.catalog-breadcrumb { display: flex; align-items: center; gap: 9px; color: #888; font-size: 12px; }
.catalog-breadcrumb strong { color: #222; }
.catalog-title {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  align-items: end;
  gap: 50px;
  margin-top: 62px;
}
.catalog-title .eyebrow { display: block; margin-bottom: 12px; color: #999; }
.catalog-title h1 { margin: 0; font-size: clamp(54px, 7vw, 108px); font-weight: 500; line-height: .88; }
.catalog-title p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.65; }

.catalog-content { padding-bottom: 100px; }
.catalog-toolbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.catalog-toolbar-summary { display: flex; align-items: baseline; gap: 6px; }
.catalog-toolbar-summary strong { font-size: 20px; }
.catalog-toolbar-summary span { color: #777; font-size: 13px; }
.catalog-sort-wrap { display: flex; align-items: center; gap: 10px; }
.catalog-sort-wrap label { color: #777; font-size: 12px; }
.catalog-sort-wrap select {
  height: 38px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  outline: 0;
  background: #fff;
}
.catalog-filter-toggle {
  height: 38px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-weight: 600;
}
.catalog-filter-toggle svg { width: 17px; height: 17px; }

.catalog-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  align-items: start;
  gap: clamp(30px, 3vw, 54px);
  padding-top: 32px;
}
.catalog-sidebar {
  position: sticky;
  top: 94px;
  max-height: calc(100vh - 116px);
  padding-right: 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.catalog-sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}
.catalog-sidebar-head span { display: block; margin-bottom: 5px; color: #888; font-size: 11px; text-transform: uppercase; }
.catalog-sidebar-head strong { font-size: 16px; font-weight: 600; }
.catalog-sidebar-head button {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
}
.catalog-sidebar-head svg { width: 17px; height: 17px; }
.filter-section { padding: 22px 0; border-top: 1px solid var(--line); }
.filter-section h2 { margin: 0 0 14px; font-size: 14px; font-weight: 600; }
.catalog-group-filters,
.catalog-type-filters,
.catalog-size-filters,
.catalog-color-filters,
.catalog-status-filters {
  display: grid;
  gap: 3px;
}
.catalog-group-filters button,
.catalog-type-filters button,
.catalog-color-filters button,
.catalog-status-filters label {
  width: 100%;
  min-height: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  color: #666;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 13px;
}
.catalog-group-filters button,
.catalog-type-filters button,
.catalog-color-filters button,
.catalog-status-filters label { cursor: pointer; }
.catalog-group-filters button:hover,
.catalog-type-filters button:hover,
.catalog-color-filters button:hover { color: #111; }
.catalog-group-filters button.active,
.catalog-type-filters button.active,
.catalog-color-filters button.active { color: #111; font-weight: 600; }
.catalog-group-filters b,
.catalog-type-filters b,
.catalog-color-filters b,
.catalog-status-filters b {
  color: #999;
  font-size: 11px;
  font-weight: 500;
}
.catalog-color-filters button { grid-template-columns: 22px minmax(0, 1fr) auto; }
.catalog-color-filters i {
  width: 16px;
  height: 16px;
  display: block;
  border: 1px solid rgba(17,17,17,.12);
  border-radius: 50%;
  background: var(--filter-color);
}
.catalog-color-filters button.active i { outline: 2px solid #111; outline-offset: 2px; }
.catalog-status-filters label { grid-template-columns: 18px minmax(0, 1fr) auto; }
.catalog-status-filters input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #111;
}
.catalog-price-filters { display: grid; gap: 12px; padding: 2px 2px 4px; }
.price-slider-values {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 7px;
}
.price-slider-values output {
  min-height: 34px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
}
.price-slider-values span { color: #999; font-size: 10px; }
.price-slider-track {
  position: relative;
  height: 24px;
  margin: 2px 7px 0;
}
.price-slider-track::before,
.price-slider-track i {
  position: absolute;
  top: 11px;
  height: 3px;
  border-radius: 999px;
  content: "";
}
.price-slider-track::before { right: 0; left: 0; background: #dededb; }
.price-slider-track i {
  right: calc(100% - var(--price-end));
  left: var(--price-start);
  background: #111;
}
.price-slider-track input {
  position: absolute;
  z-index: 2;
  top: 2px;
  left: 0;
  width: 100%;
  height: 20px;
  margin: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
}
.price-slider-track input::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 1px #111;
  pointer-events: auto;
  appearance: none;
  -webkit-appearance: none;
}
.price-slider-track input::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 0 0 1px #111;
  pointer-events: auto;
}
.price-slider-limits { display: flex; justify-content: space-between; color: #999; font-size: 10px; }
.catalog-size-filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.catalog-size-filters button {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 0 10px;
  color: #555;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-size: 12px;
}
.catalog-size-filters button b {
  color: #999;
  font-size: 10px;
  font-weight: 500;
}
.catalog-size-filters button.active {
  color: #fff;
  border-color: #111;
  background: #111;
}
.catalog-size-filters button.active b { color: rgba(255,255,255,.62); }
.catalog-size-filters button:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.catalog-clear {
  padding: 0 0 3px;
  color: #555;
  border: 0;
  border-bottom: 1px solid #777;
  background: transparent;
  font-size: 12px;
}
.catalog-filter-backdrop { display: none; }

.catalog-results { min-width: 0; }
.catalog-active-row {
  min-height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}
.catalog-active-row p { flex: 0 0 auto; margin: 9px 0 0; color: #777; font-size: 12px; }
.catalog-active-row strong { color: #111; }
.catalog-active-filters {
  min-height: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}
.catalog-active-filters > span { color: #777; font-size: 12px; }
.catalog-active-filters button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8f8f6;
  font-size: 12px;
}
.catalog-active-filters svg { width: 14px; height: 14px; }

.all-product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 18px;
}
.all-product-grid .product-card { box-shadow: 0 10px 25px rgba(17,17,17,.045); }
.all-product-grid .product-meta { display: flex; justify-content: space-between; gap: 20px; }
.all-product-grid .product-size-options { padding-top: 14px; }
.product-stock {
  display: block;
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.35;
}
.product-stock.available { color: #397456; }
.product-stock.unavailable { color: #b44740; }
.add-button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.catalog-empty { padding: 90px 20px; text-align: center; }
.catalog-empty svg { width: 42px; height: 42px; color: #888; }
.catalog-empty h2 { margin: 18px 0 8px; font-size: 28px; font-weight: 500; }
.catalog-empty p { margin: 0; color: #777; }
.catalog-load-more { display: flex; justify-content: center; padding-top: 44px; }
.catalog-load-more button {
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid #111;
  border-radius: 999px;
  background: #fff;
  font-weight: 400;
}
.catalog-load-more button:hover { color: #fff; background: #111; }
.catalog-load-more button[hidden] { display: none; }

@media (max-width: 1180px) {
  .catalog-shell { grid-template-columns: 210px minmax(0, 1fr); gap: 28px; }
  .all-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .catalog-navbar { grid-template-columns: auto 1fr auto; padding: 0 20px; }
  .catalog-title { grid-template-columns: 1fr; gap: 24px; }
  .catalog-filter-toggle { display: inline-flex; }
  .catalog-shell { display: block; }
  .catalog-sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    width: min(360px, calc(100vw - 42px));
    max-height: 100vh;
    height: 100vh;
    padding: 24px;
    background: #fff;
    box-shadow: 20px 0 50px rgba(17,17,17,.18);
    transform: translateX(-105%);
    transition: transform .25s ease;
  }
  .catalog-sidebar.open { transform: translateX(0); }
  .catalog-sidebar-head button { display: grid; }
  .catalog-filter-backdrop {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: block;
    visibility: hidden;
    padding: 0;
    border: 0;
    background: rgba(17,17,17,.34);
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .filter-open { overflow: hidden; }
  .filter-open .catalog-filter-backdrop { visibility: visible; opacity: 1; }
}

@media (max-width: 640px) {
  .catalog-navbar { min-height: auto; grid-template-columns: 1fr auto; gap: 12px; padding: 13px 14px; }
  .catalog-search { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .catalog-actions button:first-child { display: none; }
  .catalog-intro,
  .catalog-content { width: calc(100% - 28px); }
  .catalog-intro { padding-top: 22px; padding-bottom: 36px; }
  .catalog-title { margin-top: 38px; }
  .catalog-title h1 { font-size: 54px; }
  .catalog-toolbar { align-items: flex-start; }
  .catalog-toolbar-summary { display: none; }
  .catalog-sort-wrap { width: 100%; justify-content: space-between; }
  .catalog-sort-wrap label { display: none; }
  .catalog-active-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .catalog-active-row p { margin-top: 0; }
  .all-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .all-product-grid .product-card { padding: 6px; }
  .all-product-grid .product-image > img { padding: 12px; }
  .all-product-grid .product-meta { min-height: 88px; display: block; padding: 9px 3px 0; }
  .all-product-grid .product-meta h3 { font-size: 14px; }
  .all-product-grid .product-meta p { font-size: 11px; }
  .all-product-grid .product-meta strong { display: block; margin-top: 7px; font-size: 12px; }
  .all-product-grid .product-swatches { gap: 4px; padding: 11px 3px 0; overflow: hidden; }
  .all-product-grid .product-swatches button { width: 14px; height: 14px; flex-basis: 14px; }
  .all-product-grid .product-size-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; padding: 10px 2px 0; }
  .all-product-grid .product-size-options button { min-height: 30px; font-size: 10px; }
  .all-product-grid .product-actions { grid-template-columns: 1fr; gap: 6px; padding: 12px 2px 2px; }
  .all-product-grid .detail-button,
  .all-product-grid .add-button,
  .all-product-grid .preorder-button { min-height: 40px; font-size: 11px; }
  .all-product-grid .heart { width: 32px; height: 32px; font-size: 19px; }
  .all-product-grid .badge { top: 9px; left: 9px; padding: 5px 7px; font-size: 9px; }
}
