/* ================================================
   SWARGRANI — Shop Page Styles
   ================================================ */

/* ——— Shop Header ——— */
.shop-hero {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-dark) 100%);
  padding: var(--space-3xl) 0 var(--space-2xl);
  border-bottom: 1px solid var(--border);
}

.shop-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 600;
  color: var(--black);
  margin-bottom: var(--space-sm);
}

.shop-hero-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ——— Shop Layout ——— */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-2xl);
  padding-top: var(--space-2xl);
  align-items: start;
}

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

/* ——— Sidebar / Filters ——— */
.shop-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
}

@media (max-width: 768px) {
  .shop-sidebar {
    position: fixed;
    inset: 0;
    z-index: 800;
    background: var(--white);
    padding: var(--space-2xl) var(--space-xl);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
  }
  .shop-sidebar.open { transform: translateX(0); }
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.filter-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.filter-reset {
  font-size: 0.75rem;
  color: var(--gold-dark);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.filter-group {
  border-bottom: 1px solid var(--cream-dark);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  margin-bottom: var(--space-md);
}

.filter-group-title {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--charcoal);
}

.filter-group-toggle {
  color: var(--text-muted);
  font-size: 0.75rem;
  transition: transform var(--transition-fast);
}

.filter-group.collapsed .filter-group-toggle { transform: rotate(-90deg); }
.filter-group.collapsed .filter-group-body { display: none; }

/* Filter Options */
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  cursor: pointer;
}

.filter-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--gray-light);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.625rem;
  color: transparent;
  transition: all var(--transition-fast);
  flex-shrink: 0;
  background: var(--white);
}

.filter-option input:checked + .filter-checkbox {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--white);
}

.filter-option input { position: absolute; opacity: 0; width: 0; height: 0; }

.filter-option-label {
  font-size: 0.875rem;
  color: var(--charcoal);
  flex: 1;
}

.filter-option-count {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Price Range */
.price-range {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.price-range-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--black);
  outline: none;
  transition: border-color var(--transition-fast);
}

.price-range-input:focus { border-color: var(--gold); }

/* Range Slider */
.range-slider-wrap { position: relative; padding: var(--space-md) 0; }
.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, var(--gold) 0%, var(--gold) var(--progress, 50%), var(--gray-light) var(--progress, 50%));
  border-radius: var(--radius-full);
  outline: none;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  background: var(--gold);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(201, 168, 76, 0.3);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Color filter swatches */
.color-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.color-filter-swatch {
  width: 24px; height: 24px;
  border-radius: var(--radius-full);
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition-fast), border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.color-filter-swatch:hover { transform: scale(1.15); }
.color-filter-swatch.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.3);
}

/* Size filter pills */
.size-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.size-pill {
  padding: 6px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.size-pill:hover { border-color: var(--gold); color: var(--gold-dark); }
.size-pill.active { background: var(--black); border-color: var(--black); color: var(--white); }

/* ——— Shop Main ——— */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.shop-count {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.shop-count span { font-weight: 700; color: var(--black); }

.shop-sort-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.shop-view-btns {
  display: flex;
  gap: var(--space-xs);
}

.view-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.view-btn:hover { background: var(--cream-dark); color: var(--black); }
.view-btn.active { background: var(--black); color: var(--white); }

.filter-mobile-btn {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 18px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 600;
}

@media (max-width: 768px) { .filter-mobile-btn { display: flex; } }

/* Active Filter Tags */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  background: var(--gold-pale);
  border: 1px solid var(--border-dark);
  color: var(--gold-dark);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.filter-tag-remove {
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.filter-tag-remove:hover { opacity: 1; }

/* Product Grid View */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 1200px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-md); } }

.products-grid.list-view { grid-template-columns: 1fr; }
.products-grid.list-view .product-card { display: flex; aspect-ratio: auto; }
.products-grid.list-view .product-card-image { width: 200px; flex-shrink: 0; aspect-ratio: auto; height: 260px; }
.products-grid.list-view .product-card-body { flex: 1; padding: var(--space-xl); }

/* Sort Select */
.sort-select {
  padding: 10px 36px 10px 14px;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--black);
  background-color: var(--white);
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.sort-select:focus { border-color: var(--gold); outline: none; }

/* No Results */
.no-results {
  text-align: center;
  padding: var(--space-5xl) var(--space-xl);
}

.no-results-icon { font-size: 3rem; margin-bottom: var(--space-lg); color: var(--gray-light); }
.no-results h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: var(--space-md); }
.no-results p { color: var(--text-muted); }
