*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black:       #0e0e0e;
  --near-black:  #141414;
  --dark:        #1c1c1c;
  --mid:         #333;
  --gray-dark:   #555;
  --gray-mid:    #888;
  --gray-light:  #bbb;
  --border:      #e0ddd8;
  --bg-page:     #ffffff;
  --bg-light:    #f7f6f3;
  --accent:      #c8a96e;
  --accent-dim:  rgba(200,169,110,0.12);
  --font:        'Montserrat', sans-serif;
  --sidebar-w:   252px;
}

html { font-size: 14px; }

body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--black);
  font-weight: 300;
  overflow-x: hidden;
}

/* ── SELECTOR HEADER ── */
.sel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 52px;
  background: var(--black);
  border-bottom: 0.5px solid rgba(255,255,255,0.07);
}

.sel-logo {
  font-size: 13px;
  font-weight: 200;
  letter-spacing: 0.28em;
  color: #fff;
  text-transform: uppercase;
  text-decoration: none;
}
.sel-logo span { color: var(--accent); }

.sel-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: lowercase;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  transition: color 0.2s;
}
.sel-back:hover { color: rgba(255,255,255,0.8); }
.sel-back svg { width: 12px; height: 12px; stroke: currentColor; fill: none; }

/* ── PAGE TITLE + SEARCH ── */
.sel-top {
  padding: 28px 32px 0;
  background: var(--bg-page);
}

.sel-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-bottom: 18px;
  line-height: 1;
}
.sel-title span {
  font-weight: 200;
  color: var(--gray-mid);
  margin-left: 6px;
}

.sel-search {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 0;
}
.sel-search svg { width: 15px; height: 15px; stroke: var(--gray-mid); fill: none; flex-shrink: 0; }
.sel-search input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--black);
  background: transparent;
}
.sel-search input::placeholder { color: var(--gray-light); }

/* ── CATEGORY TABS ── */
.cat-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 32px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
  flex-wrap: wrap;
}

.cat-tab {
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: lowercase;
  color: var(--gray-mid);
  padding: 8px 14px 10px;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}
.cat-tab:hover { color: var(--black); }
.cat-tab.active {
  color: var(--black);
  font-weight: 500;
}
.cat-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px;
  background: var(--black);
}

/* ── ACTIVE FILTERS STRIP ── */
.filter-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 32px;
  background: var(--bg-light);
  border-bottom: 0.5px solid var(--border);
  flex-wrap: wrap;
  min-height: 42px;
}

.filter-clear {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: lowercase;
  color: var(--gray-dark);
  background: transparent;
  border: 0.5px solid var(--border);
  padding: 4px 12px;
  cursor: pointer;
  font-family: var(--font);
  font-weight: 400;
  transition: background 0.2s, color 0.2s;
}
.filter-clear:hover { background: var(--black); color: #fff; border-color: var(--black); }
.filter-clear.hidden { display: none; }

.filter-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--black);
  background: #fff;
  border: 0.5px solid var(--border);
  padding: 4px 10px 4px 12px;
  font-weight: 400;
}
.filter-chip button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--gray-mid);
  line-height: 1;
  padding: 0;
  transition: color 0.15s;
}
.filter-chip button:hover { color: var(--black); }

.filter-count {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gray-mid);
  margin-left: auto;
  font-weight: 400;
  flex-shrink: 0;
}

/* ── MAIN LAYOUT ── */
.sel-body {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: calc(100vh - 180px);
}

/* ── SIDEBAR ── */
.sidebar {
  border-right: 0.5px solid var(--border);
  padding: 20px 0;
  background: var(--bg-page);
  position: sticky;
  top: 0;
  height: calc(100vh - 180px);
  overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 3px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); }

/* Filter group */
.filter-group {
  border-bottom: 0.5px solid var(--border);
}

.filter-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  font-family: var(--font);
  transition: background 0.15s;
}
.filter-group-head:hover { background: var(--bg-light); }

.filter-group-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: var(--black);
  text-transform: lowercase;
  text-align: left;
}

.filter-group-arrow {
  width: 14px; height: 14px;
  stroke: var(--gray-mid);
  fill: none;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.filter-group.open .filter-group-arrow { transform: rotate(180deg); }

.filter-group-body {
  display: none;
  padding: 4px 20px 14px;
}
.filter-group.open .filter-group-body { display: block; }

/* Dropdown select */
.filter-select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 0.5px solid var(--border);
  padding: 7px 0;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--gray-mid);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 18px;
}
.filter-select:focus { border-bottom-color: var(--accent); color: var(--black); }

