/* ===== PRODUCT SEARCH BAR ===== */
.product-search-wrap {
  position: relative;
  margin-bottom: 20px;
}

.product-search-input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--black);
  background: var(--white);
  border: 1.5px solid var(--g200);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none;
}

.product-search-input::placeholder {
  color: var(--g400);
}

.product-search-input:focus {
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}

.product-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--g400);
  pointer-events: none;
  display: flex;
  align-items: center;
}

.product-search-clear {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--g400);
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}
.product-search-clear:hover { color: var(--black); }
.product-search-clear.visible { display: flex; }

/* ===== CATALOGUE LAYOUT ===== */
.catalogue-page {
  background: var(--g100);
}

.catalogue-main {
  display: flex;
  max-width: 1440px;
  margin: 0 auto;
  padding: 48px 48px 80px;
  gap: 48px;
  align-items: flex-start;
}

/* ===== SIDEBAR ===== */
.sidebar {
  flex: 0 0 260px;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  background: var(--white);
  border: 1px solid var(--g200);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--g200) transparent;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid var(--g200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 2;
}

.sidebar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.clear-all-btn {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}
.clear-all-btn:hover { color: var(--black); }

/* ===== FILTER GROUPS ===== */
.filter-group {
  border-bottom: 1px solid var(--g200);
}

.filter-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  text-align: left;
}
.filter-group-header:hover { color: var(--g600); }

.chevron {
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
  color: var(--g400);
}
.filter-group.open .chevron { transform: rotate(180deg); }

.filter-group-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s var(--ease);
  padding: 0 24px;
}
.filter-group.open .filter-group-body {
  max-height: 1400px;
  padding: 4px 24px 20px;
}

/* ===== CHECKBOX ===== */
.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--g600);
  transition: color 0.2s;
}
.filter-checkbox:hover { color: var(--black); }

.filter-checkbox input[type="checkbox"] { display: none; }

.checkbox-box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--g400);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.filter-checkbox input:checked ~ .checkbox-box {
  background: var(--black);
  border-color: var(--black);
}
.filter-checkbox input:checked ~ .checkbox-box::after {
  content: '';
  display: block;
  width: 8px;
  height: 5px;
  border-left: 1.5px solid var(--white);
  border-bottom: 1.5px solid var(--white);
  transform: rotate(-45deg) translateY(-1px);
}
.filter-checkbox input:checked ~ span { color: var(--black); font-weight: 500; }

/* ===== MODEL BRAND GROUPS ===== */
.model-brand-group + .model-brand-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--g200);
}

.model-brand-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g400);
  margin-bottom: 2px;
  user-select: none;
}

.filter-count {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--g400);
  font-weight: 400;
}

/* ===== SIZE GRID ===== */
.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.size-btn {
  padding: 7px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1.5px solid var(--g200);
  background: var(--white);
  color: var(--g600);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  min-width: 40px;
  text-align: center;
}
.size-btn:hover { border-color: var(--black); color: var(--black); }
.size-btn.active { background: var(--black); border-color: var(--black); color: var(--white); }

/* ===== COLOR GRID ===== */
.color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0;
}

.color-swatch-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--g200);
  background: var(--c);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
}
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.active {
  border-color: var(--black);
  box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--black);
}

.color-swatch-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--g400);
  text-align: center;
  letter-spacing: 0.04em;
}

/* ===== PRICE RANGE ===== */
.price-range-wrap { padding: 8px 0; }

.price-slider-container {
  position: relative;
  height: 24px;
  margin-bottom: 12px;
}

.price-track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  height: 2px;
  background: var(--g200);
  border-radius: 1px;
}

.price-fill {
  position: absolute;
  height: 100%;
  background: var(--black);
  border-radius: 1px;
  transition: left 0.05s, width 0.05s;
}

.price-thumb {
  position: absolute;
  top: 0;
  width: 100%;
  height: 24px;
  appearance: none;
  background: transparent;
  pointer-events: none;
  outline: none;
}

.price-thumb::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
  transition: transform 0.15s;
}
.price-thumb::-webkit-slider-thumb:hover { transform: scale(1.15); }
.price-thumb::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
  pointer-events: auto;
  border: 2px solid var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.price-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--black);
}

