/* ============================================
   PRODUCT LISTING PAGE STYLES - PREMIUM D2C FASHION BRAND
   Professional Product Catalog with Filters
   ============================================ */

.products-page {
  min-height: 100vh;
  background: var(--color-black);
  padding-top: 80px;
  padding-bottom: var(--spacing-xs);
}

.products-container {
  max-width: 1600px;
  margin: 0 auto;
  padding: var(--spacing-xs) var(--spacing-md);
  overflow-x: hidden;
}

.products-results {
  font-size: 0.75rem;
  color: var(--color-text-tertiary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Products Layout */
.products-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--spacing-md);
  align-items: start;
}

/* Sidebar Filters */
.products-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: var(--spacing-sm);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xs);
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.products-sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.products-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Filters button (mobile only) */
.products-filters-btn {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}

.products-filters-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

.products-filters-icon {
  display: inline-flex;
}

.products-filters-label {
  text-transform: none;
}

/* Filters backdrop (mobile) */
.products-filters-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  z-index: 1400;
}

.products-filters-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sidebar-header h2 {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.clear-filters-btn {
  background: transparent;
  border: none;
  color: var(--color-accent-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0.25rem;
  transition: all var(--transition-fast);
  text-decoration: underline;
}

.clear-filters-btn:hover {
  color: var(--color-accent-secondary);
}

.filter-group {
  margin-bottom: var(--spacing-xs);
  padding-bottom: var(--spacing-xs);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  width: 100%;
  box-sizing: border-box;
}

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

.filter-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-primary);
  margin-bottom: 0.375rem;
}

/* Search Box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box svg {
  position: absolute;
  left: var(--spacing-sm);
  color: var(--color-text-tertiary);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.search-box input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) calc(var(--spacing-sm) * 2 + 16px);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.search-box input::placeholder {
  color: var(--color-text-tertiary);
}

/* Price Range */
.price-range {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

.price-inputs input {
  flex: 1;
  min-width: 0;
  padding: 0.375rem 0.375rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-size: 0.6875rem;
  border-radius: 3px;
  transition: all var(--transition-fast);
  width: 0;
}

.price-inputs input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.price-inputs span {
  color: var(--color-text-tertiary);
  font-weight: 500;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.price-slider {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.price-slider input[type="range"] {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.price-slider input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.2);
}

.price-slider input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--color-accent-primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.price-display {
  font-size: 0.625rem;
  color: var(--color-text-secondary);
  text-align: center;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Filter Options */
.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: 100%;
  box-sizing: border-box;
}

/* Custom category dropdown (no native select, no default outline) */
.custom-select {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.custom-select:focus {
  outline: none;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  text-align: left;
}

.custom-select-trigger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.custom-select-trigger:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.06);
}

.custom-select-trigger:active {
  background: rgba(255, 255, 255, 0.08);
}

.custom-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-arrow {
  flex-shrink: 0;
  margin-left: 0.5rem;
  color: var(--color-text-tertiary);
  transition: transform 0.2s;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(180deg);
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--color-black);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  max-height: 220px;
  overflow-y: auto;
  padding: 0.25rem 0;
}

.custom-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.custom-select-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-text-primary);
}

.custom-select-option:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.custom-select-option[aria-selected="true"] {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-accent-primary);
}

.filter-chip {
  padding: 0.25rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 3px;
  display: flex;
  align-items: center;
  gap: 0.1875rem;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.filter-chip.active {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-black);
}

.rating-chip {
  background: transparent !important;
  border: none !important;
}

.rating-chip:hover {
  background: transparent !important;
  border: none !important;
}

.rating-chip.active {
  background: transparent !important;
  border: none !important;
  color: var(--color-accent-primary);
}

.color-chip {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  min-width: 28px;
  position: relative;
}

.color-chip.active::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--color-black);
  border-radius: 50%;
  border: 2px solid var(--color-accent-primary);
}

.rating-filters {
  flex-direction: column;
  gap: 0.5rem;
}

.rating-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.6875rem;
  color: var(--color-text-primary);
  width: 100%;
}

.rating-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--color-accent-primary);
  flex-shrink: 0;
}

.rating-checkbox-content {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
}

.rating-checkbox-content svg {
  color: var(--color-accent-primary);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.rating-checkbox:checked + .rating-checkbox-content {
  color: var(--color-accent-primary);
}

.rating-checkbox:checked + .rating-checkbox-content svg {
  color: var(--color-accent-primary);
}

/* Sort Options Bar */
.sort-options-bar {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
  width: 100%;
}

.sort-buttons {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.sort-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0.25rem 0.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-text-secondary);
  font-size: 0.6875rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    color var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
  text-align: center;
}

.sort-btn:hover {
  color: var(--color-text-primary);
}

.sort-btn.active {
  color: var(--color-accent-primary);
  font-weight: 600;
  border-bottom-color: var(--color-accent-primary);
}

