/* ============================================================================
   Shop Page — Sidebar Filters + Product Grid
   ============================================================================ */

.shop-section { padding: 40px 0 80px; }
.shop-header { margin-bottom: 32px; }
.shop-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 600;
}
.shop-header .result-count { color: var(--text-dim); font-size: 14px; margin-top: 4px; }

/* Sort Bar */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.shop-toolbar select {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
}
.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: rgba(201, 168, 76, 0.15);
  border: 1px solid var(--gold-dark);
  color: var(--gold);
  font-size: 12px;
  border-radius: 100px;
}
.filter-tag button {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.clear-filters {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}
.clear-filters:hover { color: var(--gold); }

/* Sidebar */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  padding-right: 24px;
}
.filter-group { margin-bottom: 28px; }
.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.filter-group-header h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}
.filter-group-header .toggle {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.2s;
}
.filter-group.collapsed .toggle { transform: rotate(-90deg); }
.filter-group.collapsed .filter-options { display: none; }

.filter-options { display: flex; flex-direction: column; gap: 6px; }
.filter-options.scrollable { max-height: 240px; overflow-y: auto; padding-right: 4px; }
.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
  font-size: 14px;
  color: var(--text-dim);
  transition: color 0.2s;
}
.filter-option:hover { color: var(--text); }
.filter-option input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg3);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}
.filter-option input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
}
.filter-option input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 11px;
  color: var(--bg);
  font-weight: 700;
}
.filter-option .count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

/* Price range */
.price-range { padding: 8px 0; }
.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-inputs input {
  width: 80px;
  padding: 6px 8px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  font-size: 13px;
}
.price-inputs span { color: var(--text-muted); font-size: 13px; }
.price-go {
  padding: 6px 12px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.product-card:hover { border-color: var(--gold-dark); transform: translateY(-4px); box-shadow: var(--shadow); }
.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}
.product-img-wrap {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: var(--bg3);
}
.product-img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s;
}
.product-card:hover .product-img { transform: scale(1.08); }
.product-info { padding: 20px; }
.product-category {
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}
.product-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px;
  font-weight: 600;
  margin: 8px 0 4px;
}
.product-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.product-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}
.product-variants {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.variant-btn {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.variant-btn:hover { border-color: var(--gold); color: var(--gold); }
.variant-btn.active {
  background: rgba(201, 168, 76, 0.15);
  border-color: var(--gold);
  color: var(--gold);
  font-weight: 600;
}
.add-to-cart {
  width: 100%;
  padding: 12px;
  background: var(--gold);
  color: var(--bg);
  border: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}
.add-to-cart:hover { background: var(--gold-light); }
.add-to-cart.added { background: var(--success); color: white; }

/* No Results */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 0;
  color: var(--text-dim);
}
.no-results h3 { font-family: 'Playfair Display', serif; font-size: 24px; margin-bottom: 8px; color: var(--text); }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.page-btn {
  padding: 8px 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}
.page-btn:hover, .page-btn.active { border-color: var(--gold); color: var(--gold); }
.page-btn.active { background: rgba(201, 168, 76, 0.15); font-weight: 600; }

@media (max-width: 900px) {
  .page-layout { flex-direction: column; }
  .sidebar { width: 100%; padding-right: 0; }
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 16px;
    width: 100%;
  }
  .sidebar-filters { display: none; }
  .sidebar-filters.open { display: block; }
}
@media (min-width: 901px) {
  .sidebar-toggle-btn { display: none; }
}

/* Stock badges */
.product-badge.sold-out {
  background: var(--danger);
  color: white;
}
.product-badge.low-stock {
  background: #d4a017;
  color: var(--bg);
}
.product-card.sold-out {
  opacity: 0.7;
}
.product-card.sold-out .product-price {
  color: var(--text-muted);
  text-decoration: line-through;
}

/* Wishlist heart — shop cards */
.wishlist-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(0,0,0,0.5);
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.wishlist-btn:hover { color: #e74c3c; background: rgba(0,0,0,0.7); }
.wishlist-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wishlist-btn.active { color: #e74c3c; }

/* Wishlist heart — product detail page */
.wishlist-btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.wishlist-btn-detail:hover { border-color: #e74c3c; color: #e74c3c; }
.wishlist-btn-detail:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wishlist-btn-detail.active { border-color: #e74c3c; color: #e74c3c; }
