/* ==========================================================================
   Luxora Blinds - Products Page Styles
   ========================================================================== */

/* -------------------------------------------------------------------------
   Products Hero
   ------------------------------------------------------------------------- */

.products-hero {
  padding-top: calc(80px + var(--space-lg));
  padding-bottom: var(--space-md);
  background-color: var(--color-ivory);
}

.products-hero__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: var(--fw-bold);
  color: var(--color-charcoal);
  margin-bottom: var(--space-xs);
  line-height: 1.2;
}

.products-hero__subtitle {
  font-size: 0.8rem;
  color: var(--color-grey);
  max-width: 600px;
  margin: 0;
}

/* -------------------------------------------------------------------------
   Breadcrumb
   ------------------------------------------------------------------------- */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  margin-bottom: var(--space-sm);
}

.breadcrumb a {
  color: var(--color-grey);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.breadcrumb__separator {
  color: var(--color-grey);
}

.breadcrumb__current {
  color: var(--color-charcoal);
  font-weight: var(--fw-medium);
}

/* -------------------------------------------------------------------------
   Products Layout
   ------------------------------------------------------------------------- */

.products-section {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-5xl);
  background-color: var(--color-white);
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-2xl);
}

/* -------------------------------------------------------------------------
   Sidebar Filters
   ------------------------------------------------------------------------- */

.filters {
  position: sticky;
  top: 100px;
  height: fit-content;
}

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