.sort-btn.active:hover {
  color: var(--color-accent-primary);
}

/* Products Main Area */
.products-main {
  flex: 1;
  min-width: 0;
}

.products-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  gap: var(--spacing-md);
}

.view-options {
  display: flex;
  gap: var(--spacing-xs);
}

.view-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 4px;
}

.view-btn svg {
  width: 16px;
  height: 16px;
}

.view-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--color-text-primary);
}

.view-btn.active {
  background: var(--color-accent-primary);
  border-color: var(--color-accent-primary);
  color: var(--color-black);
}

/* Products catalog panel */
.products-catalog-panel {
  position: relative;
  min-width: 0;
}

.products-catalog-panel.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 18rem;
  padding-top: 1.5rem;
}

.products-catalog-panel.is-empty .products-grid {
  display: none;
  margin-bottom: 0;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  min-width: 0;
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .product-card-name {
    font-size: 0.875rem;
    margin-bottom: 0.15rem;
    line-height: 1.25;
  }

  .product-card-description {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }

  .product-card-info {
    padding: 0.35rem 0 0.5rem;
  }

  .product-card-header {
    margin-bottom: 0.2rem;
  }

  .product-card-footer {
    padding-top: 0.2rem;
  }

  .product-card-price,
  .product-card-pricing .discount-original,
  .product-card-pricing .discount-percent {
    font-size: 0.8125rem;
  }

  .product-card-pricing {
    gap: 0.25rem;
  }
}

.products-grid.list-view {
  grid-template-columns: 1fr;
  gap: var(--spacing-sm);
}

.products-load-more {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: var(--spacing-lg);
}

.products-loader {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--color-accent-primary);
  border-radius: 50%;
  animation: products-spin 0.8s linear infinite;
}

@keyframes products-spin {
  to {
    transform: rotate(360deg);
  }
}

.products-loader-text {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

.products-no-more {
  grid-column: 1 / -1;
  min-height: 1px;
}

/* Product Card */
.product-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  transition: all var(--transition-base);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (min-width: 769px) {
  .product-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .product-card:hover {
    transform: none;
    border-color: transparent;
    box-shadow: none;
  }

  .product-card:hover .product-card-image img {
    transform: scale(1.05);
  }
}

@media (max-width: 768px) {
  .product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg, 0 12px 40px rgba(0, 0, 0, 0.4));
  }

  .product-card:hover .product-card-image img {
    transform: scale(1.1);
  }
}

.product-card.list-view {
  flex-direction: row;
  max-width: 100%;
}

.product-card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  height: auto;
  flex-shrink: 0;
  align-self: start;
  overflow: hidden;
  background: var(--color-charcoal, var(--color-black));
  border-radius: 8px 8px 0 0;
}

.product-card.list-view .product-card-image {
  width: 300px;
  flex-shrink: 0;
  border-radius: 8px 0 0 8px;
}

@media (min-width: 769px) {
  .product-card-image,
  .product-card.list-view .product-card-image {
    border-radius: 6px;
  }
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: inherit;
}

.product-card-badge {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  padding: 0.5rem 1rem;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  z-index: 2;
}

.product-card-badge.new {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-accent-primary);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.product-card-badge.limited {
  background: rgba(255, 107, 157, 0.2);
  color: var(--color-accent-secondary);
  border: 1px solid rgba(255, 107, 157, 0.3);
}

.product-card-badge.bestseller {
  background: rgba(0, 255, 136, 0.2);
  color: var(--color-accent-primary);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.product-card-quick-actions {
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 2;
}

.product-card:hover .product-card-quick-actions {
  opacity: 1;
}

.quick-action-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-radius: 50%;
}

.quick-action-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: var(--color-accent-primary);
  color: var(--color-accent-primary);
  transform: scale(1.1);
}

/* Rating overlay on image – match home page (bottom-left) */
.product-card-rating-overlay {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.6rem;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 4px;
}

.product-card-rating-star-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent-primary);
}

