/* =============================================================================
   PEARL VEIL — SHOP PAGE STYLES
   ─────────────────────────────────────────────────────────────────────────────
   Styles specific to shop.html: page header, filter sidebar, toolbar,
   product grid, pagination, empty state.
   ============================================================================= */

/* ─── PAGE HEADER ─────────────────────────────────────────────────────────────  */

.shop-header {
  padding: var(--space-16) 0 var(--space-10);
  text-align: center;
  background-color: var(--color-bg-alt);
}

.shop-header__title {
  font-family: var(--font-display);
  font-size: clamp(var(--text-2xl), 4vw, var(--text-3xl));
  font-weight: var(--weight-light);
  color: var(--color-heading);
  margin-bottom: var(--space-3);
}

.shop-header__breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-4);
}

.shop-header__breadcrumb a {
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--dur-fast);
}

.shop-header__breadcrumb a:hover {
  color: var(--color-accent);
}

.shop-header__count {
  font-size: var(--text-sm);
  color: var(--color-muted);
  font-weight: var(--weight-light);
}

/* ─── SHOP LAYOUT ──────────────────────────────────────────────────────────────  */

.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-10);
  align-items: start;
}

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

/* ─── FILTER SIDEBAR ───────────────────────────────────────────────────────────  */

.filter-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

@media (max-width: 960px) {
  .filter-sidebar {
    position: static;
  }
}

.filter-group {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.filter-group:last-child {
  border-bottom: none;
}

.filter-group__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-heading);
  margin-bottom: var(--space-4);
  cursor: pointer;
}

.filter-group__title svg {
  width: 14px;
  height: 14px;
  transition: transform var(--dur-base) var(--ease-out);
  color: var(--color-muted);
}

.filter-group.collapsed .filter-group__title svg {
  transform: rotate(-90deg);
}

.filter-group__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-out);
}

.filter-group.collapsed .filter-group__body {
  display: none;
}

.filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-option__count {
  font-size: var(--text-xs);
  color: var(--color-faint);
}

/* Price range slider */
.price-range-display {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-bottom: var(--space-3);
}

.price-range-slider {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  outline: none;
  appearance: none;
  cursor: pointer;
}

.price-range-slider::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

.price-range-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 2px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

/* Color swatch filters */
.color-swatch-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.color-swatch-filter {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  outline: 1px solid var(--color-border);
  outline-offset: 2px;
  transition: var(--transition-fast);
}

.color-swatch-filter.active {
  outline-color: var(--color-heading);
  outline-width: 2px;
}

.filter-clear-btn {
  font-size: var(--text-xs);
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ─── MOBILE FILTER TOGGLE ─────────────────────────────────────────────────────  */

.mobile-filter-toggle {
  display: none;
  width: 100%;
  margin-bottom: var(--space-6);
}

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

  .filter-sidebar {
    display: none;
  }

  .filter-sidebar.mobile-open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: var(--color-bg);
    overflow-y: auto;
    padding: var(--space-6);
  }
}

.filter-sidebar__mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

@media (max-width: 960px) {
  .filter-sidebar.mobile-open .filter-sidebar__mobile-header {
    display: flex;
  }
}

/* ─── TOOLBAR ──────────────────────────────────────────────────────────────────  */

.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--color-border);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.shop-toolbar__count {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.shop-toolbar__controls {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.shop-sort-select {
  height: 40px;
  padding: 0 var(--space-8) 0 var(--space-4);
  font-size: var(--text-sm);
}

/* Active filter tags row */
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

/* ─── EMPTY STATE ──────────────────────────────────────────────────────────────  */

.shop-empty-state {
  text-align: center;
  padding: var(--space-32) var(--space-6);
}

.shop-empty-state svg {
  width: 64px;
  height: 64px;
  color: var(--color-border);
  margin: 0 auto var(--space-6);
}

.shop-empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: var(--weight-regular);
  color: var(--color-heading);
  margin-bottom: var(--space-3);
}

.shop-empty-state p {
  color: var(--color-muted);
  margin-bottom: var(--space-6);
}

/* ─── PAGINATION ───────────────────────────────────────────────────────────────  */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-16);
}

.pagination__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--color-muted);
  cursor: pointer;
  background: none;
  border: 1px solid transparent;
  transition: var(--transition-base);
}

.pagination__btn:hover {
  border-color: var(--color-border);
  color: var(--color-heading);
}

.pagination__btn.active {
  background-color: var(--color-heading);
  color: var(--color-ivory);
}

.pagination__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination__btn svg {
  width: 16px;
  height: 16px;
}

.pagination__ellipsis {
  color: var(--color-faint);
  padding: 0 var(--space-1);
}

/* ─── GRID LOADING SKELETON ────────────────────────────────────────────────────  */

.product-card-skeleton {
  border-radius: var(--card-radius);
  overflow: hidden;
}

.product-card-skeleton__image {
  aspect-ratio: 3 / 4;
}

.product-card-skeleton__info {
  padding: var(--space-4);
}

.product-card-skeleton__line {
  height: 14px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-xs);
}

.product-card-skeleton__line.w-60 { width: 60%; }
.product-card-skeleton__line.w-40 { width: 40%; }

/* =============================================================================
   SHOP PAGE — ADDITIONAL MOBILE FIXES (Phase 7)
   ============================================================================= */

/* Filter sidebar as full-screen drawer on mobile */
@media (max-width: 480px) {
  .filter-sidebar {
    width: min(320px, 90vw) !important;
  }

  .filter-sidebar__mobile-header {
    padding: var(--space-4) var(--space-5);
  }

  .filter-sidebar__body {
    padding: var(--space-4) var(--space-5);
  }

  .filter-group__options {
    gap: var(--space-2);
  }

  .filter-option-label {
    font-size: var(--text-sm);
  }
}

/* Shop toolbar on narrow phones */
@media (max-width: 390px) {
  .shop-toolbar {
    gap: var(--space-2);
  }

  .shop-toolbar__left {
    font-size: var(--text-xs);
  }

  .mobile-filter-toggle,
  .shop-sort-group select {
    height: 38px;
    font-size: var(--text-xs);
  }
}

/* Pagination on mobile */
@media (max-width: 480px) {
  .pagination {
    gap: var(--space-1);
    flex-wrap: wrap;
    justify-content: center;
  }

  .pagination-btn {
    min-width: 36px;
    height: 36px;
    font-size: var(--text-xs);
  }
}