.filters__title {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.filters__clear {
  font-size: var(--fs-small);
  color: var(--color-grey);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.filters__clear:hover {
  color: var(--color-gold);
}

.filter-group {
  margin-bottom: var(--space-xl);
}

.filter-group__title {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.filter-group__title i {
  font-size: 12px;
  color: var(--color-grey);
  transition: transform var(--transition-fast);
}

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

.filter-group__options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

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

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 1px solid var(--color-border);
  border-radius: 3px;
  cursor: pointer;
  accent-color: var(--color-gold);
}

.filter-option__label {
  font-size: var(--fs-small);
  color: var(--color-charcoal);
}

.filter-option__count {
  font-size: var(--fs-caption);
  color: var(--color-grey);
  margin-left: auto;
}

/* Color Swatches */
.filter-colors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.color-swatch:hover,
.color-swatch.active {
  border-color: var(--color-gold);
  transform: scale(1.1);
}

.color-swatch--ivory { background-color: #F8F5EF; border: 2px solid var(--color-border); }
.color-swatch--white { background-color: #FFFFFF; border: 2px solid var(--color-border); }
.color-swatch--charcoal { background-color: #2E2E2E; }
.color-swatch--grey { background-color: #6B6B6B; }
.color-swatch--teal { background-color: #1F4E4A; }
.color-swatch--gold { background-color: #C8A24D; }
.color-swatch--sage { background-color: #9CAF88; }
.color-swatch--navy { background-color: #1C3557; }
.color-swatch--beige { background-color: #D4C5B5; }
.color-swatch--brown { background-color: #6B4423; }

/* Price Range Slider */
.price-range {
  padding: var(--space-sm) 0;
}

.price-range__slider {
  width: 100%;
  height: 4px;
  background: var(--color-border);
  border-radius: 2px;
  margin-bottom: var(--space-md);
  accent-color: var(--color-gold);
}

.price-range__values {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-small);
  color: var(--color-charcoal);
}

/* -------------------------------------------------------------------------
   Products Grid
   ------------------------------------------------------------------------- */

.products-content {
  min-width: 0;
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.products-count {
  font-size: var(--fs-small);
  color: var(--color-grey);
}

.products-count strong {
  color: var(--color-charcoal);
}

.products-sort {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.products-sort__label {
  font-size: var(--fs-small);
  color: var(--color-grey);
}

.products-sort__select {
  padding: 8px 32px 8px 12px;
  font-size: var(--fs-small);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

/* -------------------------------------------------------------------------
   Product Card
   ------------------------------------------------------------------------- */

.product-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  text-decoration: none;
  color: inherit;
  display: block;
}

.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4/5;
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

.product-card:hover .product-card__image img {
  transform: scale(1.08);
}

.product-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 2;
}

.product-card__wishlist {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  background-color: var(--color-white);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  z-index: 2;
}

.product-card__wishlist i {
  font-size: 16px;
  color: var(--color-grey);
  transition: color var(--transition-fast);
}

.product-card__wishlist:hover {
  background-color: var(--color-gold);
}

.product-card__wishlist:hover i {
  color: var(--color-white);
}

.product-card__body {
  padding: var(--space-lg);
}

.product-card__category {
  font-family: var(--font-ui);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-bottom: var(--space-xs);
}

.product-card__title {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.product-card__description {
  font-size: var(--fs-small);
  color: var(--color-grey);
  margin-bottom: var(--space-md);
  line-height: var(--lh-relaxed);
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-card__price {
  font-family: var(--font-ui);
  font-size: var(--fs-body);
  font-weight: var(--fw-semibold);
  color: var(--color-charcoal);
}

.product-card__price span {
  font-size: var(--fs-small);
  font-weight: var(--fw-regular);
  color: var(--color-grey);
}

.product-card__link {
  font-family: var(--font-ui);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-teal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  transition: color var(--transition-fast);
}

.product-card__link:hover {
  color: var(--color-gold);
}

.product-card__link i {
  font-size: 14px;
  transition: transform var(--transition-fast);
}

.product-card__link:hover i {
  transform: translateX(4px);
}

/* -------------------------------------------------------------------------
   Pagination
   ------------------------------------------------------------------------- */

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

.pagination__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  color: var(--color-charcoal);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

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

.pagination__btn--active {
  background-color: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-white);
}

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

.pagination__dots {
  color: var(--color-grey);
  font-size: var(--fs-small);
  padding: 0 var(--space-xs);
}

/* -------------------------------------------------------------------------
   Mobile Filter Toggle
   ------------------------------------------------------------------------- */

.filter-toggle {
  display: none;
  align-items: center;
  gap: var(--space-sm);
  padding: 12px 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  color: var(--color-charcoal);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-toggle:hover {
  border-color: var(--color-gold);
}

.filter-toggle i {
  font-size: 16px;
}

/* Mobile Filter Overlay */
.filters-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: var(--z-modal-backdrop);
}

.filters-overlay.active {
  display: block;
}

/* -------------------------------------------------------------------------
   Filters Close Button (Default hidden on desktop)
   ------------------------------------------------------------------------- */

.filters__close {
  display: none;
}

/* -------------------------------------------------------------------------
   Responsive Styles
   ------------------------------------------------------------------------- */

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

  .products-layout {
    grid-template-columns: 260px 1fr;
    gap: var(--space-xl);
  }
}

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

  .products-layout {
    grid-template-columns: 220px 1fr;
    gap: var(--space-lg);
  }

  .product-card__title {
    font-size: var(--fs-body-lg);
  }

  .product-card__description {
    font-size: var(--fs-caption);
  }
}

@media (max-width: 900px) {
  /* Switch to single column layout with filter overlay */
  .products-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: 0 !important;
    width: 320px;
    max-width: 85vw;
    height: 100% !important;
    background-color: #FFFFFF;
    z-index: 1000;
    padding: 24px;
    padding-top: 70px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }

  .filters.active {
    transform: translateX(0) !important;
  }

  .filters__close {
    display: flex;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #F8F5EF;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #2E2E2E;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
  }

  .filters__close:hover {
    background: #C8A24D;
    color: #FFFFFF;
  }

  .filter-toggle {
    display: flex;
  }

  .filters-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .filters-overlay.active {
    display: block;
  }

  .products-toolbar {
    flex-wrap: wrap;
    gap: var(--space-md);
  }

  .products-count {
    order: 3;
    width: 100%;
    text-align: center;
    padding-top: var(--space-sm);
  }

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

@media (max-width: 768px) {
  .products-hero {
    padding-top: calc(80px + var(--space-md));
    padding-bottom: var(--space-sm);
  }

  .products-hero__title {
    font-size: 1.25rem;
  }

  .products-hero__subtitle {
    font-size: 0.75rem;
  }

  .product-card__body {
    padding: var(--space-md);
  }

  .product-card__title {
    font-size: var(--fs-body);
    margin-bottom: var(--space-xs);
  }

  .product-card__description {
    display: none;
  }

  .product-card__category {
    font-size: 10px;
  }

  .product-card__price {
    font-size: var(--fs-small);
  }

  .product-card__price span {
    display: none;
  }

  .product-card__link {
    font-size: var(--fs-caption);
  }

  .product-card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xs);
  }

  .product-card__wishlist {
    width: 32px;
    height: 32px;
  }

  .product-card__wishlist i {
    font-size: 14px;
  }

  .product-card__badge {
    top: var(--space-sm);
    left: var(--space-sm);
  }

  .badge {
    padding: 3px 8px;
    font-size: 9px;
  }

  .pagination {
    margin-top: var(--space-xl);
    gap: 4px;
  }

  .pagination__btn {
    width: 36px;
    height: 36px;
    font-size: var(--fs-caption);
  }

  .pagination__dots {
    padding: 0 2px;
  }
}

@media (max-width: 480px) {
  .products-hero {
    padding-top: calc(80px + var(--space-sm));
    padding-bottom: var(--space-xs);
  }

  .products-hero__title {
    font-size: 1.1rem;
  }

  .products-section {
    padding-top: var(--space-lg);
    padding-bottom: var(--space-3xl);
  }

  .products-toolbar {
    padding-bottom: var(--space-sm);
    margin-bottom: var(--space-lg);
  }

  .filter-toggle {
    padding: 10px 16px;
    font-size: var(--fs-caption);
  }

  .products-sort__select {
    padding: 8px 28px 8px 10px;
    font-size: var(--fs-caption);
  }

  .products-sort__label {
    display: none;
  }

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

  .product-card {
    border-radius: var(--radius-sm);
  }

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

  .product-card__body {
    padding: var(--space-sm);
  }

  .product-card__title {
    font-size: var(--fs-small);
    line-height: 1.3;
  }

  .product-card__footer {
    margin-top: var(--space-xs);
  }

  .product-card__link {
    display: none;
  }

  .pagination__btn {
    width: 32px;
    height: 32px;
  }

  /* Hide some pagination buttons on very small screens */
  .pagination__btn:nth-child(4),
  .pagination__btn:nth-child(5) {
    display: none;
  }
}

@media (max-width: 360px) {
  .products-grid {
    gap: 8px;
  }

  .product-card__body {
    padding: 8px;
  }

  .product-card__title {
    font-size: 13px;
  }

  .product-card__price {
    font-size: 13px;
  }
}