.product-card-rating-overlay .product-card-rating-text {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

.product-card-info {
  /* Remove left/right padding (keep vertical padding) */
  padding: var(--spacing-sm) 0;
  padding-bottom: var(--spacing-md);
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0;
  flex: 1;
  text-align: left;
}

/* STRICT: increase spacing between image and title/info (no image resize) */
.product-card .product-card-image + .product-card-info {
  margin-top: 0.5rem;
}

.product-card-header {
  margin-bottom: 0;
}

.product-card-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  margin: 0 0 var(--spacing-xs) 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* Description – same font size as home .item-description */
.product-card-description {
  font-size: 0.9375rem;
  color: var(--color-text-tertiary);
  line-height: 1.4;
  margin: 0 0 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.product-card-footer {
  padding-top: var(--spacing-xs);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card-info > .comfytee-rating-stars {
  margin-top: auto;
  margin-bottom: 0;
  padding-top: 0.35rem;
}

.product-card-pricing {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.product-card-price,
.product-card-pricing .discount-original,
.product-card-pricing .discount-percent {
  font-size: 1rem;
  line-height: 1.2;
}

.product-card-price {
  font-weight: 700;
  color: var(--color-text-primary);
  letter-spacing: -0.02em;
}

.product-card-pricing .discount-original {
  font-weight: 500;
  color: var(--color-text-tertiary);
  text-decoration: line-through;
  opacity: 0.8;
}

.product-card-pricing .discount-percent {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-weight: 600;
  color: var(--color-accent-primary);
  background: none;
  padding: 0;
  border: none;
  letter-spacing: 0.04em;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 1.5rem var(--spacing-lg);
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}

.no-results-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--spacing-lg);
  opacity: 0.3;
  color: var(--color-text-tertiary);
}

.no-results h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

.no-results p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-lg);
}

/* Sidebar Scrollbar */
.products-sidebar::-webkit-scrollbar {
  width: 6px;
}

.products-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.products-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.products-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* On product page, hide mobile top bar & nav sidebar on desktop */
@media (min-width: 769px) {
  .home-top-bar,
  .home-sidebar-backdrop,
  .home-sidebar {
    display: none !important;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 180px 1fr;
    gap: var(--spacing-md);
  }
}

@media (max-width: 1023px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
  }
}

@media (max-width: 768px) {
  .products-page {
    padding-top: 0;
    padding-bottom: var(--spacing-sm);
  }

  .products-container {
    padding: var(--spacing-xs) var(--spacing-sm);
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-md);
  }

  .products-title {
    font-size: 2rem;
  }

  .products-layout {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
    min-width: 0;
  }

  /* Sidebar hidden from flow; shown as bottom sheet popup */
  .products-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 75vh;
    width: 100%;
    margin: 0;
    padding: var(--spacing-sm) var(--spacing-md) calc(var(--spacing-md) + env(safe-area-inset-bottom, 0));
    padding-right: var(--spacing-md);
    background: var(--color-charcoal);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.85);
    z-index: 1500;
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition:
      transform 0.3s ease,
      opacity 0.3s,
      visibility 0.3s;
  }

  .products-sidebar.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .products-sidebar-close {
    display: inline-flex;
  }

  .products-filters-backdrop {
    display: block;
  }

  .products-filters-btn {
    display: inline-flex;
  }

  .products-toolbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .sort-options-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    margin-bottom: var(--spacing-sm);
  }

  .sort-buttons {
    flex-wrap: nowrap;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-sm);
    width: 100%;
  }

  .product-card {
    min-width: 0;
    max-width: 100%;
  }

  .product-card-image,
  .product-card-info {
    min-width: 0;
  }

  .product-card.list-view {
    flex-direction: column;
  }

  .product-card.list-view .product-card-image {
    width: 100%;
    border-radius: 6px 6px 0 0;
  }

  .product-card-image {
    border-radius: 6px 6px 0 0;
  }

  .product-card-image img {
    border-radius: 6px;
  }

  .product-card {
    background: transparent;
    border: none;
    border-radius: 0;
  }

  /* Product card typography – match home collection mobile */
  .product-card-info {
    padding: 0.25rem 0;
    padding-bottom: 0.5rem;
  }

  .product-card-header {
    margin-bottom: 0.15rem;
  }

  .product-card-name {
    font-size: 0.8rem;
    margin-bottom: 0.15rem;
    line-height: 1.2;
  }

  .product-card-description {
    font-size: 0.6875rem;
    margin-bottom: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-card-footer {
    padding-top: 0.15rem;
  }

  .product-card-rating-overlay {
    bottom: 0.35rem;
    left: 0.35rem;
    padding: 0.25rem 0.45rem;
  }

  .product-card-rating-overlay .product-card-rating-text {
    font-size: 0.7rem !important;
  }

  .product-card-pricing {
    gap: 0.2rem;
  }

  .product-card-pricing .product-card-price,
  .product-card-pricing .discount-original,
  .product-card-pricing .discount-percent {
    font-size: 0.8rem;
  }

  .product-card-pricing .discount-percent {
    color: var(--color-accent-primary);
    background: none;
    border: none;
    padding: 0;
  }

  .product-card-badge {
    top: 0.2rem;
    left: 0.2rem;
    padding: 0.1rem 0.3rem;
    font-size: 0.5rem;
  }

  /* No Product Found: compact placement below toolbar */
  .no-results {
    margin-top: 0;
    padding-top: 1rem;
    padding-bottom: var(--spacing-xl);
  }

  .no-results-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-md);
  }

  .no-results-icon svg {
    width: 48px;
    height: 48px;
  }

  .no-results h3 {
    font-size: 1.25rem;
  }

  .no-results p {
    font-size: 0.875rem;
  }
}
