/* ============================================================
   sylvara CHARMS — shop.css  v1.0
   Dark silver luxury theme — all class names & JS hooks preserved
   ============================================================ */

/* ── PAGE HEADER ── */
.shop-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 36px var(--side-pad) 0;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.shop-header-eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--silver-dim);
  font-family: var(--f-body);
  margin-bottom: 8px;
}
.shop-page-header h1 {
  font-family: var(--f-display);
  font-size: 34px;
  font-weight: 500;
  color: var(--silver-bright);
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.shop-page-header p {
  font-size: 13px;
  color: var(--silver-dim);
  margin-top: 6px;
}

/* View toggle */
.shop-view-toggle {
  display: flex;
  gap: 4px;
}
.view-btn {
  width: 36px;
  height: 36px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--t);
}
.view-btn svg {
  width: 13px;
  height: 13px;
  stroke: var(--silver-dim);
  fill: none;
  stroke-width: 1.5;
}
.view-btn.active,
.view-btn:hover {
  background: var(--silver);
  border-color: var(--silver);
}
.view-btn.active svg,
.view-btn:hover svg {
  stroke: var(--black);
}

/* ── LAYOUT ── */
.shop-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  padding: 32px var(--side-pad) 80px;
  align-items: start;
}

/* ── SIDEBAR ── */
.shop-sidebar {
  position: sticky;
  top: 80px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 24px;
}

.sidebar-header {
  display: none; /* hidden on desktop, shown on mobile */
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  font-weight: 600;
  color: var(--silver-bright);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: var(--f-body);
}
.sidebar-close-btn {
  background: none;
  border: none;
  color: var(--silver-dim);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--t);
}
.sidebar-close-btn:hover {
  color: var(--silver);
}

.sidebar-section {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.sidebar-section h4 {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--silver-dim);
  font-family: var(--f-body);
}

.filter-check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--silver-dim);
  transition: color var(--t);
  user-select: none;
}
.filter-check:hover {
  color: var(--silver);
}
.filter-check input {
  accent-color: var(--silver);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 2px;
}

/* Category tree (dynamic categories + subcategories) */
.category-tree { display: flex; flex-direction: column; }
.filter-loading,
.filter-empty {
  font-size: 12px;
  color: var(--silver-mid);
  font-style: italic;
}
.cat-group { margin-bottom: 2px; }
.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.cat-row .filter-check { flex: 1; margin-bottom: 10px; }
.cat-toggle {
  background: none;
  border: none;
  color: var(--silver-mid);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
  margin-bottom: 10px;
  transform: rotate(90deg);
  transition: transform var(--t), color var(--t);
}
.cat-toggle:hover { color: var(--silver); }
.cat-group.expanded .cat-toggle { transform: rotate(270deg); }
.cat-subs {
  display: none;
  flex-direction: column;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  margin: 0 0 8px 2px;
}
.cat-group.expanded .cat-subs { display: flex; }
.sub-check { font-size: 12px; }

/* Price range */
.price-range-wrap input[type="range"] {
  width: 100%;
  accent-color: var(--silver);
  cursor: pointer;
  margin-bottom: 10px;
  background: transparent;
}
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--silver-mid);
  font-weight: 500;
  font-family: var(--f-body);
}

/* Sidebar select */
.sidebar-select {
  width: 100%;
  padding: 10px 32px 10px 12px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--silver-mid);
  font-family: var(--f-body);
  font-size: 13px;
  outline: none;
  appearance: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C6C6C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  transition: border-color var(--t);
}
.sidebar-select option {
  background: var(--surface-2);
}
.sidebar-select:focus {
  border-color: var(--silver-dark);
}

/* Clear button */
.sidebar-clear-btn {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--silver-dim);
  font-family: var(--f-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition:
    color var(--t),
    border-color var(--t);
}
.sidebar-clear-btn:hover {
  color: var(--silver);
  border-color: var(--silver-dark);
}

/* ── ACTIVE FILTERS STRIP ── */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 20px;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  padding: 4px 12px;
  font-size: 12px;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--silver-mid);
}
.filter-tag button {
  background: none;
  border: none;
  font-size: 14px;
  line-height: 1;
  color: var(--silver-dim);
  padding: 0;
  cursor: pointer;
  transition: color var(--t);
}
.filter-tag button:hover {
  color: var(--badge-red);
}

/* ── MOBILE FILTER BAR ── */
.mobile-filter-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 10px;
}
.mobile-filter-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border-light);
  color: var(--silver-mid);
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition:
    color var(--t),
    border-color var(--t);
}
.mobile-filter-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}
.mobile-filter-btn:hover {
  color: var(--silver);
  border-color: var(--silver-dark);
}

