/* =====================================================
   VEILUX — Shop Page CSS
   shop.css — extends the base style.css
   ===================================================== */

/* ===== SHOP HERO ===== */
.shop-hero {
  position: relative;
  height: 340px;
  display: flex;
  align-items: flex-end;
  padding-bottom: var(--space-xl);
  overflow: hidden;
  margin-top: calc(var(--announcement-height) + var(--nav-height));
}

.shop-hero-bg {
  position: absolute;
  inset: 0;
}

.shop-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}

.shop-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10,10,10,0.72) 0%,
    rgba(10,10,10,0.3) 50%,
    rgba(10,10,10,0.1) 100%
  );
}

.shop-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  width: 100%;
}

.shop-hero-eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-camel);
  margin-bottom: 8px;
}

.shop-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 400;
  color: var(--color-white);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.shop-hero-title em {
  font-style: italic;
  font-weight: 300;
}

.shop-hero-sub {
  font-size: 0.875rem;
  font-weight: 300;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.04em;
}

/* Breadcrumb */
.breadcrumb {
  position: absolute;
  top: var(--space-lg);
  left: 0;
  right: 0;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.5);
}

.breadcrumb-list a {
  color: rgba(255,255,255,0.6);
  transition: color var(--transition-fast);
}

.breadcrumb-list a:hover {
  color: var(--color-white);
}

.breadcrumb-list [aria-current="page"] {
  color: var(--color-camel);
}

/* ===== SHOP LAYOUT ===== */
.shop-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
  align-items: start;
}

/* ===== FILTER SIDEBAR ===== */
.filter-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-md));
  max-height: calc(100vh - var(--nav-height) - var(--space-xl));
  overflow-y: auto;
  padding-right: var(--space-lg);
  scrollbar-width: thin;
  scrollbar-color: var(--color-light) transparent;
}

.filter-sidebar::-webkit-scrollbar {
  width: 4px;
}

.filter-sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid var(--color-light);
  padding-right: var(--space-lg);
}

/* Active Filters */
.active-filters {
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-light);
}

.active-filters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
}

.active-filters-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-dark);
}

.clear-all-btn {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-camel-dark);
  text-decoration: underline;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.clear-all-btn:hover {
  color: var(--color-error);
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 5px 10px;
  background: var(--color-cream);
  border: 1px solid var(--color-light);
  border-radius: 2px;
  color: var(--color-dark);
}

.filter-tag-remove {
  cursor: pointer;
  color: var(--color-muted);
  font-size: 0.8rem;
  line-height: 1;
  transition: color var(--transition-fast);
}

.filter-tag-remove:hover {
  color: var(--color-error);
}

/* Filter Groups */
.filter-group {
  border-bottom: 1px solid var(--color-light);
  padding: var(--space-sm) 0;
}

.filter-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-dark);
  padding: var(--space-xs) 0;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.filter-group-header:hover {
  color: var(--color-black);
}

.filter-chevron {
  transition: transform var(--transition-base);
  flex-shrink: 0;
}

.filter-group-header[aria-expanded="false"] .filter-chevron {
  transform: rotate(-90deg);
}

.filter-group-body {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  max-height: 500px;
  opacity: 1;
}

.filter-group-body.collapsed {
  max-height: 0;
  opacity: 0;
}

/* Filter checkboxes */
.filter-options {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-xs) 0;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  user-select: none;
}

.filter-checkbox {
  display: none;
}

.checkbox-custom {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--color-light);
  border-radius: 2px;
  flex-shrink: 0;
  position: relative;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.checkbox-custom::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 8px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpolyline points='1 4 3.5 6.5 9 1' stroke='white' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform var(--transition-fast);
}

.filter-checkbox:checked + .checkbox-custom {
  background: var(--color-black);
  border-color: var(--color-black);
}

.filter-checkbox:checked + .checkbox-custom::after {
  transform: translate(-50%, -50%) scale(1);
}

.filter-opt-text {
  font-size: 0.84rem;
  font-weight: 400;
  color: var(--color-dark);
  flex: 1;
  transition: color var(--transition-fast);
}

.filter-checkbox-label:hover .filter-opt-text {
  color: var(--color-black);
}

.filter-opt-count {
  font-size: 0.72rem;
  color: var(--color-muted);
  margin-left: auto;
}

/* Price Range */
.price-range-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-dark);
  padding: var(--space-xs) 0;
  margin-bottom: var(--space-sm);
}

.price-range-track {
  position: relative;
  height: 3px;
  background: var(--color-light);
  border-radius: 2px;
  margin: var(--space-md) 0 var(--space-sm);
}

