/* Catalog Layout */
.catalog-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 2rem;
}

.catalog-sidebar {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  position: sticky;
  top: 90px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  box-shadow: var(--box-shadow);
}

.filter-group {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray);
  padding-bottom: 1.5rem;
}

.filter-group:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.filter-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 600;
}

.filter-list li {
  margin-bottom: 0.75rem;
}

.filter-list label {
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: var(--transition);
  padding: 0.25rem 0;
}

.filter-list label:hover {
  color: var(--primary-color);
}

.filter-list input[type="checkbox"] {
  margin-right: 0.75rem;
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
}

/* Search Input */
.search-input {
  position: relative;
}

.search-input input {
  width: 100%;
  padding: 0.75rem 2.5rem 0.75rem 1rem;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.search-input i {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* Price Range Slider */
.price-range {
  margin-top: 1rem;
}

.price-slider-container {
  position: relative;
  margin-bottom: 1rem;
  height: 40px;
}

.price-slider-wrapper {
  position: relative;
  height: 6px;
  background-color: var(--gray);
  border-radius: 3px;
  margin: 17px 0;
}

.price-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
}

.price-slider::-webkit-slider-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  -webkit-appearance: none;
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.price-slider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: all;
  position: relative;
  z-index: 2;
}

.price-track {
  position: absolute;
  height: 6px;
  background: var(--primary-color);
  border-radius: 3px;
  top: 17px;
  z-index: 1;
}

.price-inputs {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.price-inputs input {
  width: calc(50% - 15px);
  padding: 0.5rem;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.price-inputs span {
  margin: 0 10px;
  color: var(--text-light);
  font-weight: 500;
}

.price-display {
  text-align: center;
  font-size: 0.875rem;
  color: var(--primary-color);
  font-weight: 500;
  padding: 0.5rem;
  background-color: var(--primary-very-light);
  border-radius: var(--border-radius);
}

.catalog-content {
  min-height: 800px;
}

.catalog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.catalog-count {
  font-weight: 500;
  color: var(--text-color);
}

.catalog-count span {
  color: var(--primary-color);
  font-weight: 600;
}

.catalog-sort {
  display: flex;
  align-items: center;
}

.catalog-sort label {
  margin-right: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
}

.catalog-sort select {
  padding: 0.5rem;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  background-color: white;
  font-size: 0.875rem;
}

.catalog-view {
  display: flex;
}

.view-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  margin-left: 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover {
  background-color: var(--primary-very-light);
  border-color: var(--primary-color);
}

.view-btn.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Product Grid & List View */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.products-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.products-list .product-card {
  display: flex;
  align-items: center;
  padding: 1.5rem;
}

.products-list .product-card img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.products-list .product-content {
  flex-grow: 1;
}

.product-card {
  background-color: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 2;
}

.product-badge.discount {
  background-color: var(--danger);
}

.product-badge.new {
  background-color: var(--success);
}

.product-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-content h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.product-desc {
  color: var(--text-light);
  margin-bottom: 1rem;
  height: 3em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.5;
}

.product-features {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  gap: 0.75rem;
}

.product-features span {
  display: flex;
  align-items: center;
  color: var(--text-light);
  background-color: var(--gray-light);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
}

.product-features i {
  color: var(--primary-color);
  margin-right: 0.25rem;
}

.product-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.price-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
}

.old-price {
  font-size: 1rem;
  text-decoration: line-through;
  color: var(--text-light);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.pagination-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  margin: 0 0.5rem;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--primary-very-light);
  border-color: var(--primary-color);
}

.pagination-numbers {
  display: flex;
  align-items: center;
}

.pagination-number {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border: 1px solid var(--gray);
  border-radius: var(--border-radius);
  margin: 0 0.25rem;
  cursor: pointer;
  transition: var(--transition);
}

.pagination-number:hover {
  background-color: var(--primary-very-light);
  border-color: var(--primary-color);
}

.pagination-number.active {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Empty Results */
.empty-results {
  background-color: white;
  border-radius: var(--border-radius);
  padding: 3rem;
  text-align: center;
  box-shadow: var(--box-shadow);
}

.empty-results i {
  font-size: 4rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.empty-results h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.empty-results p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .catalog-layout {
    grid-template-columns: 280px 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 250px 1fr;
  }

  .products-list .product-card img {
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 768px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: relative;
    top: 0;
    height: auto;
    margin-bottom: 1.5rem;
  }

  .catalog-header {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .catalog-count {
    flex: 0 0 100%;
    margin-bottom: 0;
  }

  .products-list .product-card {
    flex-direction: column;
    text-align: center;
  }

  .products-list .product-card img {
    width: 100%;
    height: 200px;
    margin-right: 0;
    margin-bottom: 1rem;
  }

  .product-features {
    justify-content: center;
  }

  .product-price {
    justify-content: center;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .catalog-sort {
    flex: 1;
  }

  .catalog-view {
    display: none;
  }

  .price-inputs {
    flex-direction: column;
    gap: 0.5rem;
  }

  .price-inputs input {
    width: 100%;
  }

  .price-inputs span {
    margin: 0;
  }
}