.filter-select-mobile {
  padding: 9px 28px 9px 12px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  color: var(--silver-mid);
  font-family: var(--f-body);
  font-size: 13px;
  outline: none;
  appearance: none;
  border-radius: var(--r-sm);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236C6C6C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
.filter-select-mobile option {
  background: var(--surface-2);
}

/* ── PRODUCT GRID ── */
.shop-main {
  min-width: 0;
}
.products-grid {
  display: grid;
  gap: 20px;
}
.shop-grid[data-cols="4"] {
  grid-template-columns: repeat(4, 1fr);
}
.shop-grid[data-cols="2"] {
  grid-template-columns: repeat(2, 1fr);
}

/* product-card-skeleton for loading state */
.product-card-skeleton {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  animation: shimmer 1.5s infinite;
  background: linear-gradient(
    90deg,
    var(--surface-2) 25%,
    var(--surface-3) 50%,
    var(--surface-2) 75%
  );
  background-size: 200% 100%;
}

/* ── NO PRODUCTS ── */
.no-products {
  text-align: center;
  padding: 80px 20px;
  color: var(--silver-dim);
}
.no-products svg {
  width: 48px;
  height: 48px;
  stroke: var(--border-light);
  fill: none;
  stroke-width: 1.5;
  margin: 0 auto 20px;
  display: block;
}
.no-products h3 {
  font-family: var(--f-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--silver-mid);
  margin-bottom: 10px;
}
.no-products p {
  font-size: 14px;
  color: var(--silver-dim);
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.page-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-light);
  background: var(--surface-2);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: var(--f-body);
  cursor: pointer;
  font-weight: 500;
  color: var(--silver-dim);
  transition: all var(--t);
}
.page-btn:hover {
  color: var(--silver);
  border-color: var(--silver-dark);
  background: var(--surface-3);
}
.page-btn.active {
  background: var(--silver);
  color: var(--black);
  border-color: var(--silver);
}

/* ── BTN SHARED (used by shop.js clearFilters etc) ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: var(--r-sm);
  transition: all var(--t);
}
.btn-dark {
  background: var(--silver);
  color: var(--black);
}
.btn-dark:hover {
  background: var(--silver-bright);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--silver-dim);
}
.btn-outline:hover {
  color: var(--silver);
  border-color: var(--silver-dark);
}
.btn-block {
  display: flex;
  width: 100%;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 11px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .shop-page-header {
    padding: 28px 32px 20px;
  }
  .shop-layout {
    padding: 24px 32px 64px;
  }
  .shop-grid[data-cols="4"] {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .shop-layout {
    grid-template-columns: 1fr;
  }

  /* Sidebar becomes a drawer on mobile */
  .shop-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100%;
    background: var(--surface);
    z-index: 400;
    padding: 24px;
    overflow-y: auto;
    box-shadow: var(--sh-lg);
    border-right: 1px solid var(--border);
    border-radius: 0;
  }
  .shop-sidebar.open {
    display: block;
  }
  .sidebar-header {
    display: flex;
  }

  .mobile-filter-bar {
    display: flex;
  }
  .shop-page-header {
    padding: 20px 20px 16px;
  }
  .shop-layout {
    padding: 16px 20px 52px;
    gap: 16px;
  }
  .shop-grid[data-cols="4"],
  .shop-grid[data-cols="2"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .shop-grid[data-cols="4"],
  .shop-grid[data-cols="2"] {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .shop-page-header h1 {
    font-size: 24px;
  }
  .shop-view-toggle {
    display: none;
  }
}

@media (max-width: 600px) {
  .shop-page-header {
    padding: 16px 16px 14px;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .shop-page-header h1 {
    font-size: 22px;
  }
  .shop-view-toggle {
    display: none;
  }
  .shop-layout {
    padding: 12px 16px 40px;
    gap: 12px;
  }
  .shop-grid[data-cols="4"],
  .shop-grid[data-cols="2"] {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .mobile-filter-btn {
    font-size: 11px;
    padding: 8px 12px;
  }
  .sidebar-section h4 {
    font-size: 9px;
  }
  .filter-check {
    font-size: 12px;
  }
}

/* ── SIDEBAR MOBILE OVERLAY BACKDROP ── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 399;
}
.sidebar-backdrop.visible {
  display: block;
}

/* ── FOOTER LOGO IMAGE SIZE ── */
.footer-logo-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}