.price-range-fill {
  position: absolute;
  height: 100%;
  background: var(--color-black);
  border-radius: 2px;
  left: 0;
  right: 0;
  pointer-events: none;
}

.price-range-input {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 3px;
  background: transparent;
  outline: none;
  cursor: pointer;
  pointer-events: none;
}

.price-range-input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-black);
  cursor: pointer;
  pointer-events: all;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.price-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(10,10,10,0.1);
}

.price-range-input::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-black);
  cursor: pointer;
  pointer-events: all;
}

.price-presets {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: var(--space-xs);
}

.price-preset-btn {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-mid);
  padding: 5px 0;
  cursor: pointer;
  transition: color var(--transition-fast);
  background: none;
  border: none;
  font-family: inherit;
}

.price-preset-btn:hover,
.price-preset-btn.active {
  color: var(--color-black);
  font-weight: 500;
}

/* Size grid */
.size-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: var(--space-xs) 0;
}

.size-btn {
  min-width: 42px;
  height: 38px;
  border: 1.5px solid var(--color-light);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--color-mid);
  cursor: pointer;
  background: transparent;
  transition: all var(--transition-fast);
  border-radius: 2px;
  padding: 0 8px;
}

.size-btn:hover {
  border-color: var(--color-dark);
  color: var(--color-dark);
}

.size-btn.active {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
}

/* Color Swatch grid */
.color-swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: var(--space-xs) 0;
}

.color-swatch-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  outline: 2px solid transparent;
  outline-offset: 2px;
}

.color-swatch-btn:hover {
  transform: scale(1.15);
}

.color-swatch-btn.active {
  outline-color: var(--color-mid);
}

.swatch-check {
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.color-swatch-btn.active .swatch-check {
  opacity: 1;
}

/* ===== PRODUCTS AREA ===== */
.products-area {
  padding-left: var(--space-lg);
  min-width: 0;
}

/* ===== TOOLBAR ===== */
.shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-light);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

/* Category pills */
.category-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 8px 18px;
  border: 1.5px solid var(--color-light);
  border-radius: 2px;
  background: transparent;
  color: var(--color-mid);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--color-dark);
  color: var(--color-dark);
}

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

.pill--sale {
  color: var(--color-camel-dark);
  border-color: rgba(196,168,130,0.4);
}

.pill--sale.active {
  background: var(--color-camel);
  border-color: var(--color-camel);
  color: var(--color-white);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-left: auto;
  flex-shrink: 0;
}

.results-count {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Sort select */
.sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--color-mid);
  white-space: nowrap;
}

.sort-select {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--color-dark);
  background: transparent;
  border: 1.5px solid var(--color-light);
  border-radius: 2px;
  padding: 7px 28px 7px 10px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  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='%236B6B6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color var(--transition-fast);
  outline: none;
}

.sort-select:hover,
.sort-select:focus {
  border-color: var(--color-dark);
}

/* Grid toggle */
.grid-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--color-light);
  border-radius: 2px;
  overflow: hidden;
}

.grid-toggle-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-muted);
  background: transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
}

.grid-toggle-btn:hover {
  background: var(--color-cream);
  color: var(--color-dark);
}

.grid-toggle-btn.active {
  background: var(--color-black);
  color: var(--color-white);
}

/* Mobile filter btn */
.mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dark);
  background: transparent;
  border: 1.5px solid var(--color-dark);
  border-radius: 2px;
  padding: 7px 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.mobile-filter-btn:hover {
  background: var(--color-black);
  color: var(--color-white);
  border-color: var(--color-black);
}

/* ===== SHOP PRODUCTS GRID ===== */
.shop-products-grid {
  display: grid;
  gap: var(--space-xl) var(--space-md);
}

.shop-products-grid.cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

.shop-products-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl) var(--space-lg);
}

.shop-products-grid.cols-2 .product-img-wrap {
  aspect-ratio: 4/5;
}

.shop-products-grid.cols-2 .product-name {
  font-size: 1.3rem;
}

/* LIST VIEW */
.shop-products-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

.shop-products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--space-lg);
  padding: var(--space-lg) 0;
  border-bottom: 1px solid var(--color-light);
  align-items: start;
}

.shop-products-grid.list-view .product-img-wrap {
  aspect-ratio: 3/4;
  height: 260px;
}

.shop-products-grid.list-view .product-info {
  gap: var(--space-sm);
  justify-content: flex-start;
}

.shop-products-grid.list-view .product-name {
  font-size: 1.3rem;
}

.shop-products-grid.list-view .product-list-detail {
  display: block;
}

.shop-products-grid.list-view .product-card:hover .add-to-cart-overlay {
  transform: translateY(0);
}

