/* ==========================================
   Schickst Store - Categories & Products
   ========================================== */

/* Shop by Category Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.category-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary-violet);
  box-shadow: var(--shadow-lg);
}

.category-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--lavender-light);
  color: var(--primary-violet);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: all var(--transition-fast);
}

.category-card:hover .category-icon-wrapper {
  background: var(--grad-promo);
  color: white;
  transform: scale(1.1);
}

.category-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.category-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.category-btn-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-violet);
  margin-top: 0.25rem;
}

/* Category Filter Tabs */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--bg-card);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--primary-violet);
  border-color: var(--primary-violet);
}

.tab-btn.active {
  background: var(--grad-promo);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(201, 162, 74, 0.3);
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all var(--transition-normal);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(201, 162, 74, 0.3);
}

/* Card Media Header */
.product-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--bg-alt);
  overflow: hidden;
}

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

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

/* Badges overlay */
.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

html[dir="rtl"] .product-badges {
  left: auto;
  right: 10px;
}

.product-quick-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-fast);
}

html[dir="rtl"] .product-quick-actions {
  right: auto;
  left: 10px;
  transform: translateX(-10px);
}

.product-card:hover .product-quick-actions {
  opacity: 1;
  transform: translateX(0);
}

.quick-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  color: var(--text-dark);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.quick-action-btn:hover {
  background: var(--accent-pink);
  color: white;
  transform: scale(1.1);
}

.quick-action-btn.active {
  background: var(--accent-rose);
  color: white;
}

/* Product Info Body */
.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-type-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-violet);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: 2.7em;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.stars {
  color: var(--accent-amber);
}

.reviews-count {
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Price Box */
.product-price-box {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: auto;
  margin-bottom: 1rem;
}

.current-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-deep);
}

.old-price {
  font-size: 0.9rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.discount-tag {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--accent-rose);
}

/* Offer / Savings Tag */
.product-offer-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #16a34a;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  margin-top: 0.35rem;
  width: fit-content;
}
[data-theme="dark"] .product-offer-tag {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(134, 239, 172, 0.3);
  color: #4ade80;
}

/* Product Footer Action */
.product-footer {
  margin-top: 0.5rem;
}

.add-cart-btn {
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--primary-violet);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.add-cart-btn:hover {
  background: var(--primary-deep);
  box-shadow: 0 4px 12px rgba(18, 16, 12, 0.3);
}

.affiliate-btn {
  background: var(--grad-amber);
  color: var(--text-dark);
}

.affiliate-btn:hover {
  background: #A67C2E;
  color: white;
}

.digital-btn {
  background: linear-gradient(135deg, #2A2118 0%, #171310 100%);
}

/* Responsive Products Grid */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  .product-body {
    padding: 0.9rem;
  }
  .current-price {
    font-size: 1.05rem;
  }
}

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