/* Page Header */
.page-header {
  background-color: var(--color-bg);
  padding: 120px 0 60px; /* Account for fixed header */
  text-align: center;
}

.page-header h1 {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
}

.main-content {
  display: flex;
  flex-direction: column;
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-xl);
  gap: var(--spacing-lg);
}

@media (min-width: 992px) {
  .main-content {
    flex-direction: row;
  }

  .filters {
    width: 250px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    height: fit-content;
  }

  .product-grid {
    flex-grow: 1;
  }
}

/* Filters Sidebar */
.filters h3 {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-md);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--spacing-sm);
}

.filters ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.filters a {
  color: var(--color-text-muted);
  font-weight: 500;
  display: block;
  padding: 5px 0;
}

.filters a:hover,
.filters a.active {
  color: var(--color-secondary);
  transform: translateX(5px);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.product-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid transparent;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-highlight);
}

.product-image {
  position: relative;
  height: 300px;
  overflow: hidden;
  background-color: #f0f0f0;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

/* Badges */
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: white;
  z-index: 10;
}

.badge.new {
  background-color: var(--color-secondary);
}

.badge.sale {
  background-color: #e76f51;
}

.product-info {
  padding: var(--spacing-md);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xs);
  color: var(--color-text-main);
}

.price {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-bottom: var(--spacing-xs);
}

.original-price {
  text-decoration: line-through;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-right: 5px;
}

.rating {
  color: #f4a261;
  font-size: 0.9rem;
  margin-bottom: var(--spacing-sm);
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating span {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.product-card .add-to-cart {
  width: 100%;
  border-radius: 0;
  margin-top: auto;
  opacity: 0;
  transform: translateY(10px);
}

/* On hover, show button (desktop preference) */
@media (hover: hover) {
  .product-card:hover .add-to-cart {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Always show on touch or if convenient */
@media (hover: none) {
  .product-card .add-to-cart {
    opacity: 1;
    transform: translateY(0);
  }
}
