/* Extracted from categories.php (LTR default + RTL overrides) */
:root {
  --primary-color: #f68b1e;
  --primary-dark: #dd7d1b;
  --secondary-color: #1a1a1a;
  --gray-light: #f8f9fa;
  --gray-border: #e9ecef;
  --text-muted: #6c757d;
  --stock-high: #28a745;
  --stock-medium: #ffc107;
  --stock-low: #ff9800;
  --stock-danger: #dc3545;
}
body {
  background: #f5f7fb;
  font-family: var(--font-main);
}
.hero-section {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1a2a3a 100%);
  color: white;
  padding: 1.5rem 0;
  margin-bottom: 1.5rem;
  text-align: center;
}
.hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0;
}
.category-strip {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--gray-border);
  padding-bottom: 1rem;
}
.strip-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.category-label {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 0.4rem 1rem;
  border-radius: 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border: 1px solid var(--gray-border);
  flex-shrink: 0;
}
.category-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
}
.category-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--secondary-color);
  margin: 0;
}
.view-all-link {
  background: transparent;
  color: var(--primary-color);
  font-size: 0.75rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.view-all-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}
.products-scroll {
  position: relative;
  flex: 1;
  min-width: 0;
}
.products-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.products-wrapper::-webkit-scrollbar {
  height: 4px;
}
.products-wrapper::-webkit-scrollbar-track {
  background: var(--gray-light);
  border-radius: 10px;
}
.products-wrapper::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}
.products-horizontal {
  display: flex;
  gap: 0.8rem;
  padding: 0.3rem 0;
  min-width: min-content;
}
.product-card {
  width: 170px;
  flex-shrink: 0;
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  border-color: var(--primary-color);
}
.product-image-container {
  position: relative;
  background: var(--gray-light);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
}
.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
  transition: transform 0.3s ease;
}
.product-card:hover .product-image {
  transform: scale(1.05);
}
.discount-badge {
  position: absolute;
  top: 5px;
  left: 5px;
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 15px;
  font-size: 0.6rem;
  font-weight: 600;
}
.new-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: var(--primary-color);
  color: white;
  padding: 2px 6px;
  border-radius: 15px;
  font-size: 0.6rem;
  font-weight: 600;
}
.out-of-stock-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #dc3545;
  color: white;
  padding: 2px 6px;
  border-radius: 15px;
  font-size: 0.6rem;
  font-weight: 600;
}
.product-content {
  padding: 0.6rem;
}
.product-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-color);
  margin-bottom: 0.3rem;
  line-height: 1.3;
  height: 2.4rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  cursor: pointer;
}
.product-name:hover {
  color: var(--primary-color);
}
.product-price {
  margin-bottom: 0.4rem;
}
.current-price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--primary-color);
}
.compare-price {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 4px;
}
.stock-bar-container {
  margin-top: 0.2rem;
}
.stock-bar {
  height: 3px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
}
.stock-bar-fill {
  height: 100%;
  border-radius: 3px;
}
.stock-bar-fill.high {
  background: var(--stock-high);
}
.stock-bar-fill.medium {
  background: var(--stock-medium);
}
.stock-bar-fill.low {
  background: var(--stock-low);
}
.stock-text {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  display: block;
}
.out-of-stock-text {
  font-size: 0.65rem;
  color: #dc3545;
  font-weight: 600;
  margin-top: 0.2rem;
}
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  background: white;
  border: 1px solid var(--gray-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.5;
  transition: all 0.3s;
  z-index: 10;
}
.scroll-btn:hover {
  opacity: 1;
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}
.scroll-left {
  left: -10px;
}
.scroll-right {
  right: -10px;
}
.no-products-message {
  text-align: center;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
}
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.2rem;
  }
  .category-icon {
    display: none;
  }
  .category-label {
    padding: 0.3rem 0.8rem;
  }
  .category-name {
    font-size: 0.85rem;
  }
  .product-card {
    width: 140px;
  }
  .product-name {
    font-size: 0.7rem;
    height: 2.2rem;
  }
  .current-price {
    font-size: 0.8rem;
  }
  .scroll-left, .scroll-right {
    display: none;
  }
}
@media (max-width: 480px) {
  .product-card {
    width: 130px;
  }
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1rem;
}
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
.category-description {
  background: rgba(255,255,255,0.1);
  padding: 1rem;
  border-radius: 12px;
  margin-top: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ===== RTL (Arabic) ===== */
html[dir="rtl"] .discount-badge {
  right: 5px;
  left: auto;
}
html[dir="rtl"] .new-badge {
  left: 5px;
  right: auto;
}
html[dir="rtl"] .out-of-stock-badge {
  left: 5px;
  right: auto;
}
html[dir="rtl"] .compare-price {
  margin-right: 4px;
  margin-left: 0;
}
html[dir="rtl"] .scroll-left {
  right: -10px;
  left: auto;
}
html[dir="rtl"] .scroll-right {
  left: -10px;
  right: auto;
}