/* List detail — hidden in grid, shown in list */
.product-list-detail {
  display: none;
}

.product-list-desc {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--color-mid);
  line-height: 1.7;
  margin-bottom: var(--space-sm);
}

.product-list-sizes {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.list-size-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.list-size {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 4px 8px;
  border: 1px solid var(--color-light);
  border-radius: 2px;
  color: var(--color-mid);
}

.list-size.active {
  border-color: var(--color-black);
  color: var(--color-black);
}

/* ===== PRODUCT RATING ===== */
.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-stars {
  font-size: 0.72rem;
  color: var(--color-camel);
  letter-spacing: 1px;
}

.rating-count {
  font-size: 0.72rem;
  color: var(--color-muted);
}

/* ===== NAV ACTIVE LINK ===== */
.nav-link--active {
  color: var(--color-black);
  font-weight: 600;
}

.nav-link--active::after {
  width: 100% !important;
}

.nav-link--sale {
  color: var(--color-camel-dark) !important;
}

/* ===== NO RESULTS ===== */
.no-results {
  padding: var(--space-3xl) 0;
  text-align: center;
}

.no-results-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  color: var(--color-mid);
}

.no-results-inner svg {
  color: var(--color-light);
}

.no-results-inner h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--color-dark);
}

.no-results-inner p {
  font-size: 0.9rem;
  color: var(--color-mid);
}

.no-results-reset {
  color: var(--color-camel-dark);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ===== LOAD MORE ===== */
.load-more-wrap {
  padding: var(--space-2xl) 0 var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.load-more-info {
  width: 100%;
  max-width: 360px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.load-more-text {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--color-muted);
  letter-spacing: 0.05em;
}

.load-more-progress {
  height: 2px;
  background: var(--color-light);
  border-radius: 2px;
  overflow: hidden;
}

.load-more-bar {
  height: 100%;
  background: var(--color-black);
  border-radius: 2px;
  transition: width 0.5s ease;
}

.load-more-btn {
  min-width: 240px;
}

/* ===== PAGINATION ===== */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-xs);
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-dark);
  background: transparent;
  border: 1.5px solid var(--color-light);
  border-radius: 2px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pagination-btn svg {
  display: block;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--color-dark);
  color: var(--color-black);
}

.pagination-btn.active {
  background: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
  pointer-events: none;
}

.pagination-btn:disabled {
  color: var(--color-muted);
  border-color: var(--color-light);
  cursor: not-allowed;
  opacity: 0.4;
}

.pagination-ellipsis {
  font-size: 0.85rem;
  color: var(--color-muted);
  padding: 0 4px;
}

/* ===== MOBILE FILTER DRAWER ===== */
.filter-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(2px);
}

.filter-drawer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .shop-body {
    grid-template-columns: 220px 1fr;
    gap: 0;
  }

  .shop-products-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    max-height: 100vh;
    background: var(--color-white);
    z-index: 260;
    padding: var(--space-lg);
    padding-right: var(--space-lg);
    transform: translateX(-110%);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
  }

  .filter-sidebar.open {
    transform: translateX(0);
  }

  .filter-sidebar-inner {
    border-right: none;
    padding-right: 0;
  }

  .products-area {
    padding-left: 0;
  }

  .mobile-filter-btn {
    display: flex;
  }

  .shop-products-grid.cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .shop-hero {
    height: 260px;
    margin-top: calc(var(--announcement-height) + var(--nav-height));
  }

  .shop-body {
    padding: var(--space-lg) var(--space-md);
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .toolbar-right {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .sort-wrap {
    flex: 1;
  }

  .sort-select {
    width: 100%;
  }

  .category-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .category-pills::-webkit-scrollbar {
    display: none;
  }

  .shop-products-grid.cols-4,
  .shop-products-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) var(--space-sm);
  }

  .shop-products-grid.list-view .product-card {
    grid-template-columns: 130px 1fr;
    gap: var(--space-sm);
  }

  .shop-products-grid.list-view .product-img-wrap {
    height: 180px;
  }

  .grid-toggle {
    display: none;
  }

  .results-count {
    display: none;
  }
}

@media (max-width: 480px) {
  .shop-hero {
    height: 220px;
  }

  .shop-products-grid.cols-4,
  .shop-products-grid.cols-2,
  .shop-products-grid.list-view {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md) 10px;
  }

  .shop-products-grid.list-view .product-card {
    grid-template-columns: 1fr;
  }

  .shop-products-grid.list-view .product-img-wrap {
    height: auto;
    aspect-ratio: 3/4;
  }

  .pill {
    font-size: 0.68rem;
    padding: 7px 12px;
  }
}
