/* Products Page Styles */
.products-page {
  background: #f5f6fa;
  min-height: 100vh;
  padding-top: 60px;
}

.products-container {
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  padding: 20px 22px;
}

/* Sidebar Styles */
.products-sidebar {
  width: 240px;
  flex-shrink: 0;
}

.sidebar-categories h3 {
  margin: 0 0 16px;
  color: #1f2736;
  font-size: 18px;
  font-weight: 700;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item {
  margin-bottom: 4px;
}

.category-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #5f687a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.category-item a:hover {
  background: #e8edf6;
  color: #283247;
}

.category-item.active a {
  background: #f3c433;
  color: #1d2432;
  font-weight: 600;
}

.category-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

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

/* Filter Tabs */
.products-filter {
  margin-bottom: 20px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.filter-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  color: #5f687a;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  color: #283247;
}

.filter-tab.active {
  background: #f3c433;
  color: #1d2432;
  font-weight: 600;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.product-card {
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-image {
  width: 100%;
  height: 140px;
  background: #f0f2f5;
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.discount-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #ff4757;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}

.product-info {
  padding: 12px;
}

.product-title {
  margin: 0 0 8px;
  color: #1f2736;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 36px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.rating-stars {
  color: #f0b528;
  font-size: 12px;
  font-weight: 600;
}

.rating-value {
  color: #f0b528;
  font-size: 12px;
  font-weight: 600;
}

.reviews-count {
  color: #8c95a9;
  font-size: 11px;
  font-weight: 500;
}

.product-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f2f5;
}

.gold-value {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #f0b528;
  font-size: 13px;
  font-weight: 600;
}

.gold-icon {
  width: 16px;
  height: 16px;
  background: #f0b528;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1d2432;
  font-size: 10px;
  font-weight: 700;
}

.sold-count {
  color: #8c95a9;
  font-size: 11px;
  font-weight: 500;
}

/* Load More Button */
.load-more-wrap {
  text-align: center;
  margin-top: 24px;
}

.load-more-btn {
  background: #ffffff;
  color: #5f687a;
  border: 1px solid #dce1eb;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover {
  background: #f8f9fb;
  border-color: #c4c9d4;
  color: #283247;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .products-container {
    flex-direction: column;
  }
  
  .products-sidebar {
    width: 100%;
    margin-bottom: 20px;
  }
  
  .category-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .category-item {
    flex-shrink: 0;
  }
  
  .category-item a {
    white-space: nowrap;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .products-page {
    padding-top: 50px;
  }
  
  .products-container {
    padding: 16px var(--page-pad-x, 16px) calc(24px + env(safe-area-inset-bottom, 0px));
  }
  
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  
  .product-image {
    height: 100px;
  }
  
  .product-title {
    font-size: 12px;
    min-height: 30px;
    line-height: 1.25;
  }
  
  .sidebar-categories h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .products-container {
    padding: 14px var(--page-pad-x-sm, 12px) calc(20px + env(safe-area-inset-bottom, 0px));
  }

  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }
  
  .product-image {
    height: 88px;
  }
  
  .product-info {
    padding: 8px;
  }
  
  .filter-tabs {
    padding: 2px;
  }
  
  .filter-tab {
    padding: 6px 12px;
    font-size: 13px;
  }
}