/* Range slider */
.range-wrap { padding: 6px 0 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--gray-light); margin-bottom: 8px; letter-spacing: 0.06em; }
.range-slider {
  width: 100%;
  height: 2px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--accent) 0%, var(--accent) 40%, var(--border) 40%, var(--border) 100%);
  outline: none;
  cursor: pointer;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--black);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--black);
  cursor: pointer;
}
.range-value { font-size: 10px; color: var(--black); font-weight: 400; margin-top: 6px; letter-spacing: 0.08em; }

/* Checkbox filters */
.filter-checks { display: flex; flex-direction: column; gap: 8px; }
.filter-check-item { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.filter-check-item input[type="checkbox"] {
  width: 12px; height: 12px;
  accent-color: var(--black);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-check-label {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.07em;
  color: var(--gray-dark);
  text-transform: lowercase;
}
.filter-check-count {
  margin-left: auto;
  font-size: 10px;
  color: var(--gray-light);
  font-weight: 300;
}

/* Accordion (collapsed group headers, no body shown initially) */
.filter-accordion .filter-group-label { color: var(--gray-mid); font-weight: 300; }

/* ── PRODUCT GRID ── */
.grid-area { background: var(--bg-page); }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: #d8d5d0;
}

.product-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark);
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.82) 0%, rgba(10,10,10,0.2) 40%, transparent 65%);
  transition: opacity 0.3s;
}

.product-card:hover::after { opacity: 0.6; }

.pc-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .pc-img { transform: scale(1.04); }

/* placeholder bg for prototype */
.pc-ph {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
}
.product-card:hover .pc-ph { transform: scale(1.04); }
.pc-ph svg { width: 36px; height: 36px; stroke: rgba(255,255,255,0.08); fill: none; }

.product-card .pc-label {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 16px;
  z-index: 2;
}

.pc-line {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: lowercase;
  color: var(--accent);
  font-weight: 400;
  margin-bottom: 3px;
}

.pc-name {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.07em;
  text-transform: lowercase;
  color: rgba(255,255,255,0.9);
  line-height: 1.2;
}

.pc-desc {
  font-size: 10px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  margin-top: 6px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s, opacity 0.35s;
  opacity: 0;
}
.product-card:hover .pc-desc {
  max-height: 80px;
  opacity: 1;
}

/* Product images via CSS backgrounds for prototype */
.bg-1  { background: url('https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=500&q=75') center/cover; }
.bg-2  { background: url('https://images.unsplash.com/photo-1565814329452-e1efa11c5b89?w=500&q=75') center/cover; }
.bg-3  { background: url('https://images.unsplash.com/photo-1567016432779-094069958ea5?w=500&q=75') center/cover; }
.bg-4  { background: url('https://images.unsplash.com/photo-1604014237800-1c9102c219da?w=500&q=75') center/cover; }
.bg-5  { background: url('https://images.unsplash.com/photo-1616594039964-ae9021a400a0?w=500&q=75') center/cover; }
.bg-6  { background: url('https://images.unsplash.com/photo-1555041469-a586c61ea9bc?w=500&q=75') center/cover; }
.bg-7  { background: url('https://images.unsplash.com/photo-1497366754035-f200968a6e72?w=500&q=75') center/cover; }
.bg-8  { background: url('https://images.unsplash.com/photo-1578898887932-dce23a595ad4?w=500&q=75') center/cover; }
.bg-9  { background: url('https://images.unsplash.com/photo-1497366216548-37526070297c?w=500&q=75') center/cover; }
.bg-10 { background: url('https://images.unsplash.com/photo-1568605114967-8130f3a36994?w=500&q=75') center/cover; }
.bg-11 { background: url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=500&q=75') center/cover; }
.bg-12 { background: url('https://images.unsplash.com/photo-1586023492125-27b2c045efd7?w=500&q=75') center/cover; }

.no-results {
  display: none;
  grid-column: 1 / -1;
  padding: 80px 40px;
  text-align: center;
  background: var(--bg-page);
}
.no-results p { font-size: 13px; font-weight: 300; color: var(--gray-mid); letter-spacing: 0.08em; }

/* ── UTILITY ── */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