/* ===== CATALOGUE CONTENT ===== */
.catalogue-content {
  flex: 1;
  min-width: 0;
}

/* ===== TOP BAR ===== */
.catalogue-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--black);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.2s;
  border: none;
}
.filter-chip:hover { background: var(--g600); }
.filter-chip-x { font-size: 0.85rem; line-height: 1; font-weight: 300; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.cat-count {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  white-space: nowrap;
}

.sort-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g400);
  white-space: nowrap;
}

.sort-select {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--g200);
  padding: 8px 32px 8px 12px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%23525250' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  outline: none;
  transition: border-color 0.2s;
}
.sort-select:focus { border-color: var(--black); }

/* ===== MOBILE PILLS BAR ===== */
.mobile-pills-bar {
  display: none;
}

/* ===== FILTER BOTTOM SHEET ===== */
.filter-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  backdrop-filter: blur(4px);
  z-index: 300;
  align-items: flex-end;
}
.filter-sheet-overlay.open { display: flex; }

.filter-sheet {
  background: var(--white);
  width: 100%;
  max-height: 82vh;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.38s var(--ease-out);
}
.filter-sheet-overlay.open .filter-sheet { transform: translateY(0); }

.filter-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--g200);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.filter-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--g200);
  flex-shrink: 0;
}
.filter-sheet-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: -0.01em;
}
.filter-sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--g100);
  color: var(--g600);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}
.filter-sheet-close:hover { background: var(--g200); }

.filter-sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}
.filter-sheet-body .filter-checkbox { padding: 10px 0; }
.filter-sheet-body .size-grid { gap: 8px; }
.filter-sheet-body .color-grid { padding: 4px 0; }

.filter-sheet-footer {
  padding: 14px 20px 20px;
  border-top: 1px solid var(--g200);
  flex-shrink: 0;
  background: var(--white);
}
.filter-sheet-apply {
  width: 100%;
  padding: 16px;
  background: var(--black);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.filter-sheet-apply:hover { opacity: 0.82; }

/* ===== MOBILE FILTER BTN ===== */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
  width: 100%;
  justify-content: center;
  border: none;
  cursor: pointer;
}

.mobile-filter-count {
  background: var(--white);
  color: var(--black);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== SIDEBAR OVERLAY (mobile) ===== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,10,10,0.5);
  z-index: 199;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

/* ===== NO RESULTS ===== */
.no-results {
  padding: 80px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.no-results p {
  font-family: 'Syne', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--g600);
}

/* Override grid for catalogue: 4 cols */
.catalogue-content .product-grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .catalogue-content .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .catalogue-main { padding: 20px 16px 60px; gap: 0; }

  .sidebar {
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    max-height: 100vh;
    width: min(300px, 88vw);
    z-index: 200;
    transform: translateX(-110%);
    transition: transform 0.4s var(--ease);
    border: none;
    border-right: 1px solid var(--g200);
    padding-top: calc(var(--header-h) + var(--announce));
  }
  .sidebar.open { transform: translateX(0); }

  .mobile-filter-btn { display: flex; border-radius: 12px; }
  .sidebar-header { position: static; }
  .catalogue-content .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  .catalogue-content .product-card {
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);
  }
  .catalogue-content .product-image-wrapper { border-radius: 18px 18px 0 0; }
  .catalogue-content .product-info { border: none; border-radius: 0 0 18px 18px; padding: 10px 12px 13px; }
  .catalogue-content .product-brand { font-size: 0.55rem; margin-bottom: 3px; }
  .catalogue-content .product-name { font-size: 0.8rem; }
  .catalogue-content .product-price { font-size: 0.8rem; }
  .catalogue-content .product-subtitle { font-size: 0.6rem; }
  .catalogue-content .product-meta { margin-top: 8px; padding-top: 8px; }
}

@media (max-width: 540px) {
  .catalogue-main { padding: 16px 12px 60px; }
  .catalogue-content .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .catalogue-topbar { flex-direction: column; gap: 12px; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .active-filters { order: 2; }
  .topbar-right { order: 1; }
}
