.products-page {
  background: #f3f4f6;
  min-height: 100vh;
  padding: 20px 0;
}

.products-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.products-page-title {
  margin: 0 0 20px;
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.products-layout {
  display: grid;
  grid-template-columns: 245px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.product-filters {
  background: #ffffff;
  border-radius: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.filter-header {
  padding: 17px 13px 13px;
}

.filter-header h2 {
  margin: 0;
  color: #111827;
  font-size: 16px;
  font-weight: 600;
}

.filter-section {
  padding: 0 13px 18px;
}

.filter-section h3 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 13px;
  font-weight: 500;
}

.category-filter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-filter-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 18px;

  color: #4b5563;
  font-size: 12px;

  cursor: pointer;
  user-select: none;
}

.category-filter-item input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.category-checkbox {
  width: 14px;
  height: 14px;

  flex-shrink: 0;

  border: 1px solid #9ca3af;
  border-radius: 2px;
  background: #ffffff;

  position: relative;
}

.category-filter-item input:checked + .category-checkbox {
  background: #2563eb;
  border-color: #2563eb;
}

.category-filter-item input:checked + .category-checkbox::after {
  content: '';

  position: absolute;
  left: 4px;
  top: 1px;

  width: 4px;
  height: 8px;

  border: solid #ffffff;
  border-width: 0 2px 2px 0;

  transform: rotate(45deg);
}

.category-name {
  flex: 1;
}

.category-count {
  color: #6b7280;
  white-space: nowrap;
}

.price-filter-section {
  border-top: 1px solid #e5e7eb;
  padding-top: 18px;
}

.price-inputs {
  display: flex;
  gap: 8px;
}

.price-input-group {
  flex: 1;
}

.price-input-group label {
  display: block;

  margin-bottom: 5px;

  color: #6b7280;
  font-size: 11px;
}

.price-input-group input {
  width: 100%;
  height: 34px;

  padding: 0 8px;

  box-sizing: border-box;

  border: 1px solid #d1d5db;
  border-radius: 5px;

  background: #ffffff;
  color: #374151;

  font-size: 11px;
  outline: none;
}

.price-input-group input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.apply-filter-btn {
  width: 100%;
  height: 34px;

  margin-top: 10px;

  border: none;
  border-radius: 5px;

  background: #2563eb;
  color: #ffffff;

  font-size: 12px;
  font-weight: 500;

  cursor: pointer;
}

.apply-filter-btn:hover {
  background: #1d4ed8;
}

.no-filter-data {
  margin: 0;

  color: #9ca3af;
  font-size: 12px;
}

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

.products-toolbar {
  min-height: 54px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 13px;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 7px;

  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

  box-sizing: border-box;
}

.product-result-count {
  color: #6b7280;
  font-size: 12px;
}

.product-sort {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-sort label {
  color: #6b7280;
  font-size: 12px;
}

.product-sort select {
  height: 32px;

  min-width: 145px;

  padding: 0 9px;

  border: 1px solid #d1d5db;
  border-radius: 5px;

  background: #ffffff;
  color: #374151;

  font-size: 12px;

  outline: none;
  cursor: pointer;
}

.product-sort select:focus {
  border-color: #2563eb;
}

.active-search {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-top: 10px;
  padding: 10px 13px;

  background: #ffffff;

  border: 1px solid #e5e7eb;
  border-radius: 6px;

  color: #6b7280;
  font-size: 12px;
}

.active-search strong {
  color: #111827;
}

.clear-search {
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;

  text-decoration: none;
}

.clear-search:hover {
  text-decoration: underline;
}

.products-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 20px;

  margin-top: 18px;
}

.product-card {
  min-width: 0;

  display: flex;
  flex-direction: column;

  background: #ffffff;

  border-radius: 7px;

  overflow: hidden;

  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.product-card:hover {
  transform: translateY(-2px);

  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.product-image-link {
  display: block;

  text-decoration: none;
}

.product-image-container {
  width: 100%;
  height: 160px;

  background: #ffffff;

  overflow: hidden;
}

.product-image {
  width: 100%;
  height: 100%;

  display: block;

  object-fit: cover;

  transition: transform 0.2s ease;
}

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

.product-card-body {
  min-height: 140px;

  display: flex;
  flex-direction: column;

  padding: 13px;
}

.product-name-link {
  color: inherit;
  text-decoration: none;
}

.product-name {
  min-height: 38px;

  margin: 0;

  color: #111827;

  font-size: 12px;
  font-weight: 500;

  line-height: 1.45;

  display: -webkit-box;

  -webkit-box-orient: vertical;

  overflow: hidden;
}

.product-name-link:hover .product-name {
  color: #2563eb;
}

.product-price {
  margin: 9px 0 13px;

  color: #111827;

  font-size: 14px;
  font-weight: 700;
}

.product-pricing {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.product-original-price {
  margin: 0;
  color: #888;
  font-size: 13px;
  text-decoration: line-through;
}

.product-price.discounted {
  margin: 0;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
}

.product-offer-badge {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 4px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 700;
}

.product-card-actions {
  display: flex;
  align-items: center;

  gap: 7px;

  margin-top: auto;
}

.add-cart-btn {
  height: 37px;

  flex: 1;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 8px;

  padding: 0 10px;

  border: none;
  border-radius: 5px;

  background: #2563eb;
  color: #ffffff;

  font-size: 11px;
  font-weight: 500;

  cursor: pointer;
}

.add-cart-btn:hover {
  background: #1d4ed8;
}

.cart-icon {
  font-size: 14px;
  line-height: 1;
}

.wishlist-btn {
  width: 37px;
  height: 37px;

  flex-shrink: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #d1d5db;
  border-radius: 5px;

  background: #ffffff;
  color: #64748b;

  font-size: 22px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;
}

.wishlist-btn:hover {
  border-color: #9ca3af;
  color: #2563eb;
  background: #f9fafb;
}

/* Checked / already in wishlist */
.wishlist-btn.checked {
  border-color: #2563eb;
  background: #eff6ff;
  color: #2563eb;
}

.wishlist-btn.checked:hover {
  border-color: #1d4ed8;
  background: #dbeafe;
  color: #1d4ed8;
}

.no-products {
  grid-column: 1 / -1;

  min-height: 250px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: #ffffff;

  border-radius: 7px;

  text-align: center;
}

.no-products h2 {
  margin: 0 0 8px;

  color: #111827;

  font-size: 18px;
}

.no-products p {
  margin: 0 0 18px;

  color: #6b7280;

  font-size: 13px;
}

.clear-products-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  height: 36px;

  padding: 0 16px;

  border-radius: 5px;

  background: #2563eb;
  color: #ffffff;

  font-size: 12px;
  font-weight: 500;

  text-decoration: none;
}

.clear-products-btn:hover {
  background: #1d4ed8;
}

.product-pagination {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 5px;

  margin-top: 26px;
}

.pagination-number,
.pagination-btn {
  min-width: 34px;
  height: 32px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  box-sizing: border-box;

  padding: 0 9px;

  border: 1px solid #d1d5db;
  border-radius: 5px;

  background: #ffffff;
  color: #374151;

  font-size: 12px;

  text-decoration: none;

  cursor: pointer;
}

.pagination-number:hover,
.pagination-btn:hover {
  background: #f3f4f6;
}

.pagination-number.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.pagination-btn.disabled {
  color: #9ca3af;
  background: #f9fafb;

  cursor: default;
}

.pagination-btn.disabled:hover {
  background: #f9fafb;
}

@media (max-width: 1100px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 850px) {
  .products-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
  }
}

@media (max-width: 650px) {
  .products-page {
    padding: 22px 12px 40px;
  }

  .products-page-title {
    font-size: 23px;
    margin-bottom: 18px;
  }

  .products-layout {
    grid-template-columns: 1fr;
  }

  .product-filters {
    width: 100%;
  }

  .products-toolbar {
    min-height: auto;

    flex-direction: column;
    align-items: stretch;

    gap: 12px;

    padding: 13px;
  }

  .product-sort {
    justify-content: space-between;
  }

  .product-sort select {
    flex: 1;
  }

  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .product-image-container {
    height: 150px;
  }

  .product-card-body {
    padding: 10px;
  }
}

@media (max-width: 450px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-image-container {
    height: 200px;
  }

  .price-inputs {
    gap: 10px;
  }
}
