/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-purple: #6B46C1;
  --light-purple: #F3F0FF;
  --dark-purple: #553C9A;
  --background-light: #F8FAFC;
  --text-dark: #1E293B;
  --text-gray: #64748B;
  --border-light: #E2E8F0;
  --white: #FFFFFF;
  --green-accent: #10B981;
  --orange-accent: #F59E0B;
  --red-accent: #EF4444;
  --pink-accent: #EC4899;
  --blue-accent: #3B82F6;
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-promo: linear-gradient(45deg, #0b0b0b, #0b0b0b);
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: 0.3s ease;
}

html, body {
  font-family: 'Tajawal', Arial, sans-serif;
}

/* RTL Support */
[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

[dir="ltr"] .search-input {
  text-align: left;
}

[dir="ltr"] .mobile-menu {
  right: auto;
  left: -300px;
}

[dir="ltr"] .mobile-menu.active {
  left: 0;
}

[dir="ltr"] .cart-badge {
  right: auto;
  left: -5px;
}

[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

a{
    text-decoration: none;
    color: inherit;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: var(--white);
  box-shadow: var(--shadow-light);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-bar {
  background: var(--primary-purple);
  color: var(--white);
  padding: 8px 0;
  font-size: 14px;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.language-switcher {
  display: flex;
  gap: 15px;
  align-items: center;
}

.lang-btn {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 4px;
  transition: background var(--transition);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 14px;
}

.lang-btn.active,
.lang-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.main-header {
  padding: 15px 0;
}

.header-content {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 30px;
}

.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-purple);
  text-decoration: none;
}

.search-container {
  flex: 1;
  max-width: 500px;
}

.search-bar {
  display: flex;
  background: var(--background-light);
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 2px solid var(--border-light);
  transition: border-color var(--transition);
}

.search-bar:focus-within {
  border-color: var(--primary-purple);
}

.search-input {
  flex: 1;
  padding: 12px 15px;
  border: none;
  background: transparent;
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 16px;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: var(--text-gray);
}

.search-btn {
  background: var(--primary-purple);
  border: none;
  color: var(--white);
  padding: 12px 20px;
  cursor: pointer;
  transition: background var(--transition);
}

.search-btn:hover {
  background: var(--dark-purple);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: all var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: var(--light-purple);
  color: var(--primary-purple);
}

.cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--red-accent);
  color: var(--white);
  border-radius: 50%;
  width: 14px;
  height: 14px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Wrap the cart icon so the badge anchors to it */
.cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Override badge positioning to sit on the icon corner (both LTR/RTL) */
.cart-icon-wrap .cart-badge {
  top: -4px;
  right: auto;
  left: auto;
  inset-inline-end: -4px;
  z-index: 1;
}

/* Navigation */
.nav {
  background: var(--white);
  border-top: 1px solid var(--border-light);
  padding: 0;
}

.nav-content {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Navigation icons and text alignment */
.nav-links { gap: 10px; }
/* Nav link base and interactive styles */
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #e5e7eb;
  text-decoration: none;
  border-radius: 12px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Keep icons synced with text color */
.nav-link iconify-icon,
.nav-link .nav-icon,
.nav-link .nav-caret { color: currentColor; }

.nav {
  background: #181a1e;
}
.nav-link { color: #e5e7eb; }
.nav-link.active { color: var(--white); }
.nav-link:hover { color: var(--white); }

.nav-link:hover,
.nav-link.active {
  color: var(--primary-purple);
  background: var(--light-purple);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-purple);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  right: -400px;
  width: 400px;
  background: var(--white);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right var(--transition);
  z-index: 2000;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

[dir="ltr"] .cart-sidebar {
  right: auto;
  left: -400px;
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

[dir="ltr"] .cart-sidebar.active {
  left: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
}

.cart-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-dark);
  transition: color var(--transition);
}

.cart-close:hover {
  color: var(--primary-purple);
}

.cart-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.cart-items {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 0;
}

.cart-item {
  display: flex;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-light);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-image {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 5px;
  line-height: 1.3;
}

.cart-item-brand {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 8px;
}

.cart-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-purple);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--background-light);
  border-radius: 6px;
  padding: 4px;
}

.quantity-btn {
  background: none;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
  color: var(--text-dark);
}

.quantity-btn iconify-icon { width: 16px; height: 16px; color: inherit; }

.quantity-btn:hover {
  background: var(--primary-purple);
  color: var(--white);
}

.quantity-input {
  width: 30px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.remove-item-btn {
  background: none;
  border: none;
  color: var(--red-accent);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background var(--transition);
}

.remove-item-btn:hover {
  background: rgba(239, 68, 68, 0.1);
}

.cart-summary {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background: var(--background-light);
  flex-shrink: 0;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}

.total-amount {
  color: var(--primary-purple);
}

.checkout-btn {
  width: 100%;
  background: var(--primary-purple);
  color: var(--white);
  border: none;
  padding: 12px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  margin-bottom: 10px;
}

.checkout-btn:hover {
  background: var(--dark-purple);
}

.continue-shopping-btn {
  width: 100%;
  background: transparent;
  color: var(--primary-purple);
  border: 2px solid var(--primary-purple);
  padding: 10px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.continue-shopping-btn:hover {
  background: var(--primary-purple);
  color: var(--white);
}

.empty-cart {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-gray);
}

.empty-cart-icon {
  font-size: 48px;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-cart h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.empty-cart p {
  font-size: 14px;
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-dark);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--white);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transition: right var(--transition);
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

/* Language-aware mobile menu positioning */
[dir="ltr"] .mobile-menu {
  right: auto;
  left: -300px;
  transition: left var(--transition);
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

[dir="ltr"] .mobile-menu.active {
  left: 0;
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1500;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.mobile-menu-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text-dark);
}

.mobile-nav-links {
  list-style: none;
  margin-bottom: 30px;
}

.mobile-nav-link {
  color: var(--text-dark);
  text-decoration: none;
  display: block;
  padding: 15px 0;
  border-bottom: 1px solid var(--border-light);
  font-weight: 500;
  transition: color var(--transition);
}

.mobile-nav-link:hover {
  color: var(--primary-purple);
}

.mobile-actions {
  margin-top: 30px;
}

.mobile-action-btn {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  background: none;
  border: none;
  padding: 15px 0;
  color: var(--text-dark);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: color var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.mobile-action-btn:hover {
  color: var(--primary-purple);
}

/* Main Content */
.main-content {
  padding: 0 0 30px;
}

/* Hero Banner */
.hero-banner {
  background: var(--gradient-hero);
  border-radius: var(--border-radius);
  padding: 40px;
  margin-bottom: 50px;
  color: var(--white);
  overflow: hidden;
  position: relative;
}

/* Categories - horizontal chips with infinite carousel effect */
.categories-scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  cursor: grab;
  user-select: none;
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.categories-scroller:active {
  cursor: grabbing;
}

/* Hide scrollbar completely */
.categories-scroller::-webkit-scrollbar {
  display: none;
}

.categories-scroller {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Add fade effect at edges */
.categories-scroller-wrapper {
  position: relative;
  margin: 0 -8px;
  padding: 0 8px;
}

.categories-scroller-wrapper::before,
.categories-scroller-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  pointer-events: none;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.categories-scroller-wrapper::before {
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

.categories-scroller-wrapper::after {
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

[dir="rtl"] .categories-scroller-wrapper::before {
  left: auto;
  right: 0;
  background: linear-gradient(to left, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

[dir="rtl"] .categories-scroller-wrapper::after {
  right: auto;
  left: 0;
  background: linear-gradient(to right, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0));
}

/* Navigation buttons for carousel */
.categories-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.categories-scroller-wrapper:hover .categories-nav-btn {
  opacity: 1;
  pointer-events: all;
}

.categories-nav-btn:hover {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  color: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.categories-nav-btn:active {
  transform: translateY(-50%) scale(0.95);
}

.categories-nav-btn--prev {
  left: 16px;
}

.categories-nav-btn--next {
  right: 16px;
}

[dir="rtl"] .categories-nav-btn--prev {
  left: auto;
  right: 16px;
}

[dir="rtl"] .categories-nav-btn--next {
  right: auto;
  left: 16px;
}

.categories-nav-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (max-width: 768px) {
  .categories-nav-btn {
    display: none;
  }

  .categories-scroller-wrapper::before,
  .categories-scroller-wrapper::after {
    width: 40px;
  }
}

.category-chip {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  scroll-snap-align: start;
}

.chip-circle {
  width: 110px;
  height: 110px;
  border-radius: 9999px;
  background: #f3f4f6;
  border: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.chip-circle:hover {
  background: #fff;
  border-color: var(--primary-purple);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.chip-circle:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--light-purple);
}

.chip-circle:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

.chip-circle:active {
  transform: scale(0.98);
}

.chip-circle--active,
.category-chip.is-active .chip-circle {
  border: 3px solid var(--primary-purple);
  background: #fff;
  box-shadow: 0 0 0 4px var(--light-purple);
}

.category-chip.is-active .chip-label {
  color: var(--primary-purple);
  font-weight: 900;
}

.chip-circle img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.chip-circle:hover img {
  transform: scale(1.1);
}

.chip-label {
  font-weight: 800;
  font-size: 16px;
  text-align: center;
  width: 100%;
  transition: color 0.3s ease;
}

.category-chip:hover .chip-label {
  color: var(--primary-purple);
}

.chip-panel {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  inset-inline-start: calc(100% + 16px);
  background: #fff;
  border-radius: 28px;
  padding: 20px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
  min-width: 520px;
  max-width: 90vw;
  z-index: 50;
  backdrop-filter: blur(10px);
}

/* In RTL, open to the other side */
[dir="rtl"] .category-chip .chip-panel {
  inset-inline-start: auto;
  inset-inline-end: calc(100% + 16px);
}
.category-chip.expanded .chip-panel { display: block; }

/* Expanded state becomes part of layout and pushes siblings */
.category-chip.expanded {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-auto-rows: auto;
  align-items: center;
  justify-items: center;
  column-gap: 20px;
  padding: 18px 22px;
  background: #fff;
  border-radius: 28px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.category-chip.expanded .chip-circle {
  grid-column: 1;
  grid-row: 1;
}

.category-chip.expanded .chip-label {
  grid-column: 1;
  grid-row: 2;
}

.category-chip.expanded .chip-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
  position: static;
  transform: none;
  inset: auto;
  margin: 0;
  box-shadow: none;
  background: transparent;
  min-width: 420px;
  animation: chipIn 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Flip layout for RTL so panel opens to the left */
/* In RTL, ensure the panel sits to the left (inline-end), circle+label to the right */
[dir="rtl"] .category-chip.expanded { grid-template-columns: auto 1fr; }
[dir="rtl"] .category-chip.expanded .chip-panel { grid-column: 2 !important; }
[dir="rtl"] .category-chip.expanded .chip-circle,
[dir="rtl"] .category-chip.expanded .chip-label { grid-column: 1 !important; }

@keyframes chipIn {
  from { opacity: 0; transform: scale(0.98); }
  to   { opacity: 1; transform: scale(1); }
}

/* Closing animation support */
.category-chip.closing .chip-panel { display: block; animation: chipOut 200ms ease forwards; }
@keyframes chipOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.98); }
}

.chip-panel__items {
  display: flex;
  gap: 22px;
  align-items: center;
}
.subcat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 90px;
}

.subcat__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.subcat__link:hover {
  background: rgba(139, 92, 246, 0.05);
  transform: translateY(-2px);
}

.subcat__link:focus {
  outline: none;
  background: rgba(139, 92, 246, 0.08);
}

.subcat__link:focus-visible {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

.subcat__link:active {
  transform: translateY(0);
}

.subcat__link img {
  width: 70px;
  height: 70px;
  border-radius: 9999px;
  background: #fff;
  object-fit: contain;
  padding: 10px;
  box-shadow: inset 0 0 0 1px #eee;
  overflow: hidden;
  display: block;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.subcat__link:hover img {
  box-shadow: inset 0 0 0 2px var(--primary-purple), 0 4px 12px rgba(139, 92, 246, 0.15);
  transform: scale(1.05);
}

.subcat__link span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  transition: color 0.3s ease;
  text-align: center;
  max-width: 100px;
  word-wrap: break-word;
}

.subcat__link:hover span {
  color: var(--primary-purple);
}

.subcat.is-active .subcat__link img {
  box-shadow: inset 0 0 0 2px var(--primary-purple);
  background: rgba(139, 92, 246, 0.05);
}

.subcat.is-active .subcat__link span {
  color: var(--primary-purple);
}

@media (max-width: 768px) {
  .chip-circle {
    width: 92px;
    height: 92px;
    min-width: 44px;
    min-height: 44px;
  }

  .chip-label {
    font-size: 14px;
  }

  .chip-panel {
    min-width: 280px;
    padding: 16px 18px;
  }

  .chip-panel__items {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .subcat {
    min-width: 75px;
  }

  .subcat__link img {
    width: 60px;
    height: 60px;
    padding: 8px;
  }

  .subcat__link span {
    font-size: 12px;
    max-width: 80px;
  }

  .category-chip.expanded {
    padding: 14px 16px;
    column-gap: 14px;
  }

  .category-chip.expanded .chip-panel {
    min-width: 100%;
  }
}

@media (max-width: 480px) {
  .chip-circle {
    width: 80px;
    height: 80px;
  }

  .categories-scroller {
    gap: 14px;
    padding: 6px 2px;
  }

  .chip-panel {
    min-width: 240px;
    padding: 14px 16px;
  }

  .chip-panel__items {
    gap: 12px;
  }
}

.banner-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  max-width: 1000px;
}

.badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 15px;
  display: inline-block;
}

.banner-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.1;
}

.highlight {
  display: block;
  font-size: 1.5rem;
  font-weight: 400;
}

.percentage {
  color: var(--orange-accent);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-subtitle {
  font-size: 1.1rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.cta-btn {
  background: var(--white);
  color: var(--primary-purple);
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.cta-btn:hover {
  background: var(--light-purple);
  transform: translateY(-2px);
}

.banner-image img {
  max-width: 300px;
  border-radius: var(--border-radius);
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-dark);
}

.view-all-btn {
  background: var(--primary-purple);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.view-all-btn:hover {
  background: var(--dark-purple);
  transform: translateY(-1px);
}

/* Categories Section */
.categories-section {
  margin-bottom: 50px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.category-item {
  background: var(--white);
  padding: 25px 15px;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: all var(--transition);
  cursor: pointer;
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.category-icon {
  background: var(--light-purple);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  color: var(--primary-purple);
  transition: all var(--transition);
}

.category-item:hover .category-icon {
  background: var(--primary-purple);
  color: var(--white);
}

.category-item span {
  font-weight: 500;
  color: var(--text-dark);
}

/* Products Section */
.products-section {
  margin-bottom: 50px;
}

/* Unified spacing for all home page sections - ensures consistent spacing when reordered */
section.products-section,
section.categories-section,
section.brands-section,
section.vendors-showcase-section {
  margin-bottom: 50px !important;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.product-card {
  background: var(--white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--border-light);
  transition: all var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-medium);
}

.product-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
}

.product-card--modern { box-shadow: 0 0 0 1px var(--border-light); }
.product-image--contain { background: #f6f7fb; display: flex; align-items: center; justify-content: center; }
.product-image--contain img { width: 90%; height: 90%; object-fit: contain; }

.sale-chip { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; background: var(--primary-purple); color: #fff; padding: 6px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.wishlist-btn { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-light); background: #fff; color: var(--text-dark); display: inline-flex; align-items: center; justify-content: center; }
.wishlist-btn:hover { color: var(--primary-purple); }

.product-info--modern { padding: 14px 16px 16px; text-align: start; }
.product-title--tight { margin: 6px 0 8px; font-weight: 800; font-size: 13px; line-height: 1.35; }
.rating-pill { display: inline-flex; align-items: center; gap: 6px; background: #f1f2f4; color: #111827; border-radius: 9999px; padding: 4px 8px; font-size: 12px; font-weight: 700; }
.rating-pill iconify-icon { color: var(--orange-accent); }
.rating-pill .count { opacity: 0.7; }
.rating-pill .dot { opacity: 0.4; }

.product-bottom-row { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; }
.mini-action { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--primary-purple); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.mini-action:hover { background: var(--dark-purple); }
.price-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; }
[dir="rtl"] .price-stack { align-items: flex-start; text-align: right; }
.price-label { font-size: 12px; color: var(--text-gray); }
.price-line { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; }
.price-line .currency { font-size: 12px; color: var(--text-gray); font-weight: 700; }
.price-line .current { font-size: 18px; }
.price-line .original { font-size: 12px; color: var(--text-gray); text-decoration: line-through; }

/* Ensure price appears at the start side and cart icon at the end, language-aware */
.product-bottom-row .price-stack { order: 0; }
.product-bottom-row .mini-action { order: 1; }

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

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

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-purple);
  color: var(--white);
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
}

.product-badge.discount {
  background: var(--red-accent);
}

.product-badge.new {
  background: var(--green-accent);
}

.product-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transition: opacity var(--transition);
}

.product-card:hover .product-actions {
  opacity: 1;
}

.product-action-btn {
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--text-dark);
}

.product-action-btn:hover {
  background: var(--white);
  color: var(--primary-purple);
  transform: scale(1.1);
}

.product-info {
  padding: 20px;
}

.product-brand {
  color: var(--text-gray);
  font-size: 14px;
  margin-bottom: 5px;
}

.product-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.stars {
  display: flex;
  gap: 2px;
  color: var(--orange-accent);
}

.rating-text {
  font-size: 14px;
  color: var(--text-gray);
}

.product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.current-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-purple);
}

.original-price {
  font-size: 14px;
  color: var(--text-gray);
  text-decoration: line-through;
}

.discount-percentage {
  background: var(--red-accent);
  color: var(--white);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.add-to-cart-btn {
  width: 100%;
  background: var(--primary-purple);
  color: var(--white);
  border: none;
  padding: 10px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition);
}

.add-to-cart-btn:hover {
  background: var(--dark-purple);
}

/* Promotional Banner (modern dark card) */
.promo-banner {
  background: #0b0b0b;
  border-radius: 22px;
  padding: 32px;
  margin: 32px 0;
  color: #f5f6f8;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.promo-content { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.promo-text { max-width: 520px; text-align: left; display: flex; flex-direction: column; align-items: flex-start; }
[dir="rtl"] .promo-text { text-align: right; align-items: flex-end; }
[dir="ltr"] .promo-text { text-align: left; align-items: flex-start; }
.promo-text h3 { font-size: clamp(28px, 4.5vw, 44px); font-weight: 900; line-height: 1.2; margin: 0 0 8px; color: #efece3; }
.promo-text h3 .accent { color: var(--primary-purple); }
.promo-text p { margin: 0 0 16px; color: #cfd3d9; font-size: 15px; }
/* Inverse button colors: light background, primary text; invert on hover */
.promo-btn { background: #ffffff; color: var(--primary-purple); border: 1px solid var(--border-light); padding: 10px 18px; border-radius: 9999px; font-weight: 800; }
.promo-btn:hover { background: var(--primary-purple); color: #fff; border-color: var(--primary-purple); }

.promo-image { flex: 1 1 50%; display: flex; align-items: center; justify-content: center; }
.promo-image img { max-width: min(520px, 90%); height: auto; object-fit: contain; filter: drop-shadow(0 12px 24px rgba(0,0,0,0.45)); }

/* Language-aware ordering: image left in both LTR/RTL mock; text opposite side */
/* Arabic: text on right, image on left. English: reverse */
[dir="rtl"] .promo-content { flex-direction: row; }
[dir="ltr"] .promo-content { flex-direction: row-reverse; }

@media (max-width: 900px) {
  .promo-content { flex-direction: column; text-align: center; }
  .promo-text { max-width: 100%; }
}

/* Override older grid rules: always use flex for promo-content */
.promo-banner .promo-content { display: flex !important; align-items: center; justify-content: space-between; }
[dir="rtl"] .promo-banner .promo-content { flex-direction: row !important; }
[dir="ltr"] .promo-banner .promo-content { flex-direction: row-reverse !important; }

/* Brands/Stores section */
.brands-section {
  margin: 0 0 50px 0;
}
.brands-scroller { display: flex; gap: 16px; overflow-x: auto; padding: 8px 2px; }
.brands-scroller::-webkit-scrollbar { height: 8px; }
.brands-scroller::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 9999px; }

.brand-card { flex: 0 0 auto; display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 14px 16px; border: 2px solid var(--border-light); border-radius: 18px; background: #fff; min-width: 260px; box-shadow: 0 0 0 1px rgba(0,0,0,0.02); }
.brand-card.active { border-color: var(--primary-purple); }

.brand-name { font-weight: 800; font-size: 18px; color: var(--text-dark); }
.brand-rating { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; background: #111827; color: #fff; padding: 6px 10px; border-radius: 9999px; font-weight: 800; font-size: 13px; }
.brand-rating iconify-icon { color: #fbbf24; width: 16px; height: 16px; }


/* Directional order inside brand card */
[dir="rtl"] .brand-card { flex-direction: row-reverse; justify-content: flex-end; }
[dir="ltr"] .brand-card { flex-direction: row-reverse; justify-content: flex-end; }
.brand-card .brand-text { display: flex; flex-direction: column; align-items: flex-start; }
[dir="rtl"] .brand-card .brand-text { align-items: flex-start; text-align: right; }
[dir="ltr"] .brand-card .brand-text { align-items: flex-start; text-align: left; }

.promo-content {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
}

.promo-text h3 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.promo-text p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  opacity: 0.9;
}

.promo-btn {
  background: var(--white);
  color: var(--primary-purple);
  border: none;
  padding: 12px 25px;
  border-radius: var(--border-radius);
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.promo-btn:hover {
  background: var(--light-purple);
  transform: translateY(-2px);
}

.promo-image img {
  max-width: 250px;
  border-radius: var(--border-radius);
}

/* Special Offers */
.offers-section {
  margin-bottom: 50px;
}

.offers-layout { display: grid; grid-template-columns: 1.35fr 1.65fr; gap: 22px; }
.offers-products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.offer-product-card { background: #fff; border-radius: 18px; border: 2px solid var(--border-light); overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,0.02); }
.opc-image { position: relative; background: #f6f7fb; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.opc-image img { width: 92%; height: 92%; object-fit: contain; }
.opc-chip { position: absolute; inset-block-start: 12px; inset-inline-start: 12px; background: var(--primary-purple); color: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: 12px; }
.opc-lock { position: absolute; inset-block-start: 12px; inset-inline-end: 12px; width: 32px; height: 32px; border-radius: 10px; background: #fff; color: var(--primary-purple); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 1px 0 rgba(0,0,0,0.05); }
.opc-footer { display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border-light); }
.opc-title { font-weight: 800; }
.opc-price { display: inline-flex; align-items: baseline; gap: 6px; font-weight: 800; }
.opc-price .opc-currency { font-size: 12px; color: var(--text-gray); }
.opc-price .opc-current { font-size: 18px; }
.opc-price .opc-original { font-size: 12px; color: var(--text-gray); text-decoration: line-through; }

.offers-tiles { display: grid; grid-template-rows: 1fr 1fr; gap: 18px; }
.offer-tile {
  background: #f3f4f6;
  border-radius: 28px;
  padding: 12px 26px 14px;
  display: flex; align-items: center; gap: 20px;
  min-height: 170px;
  overflow: hidden;
}
.offer-tile .tile-image { flex: 0 0 48%; display: flex; align-items: center; justify-content: center; }
.offer-tile .tile-image img {
  width: auto;
  max-width: 100%;
  max-height: 160px;
  height: auto;
  object-fit: contain;
  margin-top: 0;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.20));
}
[dir="rtl"] .offer-tile .tile-image { justify-content: flex-start; }
[dir="ltr"] .offer-tile .tile-image { justify-content: flex-end; }
.offer-tile .tile-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.offer-tile .tile-text h4 { font-size: clamp(28px, 4vw, 48px); font-weight: 900; margin: 0; color: #111827; line-height: 1.15; }
.offer-tile .tile-text p { margin: 4px 0 0; color: #6b7280; font-weight: 700; }
[dir="rtl"] .offer-tile .tile-text { align-items: flex-start; text-align: right; }
[dir="ltr"] .offer-tile .tile-text { align-items: flex-start; text-align: left; }
.tile--console { background: #f4ecd6; }
.tile--beauty { background: #d0936d; }
.tile--beauty .tile-text h4, .tile--beauty .tile-text p { color: #fff7ea; }
[dir="rtl"] .offer-tile { flex-direction: row; }
[dir="ltr"] .offer-tile { flex-direction: row-reverse; }

@media (max-width: 900px) {
  .offers-layout { grid-template-columns: 1fr; }
  .offers-tiles { grid-template-rows: none; grid-template-columns: 1fr; }
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.offer-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.08), rgba(107, 70, 193, 0.02));
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  transition: transform var(--transition), box-shadow var(--transition);
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.offer-card__figure {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  background: #f6f7fb;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.offer-card__media-link {
  display: block;
  width: 100%;
  height: 100%;
}

.offer-card__media-link img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.offer-card__badge {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-start: 8px;
  background: var(--primary-purple);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 6px 12px rgba(107, 70, 193, 0.25);
}

.offer-card__content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.offer-card__heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.offer-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-dark);
}

.offer-card__title a {
  color: inherit;
  text-decoration: none;
}

.offer-card__title a:hover {
  color: var(--primary-purple);
}

.offer-card__brand {
  background: var(--light-purple);
  color: var(--primary-purple);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.offer-card__meta-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-gray);
  line-height: 1.4;
}

.offer-card__meta-row iconify-icon {
  font-size: 15px;
}

.offer-card__meta-row--status {
  color: var(--primary-purple);
  font-weight: 600;
}

.offer-card__meta-row--accent {
  color: var(--green-accent);
  font-weight: 600;
}

.offer-card__aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

[dir="rtl"] .offer-card__aside {
  align-items: flex-start;
}

.offer-card__price {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 800;
  color: var(--text-dark);
}

.offer-card__price .currency {
  font-size: 11px;
  color: var(--text-gray);
}

.offer-card__price .current {
  font-size: 18px;
}

.offer-card__price .original {
  font-size: 11px;
  color: var(--text-gray);
  text-decoration: line-through;
}

.offer-card__cta {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-purple);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}

.offer-card__cta:hover {
  background: var(--dark-purple);
  transform: translateY(-2px);
}

/* Contact CTA Section (replaces newsletter) */
.contact-section { background: transparent; color: var(--text-dark); margin: 50px 0; padding: 10px 0 30px; }

.contact-cta {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 20px;
}

.cta-visual { display: flex; align-items: center; justify-content: center; }
.cta-visual img { max-width: min(560px, 100%); height: auto; object-fit: contain; filter: none; }

.cta-text { text-align: right; }
[dir="ltr"] .cta-text { text-align: left; }

.cta-title { font-size: clamp(28px, 5vw, 56px); font-weight: 900; color: var(--text-dark); line-height: 1.1; margin: 0 0 10px; }
.cta-title .accent { color: var(--primary-purple); }

.cta-sub { margin: 0 0 18px; color: var(--text-gray); font-size: clamp(14px, 2vw, 18px); }

.cta-btn { background: linear-gradient(135deg, #7C4DFF, #6B46C1); color: #fff; border: 0; padding: 12px 26px; border-radius: 9999px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 20px rgba(107,70,193,0.35); }
.cta-btn:hover { transform: translateY(-2px); }

.contact-help { text-align: center; margin-top: 32px; }
.help-title { font-size: clamp(24px, 4vw, 44px); font-weight: 900; color: var(--text-dark); margin: 0 0 8px; }
.help-title .accent { color: var(--primary-purple); }
.help-sub { color: var(--text-gray); font-size: 16px; }

/* Contact channels row */
.contact-channels { display: flex; align-items: center; justify-content: center; gap: clamp(20px, 6vw, 80px); margin-top: 28px; flex-wrap: wrap; }
.channel { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-dark); }
.channel-text { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.channel-text small { color: var(--text-gray); font-weight: 700; }
.channel-text strong { font-weight: 900; color: var(--text-dark); }
.channel-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: #0b0b0f; color: #f5efe2;
  position: relative; display: inline-block; line-height: 0;
  box-shadow: 0 2px 0 rgba(0,0,0,0.2);
}
.channel-icon iconify-icon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 24px; display: block;
}

@media (max-width: 900px) {
  .contact-channels { gap: 20px; }
}

@media (max-width: 900px) {
  .contact-cta { grid-template-columns: 1fr; text-align: center; }
  .cta-text { text-align: center !important; }
  .cta-visual img { max-width: min(380px, 100%); }
}

/* Footer */
.footer {
  background: linear-gradient(180deg, #0F172A 0%, #111827 100%);
  color: var(--white);
  padding: 64px 0 28px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px 48px;
  margin-bottom: 28px;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-bottom: 16px;
  color: #F3F4F6;
  position: relative;
}
.footer-title::after {
  content: "";
  position: absolute;
  inset-inline-start: 0; bottom: -8px;
  width: 44px; height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-purple));
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #9CA3AF;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  transition: color var(--transition), transform var(--transition);
}
.footer-links a::after {
  content: "›";
  font-weight: 900;
  opacity: 0.0;
  transform: translateX(-4px);
  transition: opacity var(--transition), transform var(--transition);
}
.footer-links a:hover {
  color: #E5E7EB;
}
.footer-links a:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: #D1D5DB;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}
.social-links a iconify-icon { font-size: 20px; line-height: 1; color: currentColor; }
.social-links a:hover {
  transform: translateY(-2px);
  background: rgba(124, 77, 255, 0.15);
  color: #EDE9FE;
  border-color: rgba(124, 77, 255, 0.35);
}

.footer-bottom {
  text-align: center;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,0.08);
  color: #9CA3AF;
}

/* Footer brand */
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand { text-align: start; }
[dir="rtl"] .footer-brand { align-items: flex-end; text-align: right; }
[dir="ltr"] .footer-brand { align-items: flex-start; text-align: left; }
.footer-logo { height: 36px; width: auto; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2)); }
.footer-tagline { color: #CBD5E1; font-size: 14px; }

/* Responsive Design - Mobile First */

/* Mobile Styles (default) */
@media (max-width: 767px) {
  .container {
      padding: 0 15px;
  }

  /* Header Mobile */
  .mobile-menu-btn {
      display: block;
      order: 1;
  }

  .header-content {
      grid-template-columns: auto 1fr auto;
      gap: 15px;
      position: relative;
  }

  .logo {
      font-size: 24px;
      order: 2;
      justify-self: center;
  }

  .search-container {
      order: 4;
      grid-column: 1 / -1;
      margin-top: 15px;
  }

  .header-actions {
      order: 3;
      gap: 10px;
  }

  .cart-btn {
      padding: 8px;
      gap: 8px;
  }

  .cart-total-info {
      display: none;
  }

  .language-switcher {
      order: 2;
  }

  .nav-links {
      display: none;
  }

  /* Hero Banner Mobile */
  .hero-banner {
      padding: 25px 20px;
      text-align: center;
  }

  .banner-content {
      grid-template-columns: 1fr;
      gap: 25px;
  }

  .banner-title {
      font-size: 2.5rem;
  }

  .banner-image {
      order: -1;
  }

  .banner-image img {
      max-width: 200px;
  }

  /* Categories Mobile */
  .categories-grid {
      grid-template-columns: repeat(3, 1fr);
      gap: 15px;
  }

  .category-item {
      padding: 20px 10px;
  }

  .category-icon {
      width: 50px;
      height: 50px;
      margin-bottom: 10px;
  }

  .category-item span {
      font-size: 14px;
  }

  /* Products Mobile */
  .products-grid {
      grid-template-columns: repeat(2, 1fr);
      gap: 15px;
  }

  .product-info {
      padding: 15px;
  }

  .product-title {
      font-size: 14px;
  }

  .current-price {
      font-size: 16px;
  }

  /* Promo Banner Mobile */
  .promo-banner {
      padding: 25px 20px;
      text-align: center;
  }

  .promo-content {
      grid-template-columns: 1fr;
      gap: 20px;
  }

  .promo-text h3 {
      font-size: 1.8rem;
  }

  .promo-text p {
      font-size: 1rem;
  }

  .promo-image img {
      max-width: 150px;
  }

  /* Newsletter Mobile */
  .newsletter-form {
      flex-direction: column;
  }

  /* Footer Mobile */
  .footer-content {
      grid-template-columns: 1fr;
      gap: 24px;
  }
  [dir="rtl"] .footer-content { text-align: right; }
  [dir="ltr"] .footer-content { text-align: left; }
  .footer-section { padding-inline: 0; }
  .footer-title { margin-bottom: 12px; }
  .footer-links li { margin-bottom: 8px; }
  .social-links { justify-content: flex-start; }
  /* Center just the branding block on mobile */
  .footer-brand { align-items: center; text-align: center; }
  [dir="rtl"] .footer-brand, [dir="ltr"] .footer-brand { align-items: center; text-align: center; }
}

/* Tablet Styles */
@media (min-width: 768px) and (max-width: 1199px) {
  .header-content {
      gap: 20px;
  }

  .search-container {
      max-width: 400px;
  }

  .categories-grid {
      grid-template-columns: repeat(4, 1fr);
  }

  .products-grid {
      grid-template-columns: repeat(3, 1fr);
  }

  .banner-title {
      font-size: 3rem;
  }

  .cart-total-info {
      display: flex;
  }
}

/* Desktop Styles */
@media (min-width: 1200px) {
  .categories-grid {
      grid-template-columns: repeat(6, 1fr);
  }

  .products-grid {
      grid-template-columns: repeat(6, 1fr);
  }

  .header-content {
      grid-template-columns: auto auto 1fr auto auto;
  }

  .cart-total-info {
      display: flex;
  }
}

/* Product Page */
.crumbs { display:flex; align-items:center; gap:8px; color: var(--text-gray); font-size:14px; margin: 18px 0 8px; }
.crumbs a { color: var(--text-gray); text-decoration: none; }
.crumbs .current { color: var(--text-dark); font-weight: 800; }

.product-page { margin: 14px 0 40px; }
.product-layout { display:grid; grid-template-columns: 1.1fr 1fr; align-items:start; gap: 28px; }

.product-page .product-title { font-size: clamp(22px, 3.5vw, 34px); font-weight: 900; color: var(--text-dark); margin: 10px 0 12px; }
.product-meta { display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 12px; }
.meta-pill { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; background:#f3f4f6; border-radius:9999px; color:#111827; font-weight:800; font-size:13px; }
.meta-pill iconify-icon { color:#f59e0b; }

.seg-controls { display:grid; gap:10px; margin-bottom: 14px; }
.seg-control { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.seg-label { font-weight:800; color:var(--text-gray); }
.seg-btn { border:1px solid var(--border-light); background:#fff; color:var(--text-dark); padding:6px 12px; border-radius:10px; font-weight:800; }
.seg-btn.is-active { background: var(--light-purple); color: var(--primary-purple); border-color: var(--primary-purple); }
.price-box { display:inline-flex; align-items:baseline; gap:6px; padding:0; background: transparent; border: none; box-shadow: none; }
.price-box .currency { color: var(--text-gray); font-size:12px; }
.price-box .value { font-size:32px; font-weight:900; }

.product-desc { color: var(--text-gray); font-size:14px; line-height:1.8; margin: 8px 0 16px; }

.options-grid { display:grid; gap:16px; }
.option-group { display:grid; gap:10px; }
.option-label { font-weight:800; color: var(--text-dark); }

.color-swatches { display:flex; gap:10px; }
.swatch { width:28px; height:28px; border-radius:50%; border:2px solid #e5e7eb; background: var(--sw, #ddd); cursor:pointer; }
.swatch.is-selected { outline:3px solid var(--light-purple); border-color: var(--primary-purple); }

.chip-row { display:flex; gap:10px; flex-wrap:wrap; }
.chip { border:1px solid var(--border-light); background:#fff; padding:8px 12px; border-radius:12px; font-weight:800; }
.chip.is-active { background: var(--light-purple); border-color: var(--primary-purple); color: var(--primary-purple); }

.dim-grid { display:grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap:10px; }
.dim { display:grid; gap:6px; }
.dim span { color: var(--text-gray); font-size:12px; font-weight:700; }
.dim input,
.dim select {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: 'Tajawal', Arial, sans-serif;
  background: #fff;
  color: var(--text-dark);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s;
}
.dim select:focus,
.dim input:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px var(--light-purple);
}

.qty { display:flex; align-items:center; gap:8px; }
.qty-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--border-light); background:#fff; font-size:18px; font-weight:900; }
.qty input { width:56px; text-align:center; border:1px solid var(--border-light); border-radius:10px; padding:8px 6px; }
.qty .stock { color: var(--text-gray); font-size:12px; margin-inline-start:6px; }

/* Installments cards (Tabby/Tamara) */
.installments { display:grid; gap:10px; width: 100%; }
.installment-card { display:flex; align-items:center; gap:12px; border:1px solid var(--border-light); border-radius:14px; padding:10px 12px; background:#fff; width: 100%; }
.brand-badge { display:inline-flex; align-items:center; justify-content:center; min-width:60px; height:28px; padding:0 10px; border-radius:8px; font-weight:900; color:#111827; }
.brand-badge.tabby { background:#2af2b5; color:#0b0b0f; }
.brand-badge.tamara { background:#ffd49a; color:#0b0b0f; }
.installment-text { margin:0; color: var(--text-gray); font-size:14px; }
.installment-text strong { color:#111827; }
.installment-text a { color:#4338CA; text-decoration:none; font-weight:800; }

@media (min-width: 768px) {
  /* Make installment cards span the full options width */
  .installments { grid-column: 1 / -1; }
}

.cta-wide { width:100%; margin-top:14px; background: linear-gradient(135deg, #7C4DFF, #6B46C1); color:#fff; border:0; padding:14px; border-radius:14px; font-weight:900; }
.delivery-note { text-align:center; color: var(--text-gray); margin-top:8px; font-size:12px; }

.product-gallery { display:grid; gap:12px; justify-items:center; }
/* Zoomable main image */
.gallery-main { display:flex; align-items:center; justify-content:center; background:#fff; border:1px solid var(--border-light); border-radius:20px; padding:24px; overflow:hidden; position: relative; }
.gallery-main img { max-width:min(520px, 90vw); height:auto; object-fit:contain; transition: transform .35s ease; transform-origin: center; cursor: zoom-in; }
.gallery-main:hover img { transform: scale(1.12); }

/* Thumbnails row */
.thumbs { display:grid; grid-auto-flow: column; grid-auto-columns: minmax(68px, 1fr); gap:10px; overflow-x:auto; padding:4px; width:100%; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.thumb { scroll-snap-align: start; border:1px solid var(--border-light); background:#fff; border-radius:12px; padding:6px; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.thumb img { width:100%; height:56px; object-fit:contain; }
.thumb.is-active { border-color: var(--primary-purple); box-shadow: 0 0 0 2px var(--light-purple) inset; }

/* Gallery numeric indicator */
.gallery-indicator { position:absolute; bottom:10px; inset-inline:0; text-align:center; }
.gallery-indicator .pill {
  display:inline-block; padding:4px 8px; border-radius:9999px;
  background: rgba(17,24,39,0.65); color:#fff; font-weight:800; font-size:12px;
}

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
  .gallery-main img { max-width: min(420px, 100%); }
}

/* Place color and storage on the same row on wider screens */
@media (min-width: 768px) {
  .options-grid { grid-template-columns: 1fr 1fr; }
  .options-grid .option-group:nth-child(1) { grid-column: 1; }
  .options-grid .option-group:nth-child(2) { grid-column: 2; }
  .options-grid .option-group:nth-child(n+3) { grid-column: 1 / -1; }
}

/* Touch-friendly elements */
@media (max-width: 767px) {
  .header-btn,
  .mobile-menu-btn,
  .mobile-menu-close,
  .lang-toggle {
      min-width: 44px;
      min-height: 44px;
  }

  .nav-link,
  .mobile-nav-link {
      min-height: 44px;
      display: flex;
      align-items: center;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--border-light);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

button:focus,
input:focus,
.nav-link:focus,
.mobile-nav-link:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
      --border-light: #000000;
      --text-gray: #000000;
      --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
  }
}

/* Custom header layout matching provided design */
.top-bar-centered {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Header order using grid areas */
.header-content--custom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logo search actions";
}
[dir="ltr"] .header-content--custom {
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: "menu logo search actions";
}
.logo { grid-area: logo; }
.search-container--custom { grid-area: search; }
.header-actions-group { grid-area: actions; }

/* Flag dropdown */
.flag-switcher { position: relative; }
.flag-dropdown {
  position: absolute;
  top: 54px;
  inset-inline-end: 0;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  box-shadow: var(--shadow-light);
  padding: 6px;
  display: none;
  z-index: 1200;
  min-width: 140px;
}
.flag-switcher.open .flag-dropdown { display: block; }
.flag-option {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}
.flag-option:hover { background: var(--background-light); }

/* Ensure search icon is inside */
.search-btn--circle iconify-icon { color: var(--text-gray); }

.cart-summary-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--background-light);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-dark);
}

.cart-summary-pill .cart-summary-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.cart-summary-title {
  font-size: 12px;
  color: var(--text-gray);
}

.cart-summary-amount {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 700;
}

.cart-summary-amount .currency {
  font-size: 11px;
  color: var(--text-gray);
}

.action-btn-square {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  color: var(--text-dark);
}

.search-container--custom { max-width: none; }

.search-bar--custom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  overflow: hidden;
}

.search-mode {
  padding: 12px 20px;
  background: var(--text-dark);
  color: var(--white);
  font-weight: 700;
  border-inline-end: 1px solid var(--border-light);
}

.search-btn--circle {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--background-light);
  border: 1px solid var(--border-light);
  margin: 0 8px;
}

/* Adjust existing search input for new layout */
.search-bar--custom .search-input {
  padding: 12px 16px;
}

/* Responsive tweaks */
@media (max-width: 767px) {
  /* Keep menu to the left of logo in LTR, and to the right in RTL */
  [dir="ltr"] .header-content--custom,
  [dir="rtl"] .header-content--custom {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "menu logo search actions";
    gap: 12px;
  }
  .header-actions-group { justify-content: space-between; }
}

/* Ensure header action icons are horizontal */
.header-actions-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Search text button */
.search-btn--text {
  background: #111827;
  color: #fff;
  border: none;
  height: 44px;
  padding: 0 16px;
  /* Square by default; rounded per language below */
  border-radius: 0;
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* Search ordering: icon - input - button for both directions (visual flips with dir) */
[dir="rtl"] .search-bar--custom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
[dir="rtl"] .search-field-icon { order: 0; justify-self: end; padding-inline: 12px; }
[dir="rtl"] .search-bar--custom .search-input { order: 1; text-align: right; }
[dir="rtl"] .search-btn--text { order: 2; justify-self: start; }

[dir="ltr"] .search-bar--custom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
[dir="ltr"] .search-field-icon { order: 0; justify-self: start; padding-inline: 12px; }
[dir="ltr"] .search-bar--custom .search-input { order: 1; text-align: left; }
[dir="ltr"] .search-btn--text { order: 2; justify-self: end; }

/* Header actions order */
.header-actions-group { display: inline-flex; gap: 12px; }
[dir="rtl"] #flagSwitcher { order: 0; }
[dir="rtl"] #profileBtn { order: 1; }
[dir="rtl"] #favoriteBtn { order: 2; }
[dir="rtl"] #cartBtn { order: 3; }

[dir="ltr"] #flagSwitcher { order: 0; }
[dir="ltr"] #profileBtn { order: 1; }
[dir="ltr"] #favoriteBtn { order: 2; }
[dir="ltr"] #cartBtn { order: 3; }

/* Navigation - consolidated final styles */
.nav {
  background: #181a1e;
  border: none !important;
  box-shadow: none;
  padding-top: 14px;
  padding-bottom: 14px;
}

.nav-content { display: flex; justify-content: center; align-items: center; }
[dir="rtl"] .nav-content { justify-content: flex-end; }
[dir="rtl"] .nav-links { justify-content: flex-end; }

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li { display: flex; align-items: center; }
.nav-link { height: 44px; line-height: 1; display: inline-flex; align-items: center; }
.nav-link .nav-text { display: inline-flex; align-items: center; line-height: 1; }
.nav-link .nav-text, .nav-link .nav-text * { line-height: 1; }
.nav-icon, .nav-caret { min-width: 18px; min-height: 18px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }

/* Remove any previous underlines/bars */
.nav-link::after,
.nav-link.active::after { content: none !important; display: none !important; }

/* Hover/active pill */
.nav-link:hover,
.nav-link.active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Iconify icons sizing/visibility */
iconify-icon,
.nav-link iconify-icon,
.nav-link .nav-icon,
.nav-link .nav-caret {
  display: inline-flex;
  width: 18px;
  height: 18px;
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
  color: currentColor;
}

/* RTL/LTR ordering for nav link pieces */
/* Both languages: icon - text - caret (spacing handled via gap) */
[dir="rtl"] .nav-link .nav-icon { order: 0; margin-inline-start: 0; margin-inline-end: 0; }
[dir="rtl"] .nav-link .nav-text  { order: 1; line-height: 1; }
[dir="rtl"] .nav-link .nav-caret { order: 2; margin-inline-start: 0; margin-inline-end: 0; }

[dir="ltr"] .nav-link .nav-icon { order: 0; margin-inline-start: 0; margin-inline-end: 0; }
[dir="ltr"] .nav-link .nav-text  { order: 1; line-height: 1; }
[dir="ltr"] .nav-link .nav-caret { order: 2; margin-inline-start: 0; margin-inline-end: 0; }

/* Search layout: icon - input - button (both directions; alignment flips with dir) */
.search-bar--custom { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
/* Field icon position */
.search-field-icon { color: var(--text-gray); }
[dir="rtl"] .search-field-icon { order: 0; justify-self: end; padding-inline: 16px; }
[dir="rtl"] .search-bar--custom .search-input { order: 1; padding-right: 16px; padding-left: 16px; text-align: right; }
[dir="rtl"] .search-btn--text { order: 2; justify-self: start; }

[dir="ltr"] .search-field-icon { order: 0; justify-self: start; padding-inline: 16px; }
[dir="ltr"] .search-bar--custom .search-input { order: 1; padding-left: 16px; padding-right: 16px; text-align: left; }
[dir="ltr"] .search-btn--text { order: 2; justify-self: end; }

/* Only round the outer side of the search button */
[dir="ltr"] .search-btn--text { border-start-end-radius: 12px; border-end-end-radius: 12px; border-start-start-radius: 0; border-end-start-radius: 0; }
[dir="rtl"] .search-btn--text { border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: 12px; border-end-end-radius: 12px; }

/* Explicit sizing for nav icon spans and inner icons */
.nav-icon, .nav-caret { display: inline-flex; align-items: center; justify-content: center; }
.nav-icon iconify-icon {font-size: 18px; }
.nav-caret iconify-icon {font-size: 16px; }

/* Inherit color */
.nav-icon iconify-icon, .nav-caret iconify-icon { color: currentColor; }

/* Nav dropdowns */
.nav-item { position: relative; }
.has-dropdown .nav-caret { transition: transform 0.2s ease; }

.nav-dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  padding: 8px;
  min-width: 180px;
  display: none;
  z-index: 1400;
}

.nav-dropdown-item {
  display: block;
  padding: 10px 12px;
  color: #111827;
  text-decoration: none;
  border-radius: 8px;
}

.nav-dropdown-item:hover { background: #f3f4f6; }

/* Show dropdown on hover */
.has-dropdown:hover .nav-dropdown { display: block; }
.has-dropdown:hover .nav-caret { transform: rotate(180deg); }

/* Ensure Tabler icons inherit color */
.nav-icon iconify-icon, .nav-caret iconify-icon { color: currentColor; }

.nav-dropdown--mega,
.nav-dropdown--list {
  display: none;
}

.nav-dropdown--mega {
  min-width: clamp(320px, 40vw, 520px);
  padding: 16px;
  background: rgba(255, 255, 255, 0.98);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.nav-dropdown__group {
  background: var(--background-light);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.nav-dropdown__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  font-weight: 700;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.nav-dropdown__heading iconify-icon {
  font-size: 18px;
  color: var(--primary-purple);
}

.nav-dropdown__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.nav-dropdown__link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-gray);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.nav-dropdown__link iconify-icon { color: var(--primary-purple); font-size: 14px; }
.nav-dropdown__link:hover { color: var(--primary-purple); }

.nav-dropdown--list {
  min-width: 260px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.nav-dropdown-item--pill {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-radius: 999px;
  background: var(--background-light);
  font-weight: 600;
  color: var(--text-dark);
  padding: 10px 14px;
}

.nav-dropdown-item--pill iconify-icon { font-size: 16px; color: var(--primary-purple); }

.has-dropdown:hover .nav-dropdown--mega,
.has-dropdown:hover .nav-dropdown--list {
  display: grid !important;
}

/* Logo image */
.site-logo { max-height: 28px; display: block; }

/* Search bar refinements */
.search-bar--custom { border: 1px solid var(--border-light); border-radius: 14px; background: #fff; }
[dir="rtl"] .search-bar--custom { grid-template-columns: auto 1fr auto; }
[dir="ltr"] .search-bar--custom { grid-template-columns: auto 1fr auto; }

/* Ensure circular button aligns flush */
.search-btn--circle { width: 44px; height: 44px; border: 1px solid var(--border-light); background: #111827; color: #fff; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; }

/* Mode pill style */
.search-mode { background: #111827; color: #fff; padding: 10px 14px; border-start-start-radius: 12px; border-end-start-radius: 12px; }
[dir="ltr"] .search-mode { border-start-end-radius: 12px; border-end-end-radius: 12px; border-start-start-radius: 0; border-end-start-radius: 0; }

/* Input sizing */
.search-bar--custom .search-input { height: 44px; border: none; background: transparent; font-family: 'Tajawal', Arial, sans-serif; font-size: 14px; color: var(--text-dark); }
.search-bar--custom .search-input:focus { outline: none; }

/* Global: center all iconify icons */
iconify-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }

/* Center icon-only controls */
.action-btn-square,
.header-btn,
.mobile-menu-btn,
.mobile-menu-close,
.cart-close,
.product-action-btn,
.quantity-btn,
.search-btn--circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Center icon + text horizontally */
.nav-link,
.cart-summary-pill,
.checkout-btn,
.continue-shopping-btn,
.offer-btn,
.promo-btn,
.view-all-btn,
.newsletter-btn,
.add-to-cart-btn,
.mobile-action-btn,
.search-btn--text {
  display: inline-flex;
  align-items: center;
}

/* Spacing between icon and text where applicable */
.nav-link,
.cart-summary-pill,
.checkout-btn,
.continue-shopping-btn,
.offer-btn,
.promo-btn,
.view-all-btn,
.newsletter-btn,
.add-to-cart-btn,
.mobile-action-btn,
.search-btn--text { gap: 8px; }

/* Tighten nav alignment */
.nav-links li { display: flex; align-items: center; }
.nav-link { height: 44px; line-height: 1; }
.nav-link .nav-text { display: inline-flex; align-items: center; }
.nav-icon, .nav-caret { min-width: 18px; min-height: 18px; }

/* Ensure cart pill text is vertically centered */
.cart-summary-text { display: flex; flex-direction: column; justify-content: center; }

/* Normalize button/icon heights */
.action-btn-square { width: 44px; height: 44px; }
.header-btn { width: 44px; height: 44px; }

/* Search input vertical centering */
.search-bar--custom .search-input { display: flex; align-items: center; }

/* Responsive header refinements */
@media (max-width: 767px) {
  .header-content--custom { grid-template-columns: 1fr; gap: 12px; }
  .logo { justify-self: center; }
  .header-actions-group { justify-content: space-between; width: 100%; }
  .search-container--custom { width: 100%; }
  .search-bar--custom { width: 100%; }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .header-content--custom { grid-template-columns: auto 1fr auto; gap: 16px; }
  .search-container--custom { max-width: 600px; }
}

/* Mobile-first, user-friendly header */
@media (max-width: 767px) {
  /* Header grid: menu | logo | actions */
  .header-content--custom {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
  }

  /* Show hamburger */
  .mobile-menu-btn { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; }

  /* Center logo */
  .logo { justify-self: center; }
  .site-logo { max-height: 24px; }

  /* Actions: show only flag + cart */
  #favoriteBtn, #profileBtn { display: none; }
  .header-actions-group { gap: 8px; }

  /* Search occupies full width on its own row */
  .search-container--custom { grid-column: 1 / -1; width: 100%; }
  .search-bar--custom { width: 100%; border-radius: 12px; }
  .search-btn--text { height: 40px; padding: 0 12px; }
  .search-bar--custom .search-input { height: 40px; font-size: 13px; }
  .search-field-icon iconify-icon { width: 20px; height: 20px; }

  /* Nav hidden on mobile (use drawer) */
  .nav-links { display: none; }
}

/* Mobile search modal */
.search-modal { position: fixed; inset: 0; z-index: 3000; display: none; }
.search-modal.active { display: block; }
.search-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.search-modal__dialog { position: relative; max-width: 600px; margin: 10vh auto; background: #fff; border-radius: 12px; box-shadow: var(--shadow-medium); overflow: hidden; }
.search-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #111827; color: #fff; }
.search-modal__close { background: none; border: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.search-modal__body { padding: 16px; }
.search-modal__input { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; }
.search-modal__input input { border: none; height: 36px; font-family: 'Tajawal', Arial, sans-serif; }
.search-modal__input input:focus { outline: none; }
.search-modal__submit { background: #111827; color: #fff; border: none; height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; }

/* Mobile: hide inline search, show trigger button */
@media (max-width: 767px) {
  .search-container--custom { display: none; }
  .mobile-search-trigger { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: #111827; color: #fff; border-radius: 12px; border: none; }
}

/* Cart pill: hide text on small screens */
@media (max-width: 767px) {
  .cart-summary-pill .cart-summary-text { display: none; }
  .cart-summary-pill { padding: 10px; }
}

@media (max-width: 767px) {
  .mobile-menu-btn { display: inline-flex; }
  .nav { display: none; }
  .nav::before, .nav::after { content: none; }
}

/* Visibility rules for mobile controls */
.mobile-search-trigger { display: none; }
@media (max-width: 767px) {
  .mobile-search-trigger { display: inline-flex; }
  .mobile-menu-btn { display: inline-flex; }
}
@media (min-width: 768px) {
  .mobile-search-trigger { display: none !important; }
  .mobile-menu-btn { display: none; }
}

/* Mobile-only utility */
.mobile-only { display: none; }
@media (max-width: 767px) {
  .mobile-only { display: inline-flex; }
}
@media (min-width: 768px) {
  .mobile-only { display: none !important; }
}

/* Mobile menu submenus */
.mobile-has-sub { }
.mobile-sub-toggle { width: 100%; background: none; border: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 12px; }
.mobile-sub-toggle span { flex: 1; text-align: start; }
.mobile-caret { transition: transform 0.2s ease; }
.mobile-submenu { display: none; padding-inline-start: 24px; }
.mobile-has-sub.open .mobile-submenu { display: block; }
.mobile-has-sub.open .mobile-caret { transform: rotate(180deg); }

/* Position mobile menu close relative to logo per language */
[dir="rtl"] .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }
[dir="ltr"] .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }

/* Mobile menu UX improvements */
.mobile-menu { width: 300px; max-width: 86vw; }
.mobile-nav-links { padding: 0; margin: 0; list-style: none; }
.mobile-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; color: var(--text-dark); text-decoration: none; }
.mobile-nav-links > li + li { border-top: 1px solid var(--border-light); }
.mobile-nav-link iconify-icon { width: 20px; height: 20px; }

/* Submenu toggle row spacing */
.mobile-sub-toggle { gap: 12px; padding: 14px 0; border: none; background: transparent; color: var(--text-dark); }
.mobile-sub-toggle .mobile-caret { margin-inline-start: 8px; opacity: 0.8; }
[dir="rtl"] .mobile-sub-toggle .mobile-caret { margin-inline-start: 0; margin-inline-end: 8px; }
.mobile-submenu { padding: 6px 0 8px 0; margin: 0; list-style: none; border-top: 1px dashed var(--border-light); }
.mobile-submenu .mobile-sub-link { display: block; padding: 10px 0 10px 24px; color: var(--text-dark); text-decoration: none; opacity: 0.9; }
.mobile-submenu .mobile-sub-link:hover { opacity: 1; }
.mobile-sub-link__meta { display: block; font-size: 12px; color: var(--text-gray); margin-top: 4px; }

/* Ensure overlay captures clicks fully when active */
.mobile-overlay { pointer-events: none; }
.mobile-overlay.active { pointer-events: auto; }

/* Mobile menu header visibility and layout */
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }
.mobile-menu-close { display: inline-flex !important; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-dark); }
.mobile-menu-header .site-logo { max-height: 24px; }

/* Mobile menu item alignment */
.mobile-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; }
.mobile-nav-links > li { padding: 0 8px; }
.mobile-nav-links > li + li { border-top: 1px solid var(--border-light); }

/* Submenu toggle row */
.mobile-sub-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 12px; padding: 14px 4px; cursor: pointer; }
.mobile-submenu { padding: 6px 0 8px 0; margin: 0; list-style: none; }
.mobile-submenu .mobile-sub-link { display: block; padding: 10px 8px; }

/* Better touch targets */
.mobile-action-btn { min-height: 44px; }

/* Global font enforcement for Tajawal */
body, button, input, select, textarea, a, span, h1, h2, h3, h4, h5, h6, p, li, label, small, strong, b, em {
  font-family: 'Tajawal', Arial, sans-serif;
}

/* Only the "View All" (Show More) button should be fully rounded */
.view-all-btn { border-radius: 9999px; }

/* Ensure the hamburger/menu button is last in the actions row */
#mobileMenuBtnHeader { order: 99; }
[dir="rtl"] #mobileMenuBtnHeader { order: 99; }
[dir="ltr"] #mobileMenuBtnHeader { order: 99; }

/* Place mobile menu icon to the far right (RTL), right of the logo */
[dir="rtl"] .header-content--custom {
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas: "menu logo search actions";
}
#mobileMenuBtnHeader { grid-area: menu; }
[dir="rtl"] #mobileMenuBtnHeader { justify-self: end; }
[dir="ltr"] #mobileMenuBtnHeader { justify-self: start; }

/* Normalize cart and action button sizes */
.action-btn-square, .cart-summary-pill { height: 44px; }
.cart-summary-pill { padding: 0 12px; display: inline-flex; align-items: center; gap: 10px; }

/* Mobile menu typography - unified size and weight */
.mobile-nav-link,
.mobile-sub-toggle,
.mobile-submenu .mobile-sub-link,
.mobile-action-btn {
  font-size: 16px;
  font-weight: 700;
}
.mobile-nav-link span,
.mobile-sub-toggle span,
.mobile-submenu .mobile-sub-link span,
.mobile-action-btn span {
  font-size: inherit;
  font-weight: inherit;
}

/* Direction-aware layout for mobile rows */
/* Keep normal row direction in RTL; we will control order explicitly */
[dir="rtl"] .mobile-nav-link,
[dir="rtl"] .mobile-sub-toggle,
[dir="rtl"] .mobile-action-btn,
[dir="rtl"] .cart-summary-pill {
  flex-direction: row;
  text-align: right;
}

[dir="ltr"] .nav-link,
[dir="ltr"] .mobile-nav-link,
[dir="ltr"] .mobile-sub-toggle,
[dir="ltr"] .mobile-action-btn,
[dir="ltr"] .cart-summary-pill {
  flex-direction: row;
  text-align: left;
}

/* Keep spacing logical regardless of direction */
.nav-link, .mobile-nav-link, .mobile-sub-toggle, .mobile-action-btn, .cart-summary-pill { gap: 10px; }

/* Arabic (RTL) explicit ordering for mobile menu */
[dir="rtl"] .mobile-sub-toggle iconify-icon:not(.mobile-caret) { order: 0; }
[dir="rtl"] .mobile-sub-toggle span { order: 1; flex: 1; text-align: start; }
[dir="rtl"] .mobile-sub-toggle .mobile-caret { order: 2; }

[dir="rtl"] .mobile-nav-link iconify-icon { order: 0; }
[dir="rtl"] .mobile-nav-link span { order: 1; flex: 1; text-align: start; }

[dir="rtl"] .mobile-action-btn iconify-icon { order: 0; }
[dir="rtl"] .mobile-action-btn span { order: 1; }

/* Explicit cart pill child ordering for each language */
[dir="rtl"] #cartBtn .cart-summary-text { order: 1; }
[dir="rtl"] #cartBtn .cart-icon-wrap { order: 2; }

[dir="ltr"] #cartBtn .cart-icon-wrap { order: 1; }
[dir="ltr"] #cartBtn .cart-summary-text { order: 2; }
/* Full-bleed utility */
.full-bleed { width: 100vw; margin-inline: calc(50% - 50vw); }

/* Hero slider */

/* Category Page & Shop Component */
.category-header {
  margin: 12px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-header .category-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.2;
}

.category-header .breadcrumb-link {
  background: transparent;
  border: none;
  color: var(--primary-purple);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  transition: all 0.2s ease;
  text-align: start;
  width: fit-content;
}

.category-header .breadcrumb-link:hover {
  color: #7c3aed;
  text-decoration-thickness: 2px;
}

.category-header .breadcrumb-link:focus {
  outline: 2px solid var(--light-purple);
  outline-offset: 2px;
  border-radius: 4px;
}

.products-headline {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.product-count {
  font-size: 24px;
  font-weight: 900;
  color: var(--primary-purple);
}

.products-headline span {
  font-size: 16px;
  color: var(--text-gray);
  font-weight: 600;
}

.products-headline .loading-indicator {
  display: inline-flex;
  align-items: center;
  margin-left: 12px;
  color: var(--primary-purple);
}

[dir="rtl"] .products-headline .loading-indicator {
  margin-left: 0;
  margin-right: 12px;
}

.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: #fafafa;
  border-radius: 16px;
  border: 2px dashed var(--border-light);
}

.empty-state p {
  font-size: 18px;
  color: var(--text-gray);
  margin: 0 0 20px 0;
  font-weight: 600;
}

.empty-state .filter-clear {
  background: var(--primary-purple);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 14px;
}

.empty-state .filter-clear:hover {
  background: #7c3aed;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.empty-state .filter-clear:active {
  transform: translateY(0);
}

.pagination-wrapper {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
}

.brand-chips { display:flex; gap:14px; overflow-x:auto; padding: 8px 2px 12px; margin-bottom: 10px; }
.chip-pill { display:inline-flex; align-items:center; gap:10px; border:1px solid var(--border-light); background:#fff; padding:8px 12px; border-radius:9999px; cursor:pointer; }
.chip-pill img { width:28px; height:28px; border-radius:50%; object-fit:cover; }
.chip-pill.is-active { border-color: var(--primary-purple); box-shadow: 0 0 0 2px var(--light-purple) inset; }

.category-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* Place products + filters based on direction */
[dir="rtl"] .category-layout .category-products { grid-column: 1; }
[dir="rtl"] .category-layout .filters-panel { grid-column: 2; }
[dir="ltr"] .category-layout .category-products { grid-column: 1; }
[dir="ltr"] .category-layout .filters-panel { grid-column: 2; }

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

.filters-panel {
  position: sticky;
  top: 100px;
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: 22px;
  padding: 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
  transition: box-shadow 0.3s ease;
}

.filters-panel:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.filters-panel::-webkit-scrollbar {
  width: 6px;
}

.filters-panel::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.filters-panel::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.filters-panel::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
}

.filters-head strong {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-dark);
}

.filter-clear {
  background: transparent;
  border: none;
  color: var(--primary-purple);
  font-weight: 800;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 14px;
}

.filter-clear:hover {
  background: var(--light-purple);
  color: #7c3aed;
}

.filter-clear:active {
  transform: scale(0.97);
}

.filter-block {
  padding: 14px 0;
  border-top: 1px solid var(--border-light);
}

.filter-block:first-of-type {
  border-top: none;
  padding-top: 0;
}

.filter-title {
  font-weight: 900;
  font-size: 16px;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-dark);
  margin: 10px 0;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s ease;
}

.check:hover {
  background: #f9fafb;
}

.check input[type="checkbox"],
.check input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  display: inline-block;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.check input[type="radio"] {
  border-radius: 50%;
}

.check input[type="checkbox"]:hover,
.check input[type="radio"]:hover {
  border-color: var(--primary-purple);
}

.check input[type="checkbox"]:checked,
.check input[type="radio"]:checked {
  background: var(--primary-purple);
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px var(--light-purple);
}

.check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg);
}

.check input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  background: #fff;
  border-radius: 50%;
}

.filter-list {
  max-height: 240px;
  overflow-y: auto;
  margin-top: 8px;
}

.filter-list::-webkit-scrollbar {
  width: 4px;
}

.filter-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.filter-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

.range-row {
  padding: 8px 0;
}

.range-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-gray);
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0;
}

/* Range styling */
.filters-panel input[type="range"] {
  width: 100%;
  accent-color: var(--primary-purple);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filters-panel input[type="range"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* WebKit */
.filters-panel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary-purple);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.2);
  margin-top: -8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-panel input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5), 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.filters-panel input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(1.05);
}

.filters-panel input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  background: linear-gradient(to right, var(--primary-purple) 0%, var(--primary-purple) var(--range-progress, 50%), #e5e7eb var(--range-progress, 50%), #e5e7eb 100%);
  border-radius: 9999px;
}

/* Firefox */
.filters-panel input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary-purple);
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.2);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filters-panel input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.5), 0 0 0 2px rgba(139, 92, 246, 0.3);
}

.filters-panel input[type="range"]::-moz-range-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 9999px;
}

.filters-panel input[type="range"]::-moz-range-progress {
  height: 6px;
  background: var(--primary-purple);
  border-radius: 9999px;
}

.products-grid.is-loading {
  opacity: 0.5;
  pointer-events: none;
  position: relative;
}

.products-grid.is-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid var(--light-purple);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@media (max-width: 1200px) {
  .category-layout {
    grid-template-columns: 1fr 280px;
    gap: 20px;
  }

  .filters-panel {
    padding: 16px;
  }
}

@media (max-width: 1000px) {
  .category-layout {
    grid-template-columns: 1fr;
  }

  .filters-panel {
    position: static;
    order: -1;
    max-height: none;
  }

  .products-headline {
    margin-bottom: 16px;
  }
}

@media (max-width: 768px) {
  .category-header {
    margin: 8px 0 12px;
  }

  .category-header .category-title {
    font-size: clamp(20px, 5vw, 24px);
  }

  .products-headline {
    padding-bottom: 8px;
  }

  .product-count {
    font-size: 20px;
  }

  .products-headline span {
    font-size: 14px;
  }

  .empty-state {
    padding: 40px 16px;
  }

  .filters-head strong {
    font-size: 18px;
  }

  .filter-title {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .category-layout {
    gap: 16px;
  }

  .products-headline {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .empty-state {
    padding: 32px 12px;
  }

  .empty-state p {
    font-size: 16px;
  }
}
/* Brand Page */
.brand-hero { position: relative; margin: 16px 0 24px; background:#fff; border:1px solid var(--border-light); border-radius: 18px; overflow: hidden; }
.brand-cover { height: 200px; background-size: cover; background-position: center; }
.brand-header { position: relative; padding: 16px; }
.brand-avatar-wrap { position: absolute; top: -48px; inset-inline-start: 16px; }
.brand-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background:#fff; border: 4px solid #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.brand-header-main { /* leave space for avatar */ margin-inline-start: 120px; display: grid; gap: 6px; }
.brand-title-row { display:flex; align-items:flex-start; justify-content: space-between; gap: 12px; }
.brand-name { font-size: clamp(18px, 3vw, 24px); font-weight: 900; color: var(--text-dark); margin: 0; }
.brand-action { background: var(--primary-purple); color:#fff; border:0; padding:8px 14px; border-radius: 9999px; font-weight: 800; cursor:pointer; }
.brand-handle { display:flex; align-items:center; flex-wrap:wrap; gap:8px; color: var(--text-gray); }
.brand-handle .handle { color: #6b7280; }
.brand-bio { color: var(--text-gray); font-size: 14px; margin: 0; }
.brand-stats { display:flex; gap:16px; color:#6b7280; font-size: 14px; }
.brand-stats strong { color:#111827; }
.brand-badge { background: #111827; color:#fff; padding: 4px 10px; border-radius: 9999px; font-weight: 800; font-size: 12px; }

@media (max-width: 720px) {
  .brand-cover { height: 150px; }
  .brand-avatar { width: 72px; height: 72px; }
  .brand-header-main { margin-inline-start: 92px; }
  [dir="ltr"] .brand-header-main { margin-inline-end: 92px; }
}
/* Account Page */
.account-layout { display:grid; grid-template-columns: 1fr 1.2fr; gap: 24px; margin: 18px 0 40px; align-items: start; }
.account-card, .locations-card { background:#fff; border:1px solid var(--border-light); border-radius: 16px; padding: 16px; box-shadow: 0 0 0 1px rgba(0,0,0,0.02); }
.avatar-block { position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin-bottom: 12px; }
.avatar-block img { width: 100%; height: 100%; object-fit: cover; }
.avatar-edit { position: absolute; bottom: 6px; inset-inline-end: 6px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-light); background:#fff; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.account-fields { display:grid; gap: 12px; max-width: 520px; }
.field { display:grid; gap:6px; }
.field span { font-size: 12px; color: var(--text-gray); font-weight: 700; }
.field input { border:1px solid var(--border-light); border-radius: 12px; padding: 10px 12px; font-family:'Tajawal', Arial, sans-serif; }
.save-btn { background: var(--primary-purple); color:#fff; border:0; padding: 10px 14px; border-radius: 12px; font-weight: 800; cursor: pointer; width: fit-content; }

.locations-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 10px; }
.locations-head h3 { margin: 0; font-size: 18px; font-weight: 900; }
.add-location { display:inline-flex; align-items:center; gap:8px; border:1px solid var(--border-light); background:#fff; padding:8px 12px; border-radius: 12px; font-weight: 800; cursor:pointer; }
.location-form { display:grid; gap: 10px; margin-bottom: 12px; background:#fafafa; border:1px dashed var(--border-light); padding: 12px; border-radius: 12px; }
.form-row { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display:flex; gap:10px; justify-content: flex-end; }
.cancel-btn { background:#fff; border:1px solid var(--border-light); border-radius: 12px; padding: 10px 14px; font-weight: 800; }

.locations-list { display:grid; gap: 12px; }
.location-item { border:1px solid var(--border-light); border-radius: 12px; padding: 12px; background:#fff; }
.location-item .li-head { display:flex; align-items:center; justify-content: space-between; margin-bottom: 6px; }
.location-item .remove { background:#fff; border:1px solid var(--border-light); width: 34px; height: 34px; border-radius: 10px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; }
.location-item .li-line { color: var(--text-dark); }
.location-item .li-meta { color: var(--text-gray); font-size: 12px; }
.locations-list .empty { color: var(--text-gray); text-align:center; padding: 16px; }

@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
/* Auth / Login */
.auth-body { background: #f3f4f6; }
.auth-layout { display: grid; grid-template-columns: 1.2fr 1fr; min-height: 100vh; }
.auth-panel { display: grid; place-items: center; padding: 24px; background: #fff; }
.auth-inner { width: min(420px, 90vw); text-align: center; }
.auth-logo { height: 40px; margin-bottom: 12px; }
.auth-title { font-size: clamp(20px, 4vw, 32px); font-weight: 900; color: var(--primary-purple); margin: 6px 0 8px; }
.auth-sub { color: var(--text-gray); margin: 0 0 16px; }

.role-switch { background: #f1f5f9; border-radius: 9999px; padding: 4px; display: inline-flex; gap: 6px; margin: 6px 0 30px; }
.role-btn { border: 0; background: transparent; padding: 8px 14px; border-radius: 9999px; font-weight: 800; color: #475569; cursor: pointer; }
.role-btn.is-active { background: linear-gradient(135deg, #7C4DFF, #6B46C1); color: #fff; }

.auth-form { text-align: right; display: grid; gap: 16px; }
.auth-grid-2 { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-select { border: 1px solid var(--border-light); border-radius: 12px; padding: 12px 14px; font-family: 'Tajawal', Arial, sans-serif; background: #fff; }
.auth-error { display: block; margin-top: 6px; font-size: 12px; color: #ef4444; text-align: right; }
.auth-error-banner { background: #fee2e2; color: #b91c1c; border-radius: 12px; padding: 12px; font-weight: 600; margin-bottom: 12px; }
.auth-field { display: grid; gap: 8px; text-align: right; }
.auth-field span { color: var(--text-gray); font-weight: 700; font-size: 13px; }
.auth-field input { border: 1px solid var(--border-light); border-radius: 12px; padding: 12px 14px; font-family: 'Tajawal', Arial, sans-serif; }
.auth-field input:focus { outline: none; border-color: var(--primary-purple); box-shadow: 0 0 0 3px var(--light-purple); }

.phone-input { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px; border:1px solid var(--border-light); border-radius: 12px; padding: 8px 10px; }
.phone-input .dial { color: var(--text-dark); font-weight: 800; }
.phone-input input { border: none; padding: 8px 0; }

.auth-row { display: flex; align-items: center; justify-content: space-between; }
.auth-link { color: var(--primary-purple); text-decoration: none; font-weight: 800; }
.auth-link-strong { color: #4338CA; font-weight: 900; text-decoration: none; }
.remember { color: var(--text-gray); display: inline-flex; align-items: center; gap: 8px; }
.remember input { width: 16px; height: 16px; }

.auth-submit { width: 100%; background: linear-gradient(135deg, #7C4DFF, #6B46C1); color: #fff; border: 0; padding: 14px; border-radius: 14px; font-weight: 900; cursor: pointer; }
.auth-footer-text { color: var(--text-gray); margin-top: 8px; text-align: center; }

/* Location picker field that looks like an input */
.location-picker { display:flex; align-items:center; justify-content: space-between; gap: 10px; width: 100%; border:1px solid var(--border-light); border-radius: 12px; padding: 12px 14px; background:#fff; cursor: pointer; text-align: start; }
.location-picker .hint { color: var(--text-gray); }
.location-picker .caret { color: var(--text-gray); display:inline-flex; align-items:center; }
.location-picker:hover { border-color: var(--primary-purple); box-shadow: 0 0 0 3px var(--light-purple); }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .auth-panel { padding: 18px; }
}
@media (max-width: 560px) {
  .auth-grid-2 { grid-template-columns: 1fr; }
}

.auth-error {color: #ef4444 !important; }

/* New Code  */

.profile-menu-wrapper {
    position: relative;
  }

  .profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 14px;
    width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
    z-index: 1200;
    pointer-events: none;
  }

  .profile-menu-wrapper.is-open .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }

  .profile-dropdown-group {
    display: none;
    flex-direction: column;
    gap: 8px;
  }

  .profile-dropdown-group.is-visible {
    display: flex;
  }

  .profile-dropdown-link {
    display: block;
    width: 100%;
    text-align: inherit;
    background: none;
    border: none;
    color: var(--text-dark);
    padding: 10px 12px;
    border-radius: 8px;
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), color var(--transition);
  }

  .profile-dropdown-link:hover,
  .profile-dropdown-link:focus {
    background: var(--background-light);
    color: var(--primary-purple);
    outline: none;
  }

  .profile-dropdown-link--action {
    text-align: start;
  }

  /* Navigation */
  .nav {
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 0;
  }

  .nav-content {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* Navigation icons and text alignment */
  .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  /* Nav link base and interactive styles */
  .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 12px;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  }

  .nav-link:hover,
  .nav-link.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Keep icons synced with text color */
  .nav-link iconify-icon,
  .nav-link .nav-icon,
  .nav-link .nav-caret { color: currentColor; }

  .nav {
    background: #181a1e;
  }
  .nav-link { color: #e5e7eb; }
  .nav-link.active { color: var(--white); }
  .nav-link:hover { color: var(--white); }

  .nav-link:hover,
  .nav-link.active {
    color: var(--primary-purple);
    background: var(--light-purple);
  }

  .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-purple);
  }

  /* Cart Sidebar */
  .cart-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: -400px;
    width: 400px;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right var(--transition);
    z-index: 2000;
    display: flex;
    flex-direction: column;
  }

  .cart-sidebar.active {
    right: 0;
  }

  [dir="ltr"] .cart-sidebar {
    right: auto;
    left: -400px;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
  }

  [dir="ltr"] .cart-sidebar.active {
    left: 0;
  }

  .cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
  }

  .cart-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-light);
  }

  .cart-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
  }

  .cart-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
    transition: color var(--transition);
  }

  .cart-close:hover {
    color: var(--primary-purple);
  }

  .cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  .cart-items {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    min-height: 0;
  }

  .cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
  }

  .cart-item:last-child {
    border-bottom: none;
  }

  .cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
  }

  .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .cart-item-details {
    flex: 1;
  }

  .cart-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.3;
  }

  .cart-item-brand {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 8px;
  }

  .cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-purple);
  }

  .cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--background-light);
    border-radius: 6px;
    padding: 4px;
  }

  .quantity-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
    color: var(--text-dark);
  }

  .quantity-btn:hover {
    background: var(--primary-purple);
    color: var(--white);
  }

  .quantity-input {
    width: 30px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
  }

  .remove-item-btn {
    background: none;
    border: none;
    color: var(--red-accent);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background var(--transition);
  }

  .remove-item-btn:hover {
    background: rgba(239, 68, 68, 0.1);
  }

  .cart-summary {
    padding: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--background-light);
    flex-shrink: 0;
  }

  .cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
  }

  .total-amount {
    color: var(--primary-purple);
  }

  .checkout-btn {
    width: 100%;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    margin-bottom: 10px;
  }

  .checkout-btn:hover {
    background: var(--dark-purple);
  }

  .continue-shopping-btn {
    width: 100%;
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    padding: 10px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
  }

  .continue-shopping-btn:hover {
    background: var(--primary-purple);
    color: var(--white);
  }

  .empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
  }

  .empty-cart-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
  }

  .empty-cart h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text-dark);
  }

  .empty-cart p {
    font-size: 14px;
  }
  .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
  }

  .mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right var(--transition);
    z-index: 2000;
    padding: 20px;
    overflow-y: auto;
  }

  .mobile-menu.active {
    right: 0;
  }

  .mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
  }

  .mobile-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
  }

  .mobile-menu-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--text-dark);
  }

  .mobile-nav-links {
    list-style: none;
    margin-bottom: 30px;
  }

  .mobile-nav-link {
    color: var(--text-dark);
    text-decoration: none;
    display: block;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 500;
    transition: color var(--transition);
  }

  .mobile-nav-link:hover {
    color: var(--primary-purple);
  }

  .mobile-actions {
    margin-top: 30px;
  }

  .mobile-action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    background: none;
    border: none;
    padding: 15px 0;
    color: var(--text-dark);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: color var(--transition);
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
  }

  .mobile-action-btn:hover {
    color: var(--primary-purple);
  }

  .mobile-action-btn--logout {
    color: var(--red-accent);
  }

  .mobile-action-btn--logout:hover {
    color: var(--red-accent);
    opacity: 0.9;
  }

  .mobile-auth-group {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
  }

  .mobile-auth-group.is-visible {
    display: flex;
  }

  .mobile-auth-group .mobile-action-btn {
    border-bottom: none;
    padding: 12px 0;
  }

  /* Main Content */
  .main-content {
    padding: 30px 0;
  }

  /* Hero Banner */
  .hero-banner {
    background: var(--gradient-hero);
    border-radius: var(--border-radius);
    padding: 40px;
    margin-bottom: 50px;
    color: var(--white);
    overflow: hidden;
    position: relative;
  }

  .banner-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
    max-width: 1000px;
  }

  .badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    display: inline-block;
  }

  .banner-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.1;
  }

  .highlight {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
  }

  .percentage {
    color: var(--orange-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  }

  .banner-subtitle {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
  }

  .cta-btn {
    background: var(--white);
    color: var(--primary-purple);
    border: none;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
  }

  .cta-btn:hover {
    background: var(--light-purple);
    transform: translateY(-2px);
  }

  .banner-image img {
    max-width: 300px;
    border-radius: var(--border-radius);
  }

  /* Section Headers */
  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }

  .section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
  }

  .view-all-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
  }

  .view-all-btn:hover {
    background: var(--dark-purple);
    transform: translateY(-1px);
  }

  /* Categories Section */
  .categories-section {
    margin-bottom: 10px;
  }

  .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
  }

  .category-item {
    background: var(--white);
    padding: 25px 15px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-light);
    transition: all var(--transition);
    cursor: pointer;
  }

  .category-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
  }

  .category-icon {
    background: var(--light-purple);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--primary-purple);
    transition: all var(--transition);
  }

  .category-item:hover .category-icon {
    background: var(--primary-purple);
    color: var(--white);
  }

  .category-item span {
    font-weight: 500;
    color: var(--text-dark);
  }

  /* Products Section */
  .products-section {
    margin-bottom: 50px;
  }

  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
  }

  .product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all var(--transition);
    position: relative;
  }

  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
  }

  .product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
  }

  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
  }

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

  .product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-purple);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
  }

  .product-badge.discount {
    background: var(--red-accent);
  }

  .product-badge.new {
    background: var(--green-accent);
  }

  .product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: opacity var(--transition);
  }

  .product-card:hover .product-actions {
    opacity: 1;
  }

  .product-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-dark);
  }

  .product-action-btn:hover {
    background: var(--white);
    color: var(--primary-purple);
    transform: scale(1.1);
  }

  .product-info {
    padding: 20px;
  }

  .product-brand {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 5px;
  }

  .product-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

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

  .stars {
    display: flex;
    gap: 2px;
    color: var(--orange-accent);
  }

  .rating-text {
    font-size: 14px;
    color: var(--text-gray);
  }

  .product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
  }

  .current-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-purple);
  }

  .original-price {
    font-size: 14px;
    color: var(--text-gray);
    text-decoration: line-through;
  }

  .discount-percentage {
    background: var(--red-accent);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
  }

  .add-to-cart-btn {
    width: 100%;
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 10px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition);
  }

  .add-to-cart-btn:hover {
    background: var(--dark-purple);
  }

  /* Promotional Banner */
  .promo-banner {
    background: var(--gradient-promo);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 50px 0;
    color: var(--white);
    overflow: hidden;
  }

  .promo-content {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
  }

  .promo-text h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
  }

  .promo-text p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    opacity: 0.9;
  }

  .promo-btn {
    background: var(--white);
    color: var(--primary-purple);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
  }

  .promo-btn:hover {
    background: var(--light-purple);
    transform: translateY(-2px);
  }

  .promo-image img {
    max-width: 250px;
    border-radius: var(--border-radius);
  }

  /* Special Offers */
  .offers-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
  }

  .offer-card {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: start;
  }

  .offer-card__figure {
    width: 100%;
    height: 160px;
  }

  .offer-card__content {
    gap: 5px;
  }

  .offer-card__heading {
    flex-wrap: wrap;
  }

  .offer-card__aside {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .offer-card__cta {
    width: 38px;
    height: 38px;
}

/* Vendors Directory */

.vendor-hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(107, 70, 193, 0.18);
  color: var(--primary-purple);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.vendor-hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.vendor-hero__cta {
  border: none;
  border-radius: 14px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #7c4dff, #6b46c1);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: not-allowed;
  opacity: 0.75;
  box-shadow: 0 14px 30px rgba(107, 70, 193, 0.25);
}

.vendor-hero__meta {
  font-size: 13px;
  color: var(--text-gray);
}

.vendor-stat__hint {
  font-size: 11px;
  color: var(--text-gray);
  opacity: 0.7;
}

.vendor-featured__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 280px);
  gap: 16px;
  overflow-x: auto;
  padding-block: 4px 6px;
  scroll-snap-type: x mandatory;
}

.vendor-featured__rail::-webkit-scrollbar { height: 8px; }
.vendor-featured__rail::-webkit-scrollbar-thumb { background: rgba(107, 70, 193, 0.35); border-radius: 999px; }

.vendor-spotlight-card { scroll-snap-align: start; }

.vendor-featured__see-all {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-gray);
}

.vendor-featured__dots {
  display: inline-flex;
  gap: 6px;
}

.vendor-featured__dots span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.6);
}

.vendor-featured__dots span.is-active {
  width: 20px;
  background: var(--primary-purple);
}

.vendor-spotlight-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-gray);
}

.vendor-spotlight-card__stat iconify-icon {
  color: var(--primary-purple);
  font-size: 16px;
}

.vendor-card__avatar-wrap {
  position: relative;
  display: inline-block;
}

.vendor-card__badge {
  position: absolute;
  inset-inline-end: -6px;
  inset-block-start: -6px;
  background: #10b981;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 4px 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.vendor-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.12), rgba(63, 81, 181, 0.08));
}

.vendor-hero__copy h1 {
  margin: 0 0 10px;
  font-weight: 800;
  font-size: clamp(26px, 4vw, 36px);
  color: #0f172a;
}

.vendor-hero__copy p {
  margin: 0;
  max-width: 540px;
  color: var(--text-gray);
  line-height: 1.7;
}

.vendor-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  min-width: 260px;
}

.vendor-stat {
  background: #fff;
  border-radius: 16px;
  padding: 7px 9px;
  min-width: 85px;
  max-width: 85px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vendor-stat__label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-gray);
}

.vendor-stat__value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-dark);
}

.vendor-featured {
  display: grid;
  gap: 24px;
}

.vendor-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.vendor-spotlight-card {
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.vendor-spotlight-card__media {
  position: relative;
  min-height: 160px;
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.15), rgba(56, 189, 248, 0.12));
}

.vendor-spotlight-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-spotlight-card__badge {
  position: absolute;
  inset-block-end: 16px;
  inset-inline-start: 16px;
  background: rgba(17, 24, 39, 0.82);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}

.vendor-spotlight-card__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 22px 24px;
}

.vendor-spotlight-card__identity {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vendor-spotlight-card__logo {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.12);
}

.vendor-spotlight-card__identity h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-dark);
}

.vendor-spotlight-card__identity p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-gray);
}

.vendor-spotlight-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--text-gray);
}

.vendor-spotlight-card__cta {
  align-self: flex-start;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  background: var(--primary-purple);
  color: #fff;
  font-weight: 700;
  cursor: not-allowed;
  opacity: 0.7;
}

.vendor-filters {
  display: grid;
  gap: 18px;
}

.vendor-filters__top {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.vendor-search {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--background-light);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.vendor-search:focus-within {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.12);
}

.vendor-search__icon iconify-icon {
  color: var(--primary-purple);
  font-size: 18px;
}

.vendor-search__input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-family: 'Tajawal', Arial, sans-serif;
  color: var(--text-dark);
}

.vendor-search__input:focus {
  outline: none;
}

.vendor-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vendor-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-gray);
}

.vendor-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
}

.vendor-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-gray);
}

.vendor-sort select {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 8px 12px;
  font-family: 'Tajawal', Arial, sans-serif;
  font-size: 13px;
}

.vendor-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.vendor-filter-chip {
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: #fff;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-gray);
  transition: all var(--transition);
}

.vendor-filter-chip.is-active {
  background: var(--primary-purple);
  color: #fff;
  border-color: transparent;
}

.vendor-filter-chip__count {
  font-weight: 700;
}

.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.vendor-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vendor-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vendor-card__avatar {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.vendor-card__headline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vendor-card__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-dark);
}

.vendor-card__tagline {
  font-size: 12px;
  color: var(--text-gray);
}

.vendor-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vendor-card__pill {
  background: var(--background-light);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-gray);
}

.vendor-card__pill--accent {
  background: rgba(107, 70, 193, 0.12);
  color: var(--primary-purple);
}

.vendor-card__social {
  display: flex;
  gap: 10px;
}

.vendor-card__social-link {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--background-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
  transition: color var(--transition), background var(--transition);
}

.vendor-card__social-link:hover {
  background: var(--primary-purple);
  color: #fff;
}

.vendor-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vendor-card__since {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-gray);
}

.vendor-card__cta {
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #5b24f4, #5f37bd);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.75;
  transition: transform var(--transition), box-shadow var(--transition);
}

.vendor-card__cta:hover {
  transform: translateY(-2px);
}

.vendor-empty {
  grid-column: 1 / -1;
  text-align: center;
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  color: var(--text-gray);
  box-shadow: var(--shadow-light);
}

.vendor-empty h3 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: var(--text-dark);
}

.vendor-pagination {
  margin-top: 24px;
  display: flex;
  justify-content: center;
}

.vendor-storefront {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.vendor-showcase {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: clamp(24px, 4vw, 48px);
  background: linear-gradient(135deg, var(--vendor-primary), var(--vendor-secondary));
  color: var(--vendor-text);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.18);
}

.vendor-showcase__backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.9;
  filter: blur(2px);
  transform: scale(1.02);
}

.vendor-showcase__backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--vendor-primary), var(--vendor-secondary));
  opacity: 0.5;
}


.vendor-showcase__content {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.vendor-showcase__identity {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1 1 320px;
}

.vendor-showcase__logo {
  display: inline-flex;
  width: clamp(84px, 10vw, 110px);
  height: clamp(84px, 10vw, 110px);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.32);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
}

.vendor-showcase__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.vendor-showcase__identity h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800;
  color: inherit;
}

.vendor-showcase__identity p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.82);
  max-width: 520px;
}

.vendor-showcase__meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.vendor-showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  font-weight: 600;
  color: inherit;
}

.vendor-showcase__actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 240px;
  position: relative;
}

.vendor-showcase__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 18px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  background: var(--vendor-button);
  color: var(--vendor-button-text);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
  transition: transform var(--transition), box-shadow var(--transition);
}

.vendor-showcase__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.22);
}

.vendor-showcase__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vendor-showcase__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
}

.vendor-showcase__link iconify-icon {
  font-size: 18px;
}

.vendor-showcase__stats {
  position: relative;
  margin-top: 32px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.vendor-metric {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: inherit;
}

.vendor-metric__label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.vendor-metric__value {
  font-size: 1.8rem;
  font-weight: 800;
}

.vendor-metric__hint {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
}

.vendor-story {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.vendor-story__subtitle {
  margin: 6px 0 0;
  color: var(--text-gray);
}

.vendor-story__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: inherit;
}

.vendor-story__body p {
  margin: 0;
  line-height: 1.7;
}

.vendor-story__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 12px;
}

.vendor-story__contacts a {
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}

.vendor-story__label {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(15, 23, 42, 0.55);
  margin-bottom: 2px;
}

.vendor-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (max-width: 768px) {
  .vendor-showcase__content {
    flex-direction: column;
    align-items: flex-start;
  }

  .vendor-showcase__actions {
    width: 100%;
  }

  .vendor-showcase__button {
    width: 100%;
  }

  .vendor-showcase__links {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }
}

@media (max-width: 900px) {
  .vendor-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .vendor-hero__stats {
    width: 100%;
  }

  .vendor-search {
    flex: 1 1 100%;
  }

  .vendor-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 600px) {
  .vendor-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .vendor-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* Newsletter Section */
.newsletter-section {
  background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 50px 0;
    box-shadow: var(--shadow-light);
    text-align: center;
  }

  .newsletter-content {
    max-width: 600px;
    margin: 0 auto;
  }

  .newsletter-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
  }

  .newsletter-text p {
    color: var(--text-gray);
    margin-bottom: 30px;
    font-size: 1.1rem;
  }

  .newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
  }

  .newsletter-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 16px;
    transition: border-color var(--transition);
  }

  .newsletter-input:focus {
    outline: none;
    border-color: var(--primary-purple);
  }rev

  .newsletter-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-family: 'Tajawal', Arial, sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
    white-space: nowrap;
  }

  .newsletter-btn:hover {
    background: var(--dark-purple);
  }

  /* Footer */
  .footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 50px;
  }

  .footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
  }

  .footer-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
  }

  .footer-links {
    list-style: none;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color var(--transition);
  }

  .footer-links a:hover {
    color: var(--white);
  }

  .social-links {
    display: flex;
    gap: 15px;
  }

  .social-links a {
    color: var(--text-gray);
    transition: color var(--transition);
  }

  .social-links a:hover {
    color: var(--primary-purple);
  }

  .footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #374151;
    color: var(--text-gray);
  }

  /* Shared Page Layout */
  .page-main {
    background: var(--background-light);
    padding: 60px 0;
  }

  .page-hero {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-light);
    display: grid;
    gap: 12px;
    margin-bottom: 32px;
  }

  .page-hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
  }

  .page-hero p {
    color: var(--text-gray);
    line-height: 1.7;
  }

  .page-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    color: var(--text-gray);
    font-size: 15px;
  }

  .status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--light-purple);
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 13px;
  }

  .status-pill iconify-icon {
    font-size: 16px;
  }

  .status-pill--success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green-accent);
  }

  .status-pill--warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--orange-accent);
  }

  .status-pill--accent {
    background: rgba(59, 130, 246, 0.18);
    color: var(--blue-accent);
  }

  .page-grid {
    display: grid;
    gap: 24px;
  }

  .page-grid--two-columns {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: flex-start;
  }

  .page-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-light);
  }

  .page-card + .page-card {
    margin-top: 20px;
  }

  .page-card h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-dark);
  }

  .page-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-dark);
  }

  .page-card p {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 12px;
  }

  .page-card p:last-child {
    margin-bottom: 0;
  }

  .page-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
  }

  .page-list li {
    position: relative;
    padding-inline-start: 22px;
    color: var(--text-gray);
    line-height: 1.6;
  }

  .page-list li::before {
    content: '•';
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    color: var(--primary-purple);
    font-size: 22px;
    line-height: 1;
  }

  /* Checkout Layout */
  .order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
    align-items: flex-start;
  }

  .order-primary {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  .order-sidebar {
    position: relative;
  }

  .sticky-card {
    position: sticky;
    top: 110px;
  }

  .summary-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
  }

  .summary-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-dark);
    font-size: 15px;
  }

  .summary-item p {
    margin: 4px 0 0;
    font-size: 13px;
  }

  .summary-total {
    border-top: 1px solid var(--border-light);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .summary-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
  }

  .address-box {
    border: 1px dashed var(--border-light);
    border-radius: 16px;
    padding: 16px;
    background: rgba(107, 70, 193, 0.05);
    margin-bottom: 16px;
  }

  .address-box h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }

  .payment-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .payment-option {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    background: var(--background-light);
    transition: border var(--transition), background var(--transition), box-shadow var(--transition);
    cursor: pointer;
  }

  .payment-option input {
    accent-color: var(--primary-purple);
    margin-top: 5px;
  }

  .payment-option .option-content {
    display: grid;
    gap: 4px;
  }

  .payment-option .option-title {
    font-weight: 600;
    color: var(--text-dark);
  }

  .payment-option .option-sub {
    color: var(--text-gray);
    font-size: 14px;
  }

  .payment-option.is-selected {
    border-color: var(--primary-purple);
    background: var(--light-purple);
    box-shadow: 0 6px 16px rgba(107, 70, 193, 0.18);
  }

  .card-fields {
    display: grid;
    gap: 20px;
    margin-top: 16px;
  }

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

  .form-grid-3 {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .form-field label {
    font-size: 14px;
    color: var(--text-gray);
  }

  .form-field input,
  .form-field select,
  .form-field textarea {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 12px 14px;
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 15px;
    background: var(--white);
    transition: border var(--transition), box-shadow var(--transition);
  }

  .form-field textarea {
    resize: vertical;
    min-height: 120px;
  }

  .form-field input:focus,
  .form-field select:focus,
  .form-field textarea:focus {
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 3px rgba(107, 70, 193, 0.15);
    outline: none;
  }

  .primary-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 16px;
    font-family: 'Tajawal', Arial, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
  }

  .primary-btn:hover {
    background: var(--dark-purple);
    box-shadow: 0 10px 20px rgba(107, 70, 193, 0.25);
  }

  .secondary-btn {
    background: rgba(107, 70, 193, 0.08);
    color: var(--primary-purple);
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-family: 'Tajawal', Arial, sans-serif;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
  }

  .secondary-btn:hover {
    background: rgba(107, 70, 193, 0.12);
  }

  /* Order details */
  .timeline {
    display: grid;
    gap: 16px;
  }

  .timeline-step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
  }

  .timeline-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-gray);
  }

  .timeline-step.completed .timeline-marker {
    border-color: var(--green-accent);
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-accent);
  }

  .timeline-step.active .timeline-marker {
    border-color: var(--primary-purple);
    color: var(--primary-purple);
  }

  .timeline-content h4 {
    font-size: 16px;
    margin-bottom: 4px;
    color: var(--text-dark);
  }

  .timeline-content p {
    margin: 0;
    color: var(--text-gray);
    font-size: 14px;
  }

  .order-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .order-item {
    display: flex;
    gap: 16px;
    align-items: center;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 12px 16px;
    background: var(--white);
  }

  .order-item img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
  }

  .order-item h4 {
    margin: 0 0 6px;
    font-size: 16px;
    color: var(--text-dark);
  }

  .order-item p {
    margin: 0;
    color: var(--text-gray);
    font-size: 14px;
  }

  .order-item .item-meta {
    margin-inline-start: auto;
    text-align: end;
    color: var(--text-dark);
    font-weight: 600;
  }

  /* Wishlist */
  .wishlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
  }

  .wishlist-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-light);
  }

  .wishlist-card img {
    width: 100%;
    border-radius: 14px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
  }

  .wishlist-card h3 {
    font-size: 18px;
    color: var(--text-dark);
  }

  .wishlist-card .price {
    color: var(--primary-purple);
    font-weight: 700;
  }

  .wishlist-card-actions {
    display: flex;
    gap: 12px;
  }

  .wishlist-card-actions button {
    flex: 1;
  }

  .wishlist-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px;
    border-radius: 16px;
    border: 1px dashed var(--border-light);
    background: rgba(107, 70, 193, 0.06);
    color: var(--text-gray);
    font-size: 16px;
  }

  /* FAQ */
  .faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  details.faq-item {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--shadow-light);
  }

  .faq-item summary {
    cursor: pointer;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .faq-item summary::marker {
    display: none;
  }

  .faq-item[open] summary {
    color: var(--primary-purple);
  }

  .faq-item p {
    padding: 0 20px 16px;
    color: var(--text-gray);
    line-height: 1.6;
  }

  /* Contact */
  .contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .contact-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-light);
    display: grid;
    gap: 20px;
  }

  .contact-methods {
    display: grid;
    gap: 16px;
    margin-top: 12px;
  }

  .contact-method {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-gray);
  }

  .contact-method strong {
    display: block;
    color: var(--text-dark);
    font-size: 15px;
  }

  .contact-method iconify-icon {
    font-size: 22px;
    color: var(--primary-purple);
  }

  .contact-card form {
    display: grid;
    gap: 20px;
  }

  .contact-card .form-grid-2 {
    gap: 20px;
  }

  /* About */
  .about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 32px 0;
  }

  .stat-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-light);
  }

  .stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-purple);
    margin-bottom: 6px;
  }

  .stat-card p {
    margin: 0;
    color: var(--text-gray);
  }

  .policy-section + .policy-section {
    margin-top: 24px;
  }

  /* Responsive Design - Mobile First */

  /* Mobile Styles (default) */
  @media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }

    .page-main {
        padding: 40px 0;
    }

    .page-hero {
        padding: 24px;
        margin-bottom: 24px;
    }

    .page-hero h1 {
        font-size: 24px;
    }

    .page-hero-meta {
        gap: 8px;
    }

    .order-layout,
    .page-grid--two-columns,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .order-primary {
        gap: 16px;
    }

    .sticky-card {
        position: static;
        top: auto;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .wishlist-grid {
        grid-template-columns: 1fr;
    }

    .order-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .order-item .item-meta {
        margin-inline-start: 0;
        text-align: start;
    }

    /* Header Mobile */
    .mobile-menu-btn {
        display: block;
        order: 1;
    }

    .header-content {
        grid-template-columns: auto 1fr auto;
        gap: 15px;
        position: relative;
    }

    .logo {
        font-size: 24px;
        order: 2;
        justify-self: center;
    }

    .search-container {
        order: 4;
        grid-column: 1 / -1;
        margin-top: 15px;
    }

    .header-actions {
        order: 3;
        gap: 10px;
    }

    .cart-btn {
        padding: 8px;
        gap: 8px;
    }

    .cart-total-info {
        display: none;
    }

    .language-switcher {
        order: 2;
    }

    .nav-links {
        display: none;
    }

    /* Hero Banner Mobile */
    .hero-banner {
        padding: 25px 20px;
        text-align: center;
    }

    .banner-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .banner-title {
        font-size: 2.5rem;
    }

    .banner-image {
        order: -1;
    }

    .banner-image img {
        max-width: 200px;
    }

    /* Categories Mobile */
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    .category-item {
        padding: 20px 10px;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .category-item span {
        font-size: 14px;
    }

    /* Products Mobile */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .product-info {
        padding: 15px;
    }

    .product-title {
        font-size: 14px;
    }

    .current-price {
        font-size: 16px;
    }

    /* Promo Banner Mobile */
    .promo-banner {
        padding: 25px 20px;
        text-align: center;
    }

    .promo-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .promo-text h3 {
        font-size: 1.8rem;
    }

    .promo-text p {
        font-size: 1rem;
    }

    .promo-image img {
        max-width: 150px;
    }

    /* Newsletter Mobile */
    .newsletter-form {
        flex-direction: column;
    }

    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
  }

  /* Tablet Styles */
  @media (min-width: 768px) and (max-width: 1199px) {
    .header-content {
        gap: 20px;
    }

    .search-container {
        max-width: 400px;
    }

    .order-layout,
    .page-grid--two-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sticky-card {
        position: static;
        top: auto;
    }

    .form-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .banner-title {
        font-size: 3rem;
    }

    .cart-total-info {
        display: flex;
    }
  }

  /* Desktop Styles */
  @media (min-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .products-grid-shop {
        grid-template-columns: repeat(3, 1fr);
    }


    .header-content {
        grid-template-columns: auto auto 1fr auto auto;
    }

    .cart-total-info {
        display: flex;
    }
  }

  /* Touch-friendly elements */
  @media (max-width: 767px) {
    .header-btn,
    .mobile-menu-btn,
    .mobile-menu-close,
    .lang-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-link,
    .mobile-nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
  }

  /* Loading States */
  .loading {
    opacity: 0.6;
    pointer-events: none;
  }

  .loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--border-light);
    border-top-color: var(--primary-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
  }

  /* Focus states for accessibility */
  *:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
  }

  button:focus,
  input:focus,
  .nav-link:focus,
  .mobile-nav-link:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
  }

  /* High contrast mode support */
  @media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --text-gray: #000000;
        --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
  }

  /* Custom header layout matching provided design */
  .top-bar-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  /* Header order using grid areas */
  .header-content--custom {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo search actions";
  }
  /* [dir="ltr"] .header-content--custom { */
    /* grid-template-areas: "logo search actions"; */
  /* } */
  .logo { grid-area: logo; }
  .search-container--custom { grid-area: search; }
  .header-actions-group { grid-area: actions; }

  /* Flag dropdown */
  .flag-switcher { position: relative; }
  .flag-dropdown {
    position: absolute;
    top: 54px;
    inset-inline-end: 0;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    padding: 6px;
    display: none;
    z-index: 1200;
    min-width: 140px;
  }
  .flag-switcher.open .flag-dropdown { display: block; }
  .flag-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
  }
  .flag-option:hover { background: var(--background-light); }

  /* Ensure search icon is inside */
  .search-btn--circle iconify-icon { color: var(--text-gray); }

  .cart-summary-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--background-light);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-dark);
  }

  .cart-summary-pill .cart-summary-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }

  .cart-summary-title {
    font-size: 12px;
    color: var(--text-gray);
  }

  .cart-summary-amount {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
  }

  .cart-summary-amount .currency {
    font-size: 11px;
    color: var(--text-gray);
  }

  .action-btn-square {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    color: var(--text-dark);
  }

  .search-container--custom { max-width: none; }

  .search-bar--custom {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    overflow: hidden;
  }

  .search-mode {
    padding: 12px 20px;
    background: var(--text-dark);
    color: var(--white);
    font-weight: 700;
    border-inline-end: 1px solid var(--border-light);
  }

  .search-btn--circle {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--background-light);
    border: 1px solid var(--border-light);
    margin: 0 8px;
  }

  /* Adjust existing search input for new layout */
  .search-bar--custom .search-input {
    padding: 12px 16px;
  }

  /* Responsive tweaks */
  @media (max-width: 767px) {
    .header-content--custom {
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .header-actions-group { justify-content: space-between; }
    .logo { justify-self: center; }
  }

  /* Ensure header action icons are horizontal */
  .header-actions-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
  }

  /* Search text button */
  .search-btn--text {
    background: #111827;
    color: #fff;
    border: none;
    height: 44px;
    padding: 0 16px;
    /* Square by default; rounded per language below */
    border-radius: 0;
    font-family: 'Tajawal', Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  /* Search ordering: icon - input - button for both directions (visual flips with dir) */
  [dir="rtl"] .search-bar--custom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  [dir="rtl"] .search-field-icon { order: 0; justify-self: end; padding-inline: 12px; }
  [dir="rtl"] .search-bar--custom .search-input { order: 1; text-align: right; }
  [dir="rtl"] .search-btn--text { order: 2; justify-self: start; }

  [dir="ltr"] .search-bar--custom { display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  [dir="ltr"] .search-field-icon { order: 0; justify-self: start; padding-inline: 12px; }
  [dir="ltr"] .search-bar--custom .search-input { order: 1; text-align: left; }
  [dir="ltr"] .search-btn--text { order: 2; justify-self: end; }

  /* Header actions order */
  .header-actions-group { display: inline-flex; gap: 12px; }
  .header-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--light-purple);
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background var(--transition), box-shadow var(--transition), color var(--transition);
  }

  .header-contact-link:hover {
    background: rgba(107, 70, 193, 0.18);
    box-shadow: 0 6px 16px rgba(107, 70, 193, 0.25);
  }
  .header-actions-group #cartBtn { order: 1; }
  .header-actions-group #favoriteBtn { order: 2; }
  .header-actions-group .header-contact-link { order: 3; }
  .header-actions-group .profile-menu-wrapper { order: 4; }
  .header-actions-group #flagSwitcher { order: 5; }
  .header-actions-group #mobileSearchTrigger { order: 6; }

  /* Navigation - consolidated final styles */
  .nav {
    background: #181a1e;
    border: none !important;
    box-shadow: none;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .nav-content { display: flex; justify-content: center; align-items: center; }

  .nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-links li { display: flex; align-items: center; }
  .nav-link { height: 44px; line-height: 0.5; display: inline-flex; align-items: center; }
  .nav-link .nav-text { display: inline-flex; align-items: center; line-height: 0.5; }
  .nav-link .nav-text, .nav-link .nav-text * { line-height: 0.5; }
  .nav-icon, .nav-caret { min-width: 18px; min-height: 18px; line-height: 0; display: inline-flex; align-items: center; justify-content: center; }

  /* Remove any previous underlines/bars */
  .nav-link::after,
  .nav-link.active::after { content: none !important; display: none !important; }

  /* Hover/active pill */
  .nav-link:hover,
  .nav-link.active {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  }

  /* Iconify icons sizing/visibility */
  iconify-icon,
  .nav-link iconify-icon,
  .nav-link .nav-icon,
  .nav-link .nav-caret {
    display: inline-flex;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 0; /* remove extra baseline space */
    vertical-align: middle;
    color: currentColor;
  }

  /* RTL/LTR ordering for nav link pieces */
  /* Both languages: icon - text - caret (spacing handled via gap) */
  [dir="rtl"] .nav-link .nav-icon { order: 0; margin-inline-start: 0; margin-inline-end: 0; }
  [dir="rtl"] .nav-link .nav-text  { order: 1; line-height: 0.5; }
  [dir="rtl"] .nav-link .nav-caret { order: 2; margin-inline-start: 0; margin-inline-end: 0; }

  [dir="ltr"] .nav-link .nav-icon { order: 0; margin-inline-start: 0; margin-inline-end: 0; }
  [dir="ltr"] .nav-link .nav-text  { order: 1; line-height: 1; }
  [dir="ltr"] .nav-link .nav-caret { order: 2; margin-inline-start: 0; margin-inline-end: 0; }

  /* Search layout: icon - input - button (both directions; alignment flips with dir) */
  .search-bar--custom { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; }
  /* Field icon position */
  .search-field-icon { color: var(--text-gray); }
  [dir="rtl"] .search-field-icon { order: 0; justify-self: end; padding-inline: 16px; }
  [dir="rtl"] .search-bar--custom .search-input { order: 1; padding-right: 44px; padding-left: 16px; text-align: right; }
  [dir="rtl"] .search-btn--text { order: 2; justify-self: start; }

  [dir="ltr"] .search-field-icon { order: 0; justify-self: start; padding-inline: 16px; }
  [dir="ltr"] .search-bar--custom .search-input { order: 1; padding-left: 44px; padding-right: 16px; text-align: left; }
  [dir="ltr"] .search-btn--text { order: 2; justify-self: end; }

  /* Only round the outer side of the search button */
  [dir="ltr"] .search-btn--text { border-start-end-radius: 12px; border-end-end-radius: 12px; border-start-start-radius: 0; border-end-start-radius: 0; }
  [dir="rtl"] .search-btn--text { border-start-start-radius: 0; border-end-start-radius: 0; border-start-end-radius: 12px; border-end-end-radius: 12px; }

  /* Explicit sizing for nav icon spans and inner icons */
  .nav-icon, .nav-caret { display: inline-flex; align-items: center; justify-content: center; }
  .nav-icon iconify-icon {font-size: 18px; }
  .nav-caret iconify-icon {font-size: 16px; }

  /* Inherit color */
  .nav-icon iconify-icon, .nav-caret iconify-icon { color: currentColor; }

  /* Nav dropdowns */
  .nav-item { position: relative; }
  .has-dropdown .nav-caret { transition: transform 0.2s ease; }

  .nav-dropdown {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    background: #ffffff;
    color: #111827;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    padding: 8px;
    min-width: 180px;
    display: none;
    z-index: 1400;
  }

  .nav-dropdown-item {
    display: block;
    padding: 10px 12px;
    color: #111827;
    text-decoration: none;
    border-radius: 8px;
  }

  .nav-dropdown-item:hover { background: #f3f4f6; }

  /* Show dropdown on hover */
  .has-dropdown:hover .nav-dropdown { display: block; }
  .has-dropdown:hover .nav-caret { transform: rotate(180deg); }

  /* Ensure Tabler icons inherit color */
  .nav-icon iconify-icon, .nav-caret iconify-icon { color: currentColor; }

  /* Logo image */
  .site-logo { max-height: 28px; display: block; }

  /* Search bar refinements */
  .search-bar--custom { border: 1px solid var(--border-light); border-radius: 14px; background: #fff; }
  [dir="rtl"] .search-bar--custom { grid-template-columns: auto 1fr auto; }
  [dir="ltr"] .search-bar--custom { grid-template-columns: auto 1fr auto; }

  /* Ensure circular button aligns flush */
  .search-btn--circle { width: 44px; height: 44px; border: 1px solid var(--border-light); background: #111827; color: #fff; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; }

  /* Mode pill style */
  .search-mode { background: #111827; color: #fff; padding: 10px 14px; border-start-start-radius: 12px; border-end-start-radius: 12px; }
  [dir="ltr"] .search-mode { border-start-end-radius: 12px; border-end-end-radius: 12px; border-start-start-radius: 0; border-end-start-radius: 0; }

  /* Input sizing */
  .search-bar--custom .search-input { height: 44px; border: none; background: transparent; font-family: 'Tajawal', Arial, sans-serif; font-size: 14px; color: var(--text-dark); }
  .search-bar--custom .search-input:focus { outline: none; }

  /* Global: center all iconify icons */
  iconify-icon { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }

  /* Center icon-only controls */
  .action-btn-square,
  .header-btn,
  .mobile-menu-btn,
  .mobile-menu-close,
  .cart-close,
  .product-action-btn,
  .quantity-btn,
  .search-btn--circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Center icon + text horizontally */
  .nav-link,
  .cart-summary-pill,
  .checkout-btn,
  .continue-shopping-btn,
  .offer-btn,
  .promo-btn,
  .view-all-btn,
  .newsletter-btn,
  .add-to-cart-btn,
  .mobile-action-btn,
  .search-btn--text {
    display: inline-flex;
    align-items: center;
  }

  /* Spacing between icon and text where applicable */
  .nav-link,
  .cart-summary-pill,
  .checkout-btn,
  .continue-shopping-btn,
  .offer-btn,
  .promo-btn,
  .view-all-btn,
  .newsletter-btn,
  .add-to-cart-btn,
  .mobile-action-btn,
  .search-btn--text { gap: 8px; }

  /* Tighten nav alignment */
  .nav-links li { display: flex; align-items: center; }
  .nav-link { height: 44px; line-height: 1; }
  .nav-link .nav-text { display: inline-flex; align-items: center; }
  .nav-icon, .nav-caret { min-width: 18px; min-height: 18px; }

  /* Ensure cart pill text is vertically centered */
  .cart-summary-text { display: flex; flex-direction: column; justify-content: center; }

  /* Normalize button/icon heights */
  .action-btn-square { width: 44px; height: 44px; }
  .header-btn { width: 44px; height: 44px; }

  /* Search input vertical centering */
  .search-bar--custom .search-input { display: flex; align-items: center; }

  /* Responsive header refinements */
  @media (max-width: 767px) {
    .header-content--custom { grid-template-columns: 1fr; gap: 12px; }
    .logo { justify-self: center; }
    .header-actions-group { justify-content: space-between; width: 100%; }
    .search-container--custom { width: 100%; }
    .search-bar--custom { width: 100%; }
  }

  @media (min-width: 768px) and (max-width: 1199px) {
    .header-content--custom { grid-template-columns: auto 1fr auto; gap: 16px; }
    .search-container--custom { max-width: 600px; }
  }

  /* Mobile-first, user-friendly header */
  @media (max-width: 767px) {
    /* Header grid: menu | logo | actions */
    .header-content--custom {
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 10px;
    }

    /* Show hamburger */
    .mobile-menu-btn { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; }

    /* Center logo */
    .logo { justify-self: center; }
    .site-logo { max-height: 24px; }

    /* Actions: show only flag + cart */
    #favoriteBtn, #profileBtn, .profile-menu-wrapper, .header-contact-link { display: none; }
    .header-actions-group { gap: 8px; }

    /* Search occupies full width on its own row */
    .search-container--custom { grid-column: 1 / -1; width: 100%; }
    .search-bar--custom { width: 100%; border-radius: 12px; }
    .search-btn--text { height: 40px; padding: 0 12px; }
    .search-bar--custom .search-input { height: 40px; font-size: 13px; }
    .search-field-icon iconify-icon { width: 20px; height: 20px; }

    /* Nav hidden on mobile (use drawer) */
    .nav-links { display: none; }
  }

  /* Mobile search modal */
  .search-modal { position: fixed; inset: 0; z-index: 3000; display: none; }
  .search-modal.active { display: block; }
  .search-modal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
  .search-modal__dialog { position: relative; max-width: 600px; margin: 10vh auto; background: #fff; border-radius: 12px; box-shadow: var(--shadow-medium); overflow: hidden; }
  .search-modal__header { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #111827; color: #fff; }
  .search-modal__close { background: none; border: none; color: #fff; display: inline-flex; align-items: center; justify-content: center; }
  .search-modal__body { padding: 16px; }
  .search-modal__input { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; border: 1px solid var(--border-light); border-radius: 10px; padding: 8px 10px; }
  .search-modal__input input { border: none; height: 36px; font-family: 'Tajawal', Arial, sans-serif; }
  .search-modal__input input:focus { outline: none; }
  .search-modal__submit { background: #111827; color: #fff; border: none; height: 36px; padding: 0 12px; border-radius: 8px; cursor: pointer; }

  /* Mobile: hide inline search, show trigger button */
  @media (max-width: 767px) {
    .search-container--custom { display: none; }
    .mobile-search-trigger { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; background: #111827; color: #fff; border-radius: 12px; border: none; }
  }

  /* Cart pill: hide text on small screens */
  @media (max-width: 767px) {
    .cart-summary-pill .cart-summary-text { display: none; }
    .cart-summary-pill { padding: 10px; }
  }

  @media (max-width: 767px) {
    .mobile-menu-btn { display: inline-flex; }
    .nav { display: none; }
    .nav::before, .nav::after { content: none; }
  }

  /* Visibility rules for mobile controls */
  .mobile-search-trigger { display: none; }
  @media (max-width: 767px) {
    .mobile-search-trigger { display: inline-flex; }
    .mobile-menu-btn { display: inline-flex; }
  }
  @media (min-width: 768px) {
    .mobile-search-trigger { display: none !important; }
    .mobile-menu-btn { display: none; }
  }

  /* Mobile-only utility */
  .mobile-only { display: none; }
  @media (max-width: 767px) {
    .mobile-only { display: inline-flex; }
  }
  @media (min-width: 768px) {
    .mobile-only { display: none !important; }
  }

  /* Mobile menu submenus */
  .mobile-has-sub { }
  .mobile-sub-toggle { width: 100%; background: none; border: none; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; gap: 12px; }
  .mobile-sub-toggle span { flex: 1; text-align: start; }
  .mobile-caret { transition: transform 0.2s ease; }
  .mobile-submenu { display: none; padding-inline-start: 24px; }
  .mobile-has-sub.open .mobile-submenu { display: block; }
  .mobile-has-sub.open .mobile-caret { transform: rotate(180deg); }

  /* Position mobile menu close relative to logo per language */
  [dir="rtl"] .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }
  [dir="ltr"] .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }

  /* Mobile menu UX improvements */
  .mobile-menu { width: 300px; max-width: 86vw; }
  .mobile-nav-links { padding: 0; margin: 0; list-style: none; }
  .mobile-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; color: var(--text-dark); text-decoration: none; }
  .mobile-nav-links > li + li { border-top: 1px solid var(--border-light); }
  .mobile-nav-link iconify-icon { width: 20px; height: 20px; }

  /* Submenu toggle row spacing */
  .mobile-sub-toggle { gap: 12px; padding: 14px 0; border: none; background: transparent; color: var(--text-dark); }
  .mobile-sub-toggle .mobile-caret { margin-inline-start: 8px; opacity: 0.8; }
  .mobile-submenu { padding: 6px 0 8px 0; margin: 0; list-style: none; border-top: 1px dashed var(--border-light); }
  .mobile-submenu .mobile-sub-link { display: block; padding: 10px 0 10px 24px; color: var(--text-dark); text-decoration: none; opacity: 0.9; }
  .mobile-submenu .mobile-sub-link:hover { opacity: 1; }

  /* Ensure overlay captures clicks fully when active */
  .mobile-overlay { pointer-events: none; }
  .mobile-overlay.active { pointer-events: auto; }

  /* Mobile menu header visibility and layout */
  .mobile-menu-header { display: flex; align-items: center; justify-content: space-between; }
  .mobile-menu-close { display: inline-flex !important; width: 44px; height: 44px; align-items: center; justify-content: center; background: transparent; border: none; color: var(--text-dark); }
  .mobile-menu-header .site-logo { max-height: 24px; }

  /* Mobile menu item alignment */
  .mobile-nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; }
  .mobile-nav-links > li { padding: 0 8px; }
  .mobile-nav-links > li + li { border-top: 1px solid var(--border-light); }

  /* Submenu toggle row */
  .mobile-sub-toggle { display: flex; align-items: center; width: 100%; gap: 12px; padding: 14px 4px; cursor: pointer; }
  .mobile-submenu { padding: 6px 0 8px 0; margin: 0; list-style: none; }
  .mobile-submenu .mobile-sub-link { display: block; padding: 10px 8px; }

  /* Better touch targets */
  .mobile-action-btn { min-height: 44px; }

  /* Global font enforcement for Tajawal */
  body, button, input, select, textarea, a, span, h1, h2, h3, h4, h5, h6, p, li, label, small, strong, b, em {
    font-family: 'Tajawal', Arial, sans-serif;
  }

  /* Ensure the hamburger/menu button is last in the actions row */
  #mobileMenuBtnHeader { order: 99; }
  [dir="rtl"] #mobileMenuBtnHeader { order: 99; }
  [dir="ltr"] #mobileMenuBtnHeader { order: 99; }

  /* Place mobile menu icon to the far right (RTL), right of the logo */
  [dir="rtl"] .header-content--custom {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "menu logo search actions";
  }
  #mobileMenuBtnHeader { grid-area: menu; justify-self: end; }

  /* Normalize cart and action button sizes */
  .action-btn-square, .cart-summary-pill { height: 44px; }
  .cart-summary-pill { padding: 0 12px; display: inline-flex; align-items: center; gap: 10px; }

  /* Mobile menu typography - unified size and weight */
  .mobile-nav-link,
  .mobile-sub-toggle,
  .mobile-submenu .mobile-sub-link,
  .mobile-action-btn {
    font-size: 16px;
    font-weight: 700;
  }
  .mobile-nav-link span,
  .mobile-sub-toggle span,
  .mobile-submenu .mobile-sub-link span,
  .mobile-action-btn span {
    font-size: inherit;
    font-weight: inherit;
  }

  /* Direction-aware flipping for icon+text rows */
  [dir="rtl"] .mobile-nav-link,
  [dir="rtl"] .mobile-sub-toggle,
  [dir="rtl"] .mobile-action-btn,
  [dir="rtl"] .cart-summary-pill {
    flex-direction: row-reverse;
    text-align: right;
  }

  [dir="ltr"] .nav-link,
  [dir="ltr"] .mobile-nav-link,
  [dir="ltr"] .mobile-sub-toggle,
  [dir="ltr"] .mobile-action-btn,
  [dir="ltr"] .cart-summary-pill {
    flex-direction: row;
    text-align: left;
  }

  /* Keep spacing logical regardless of direction */
  .nav-link, .mobile-nav-link, .mobile-sub-toggle, .mobile-action-btn, .cart-summary-pill { gap: 10px; }

  /* Explicit cart pill child ordering for each language */
  [dir="rtl"] #cartBtn .cart-summary-text { order: 1; }
  [dir="rtl"] #cartBtn .cart-icon-wrap { order: 2; }

  [dir="ltr"] #cartBtn .cart-icon-wrap { order: 1; }
  [dir="ltr"] #cartBtn .cart-summary-text { order: 2; }


/* Reviews Section Styles */
.reviews-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e5e5;
}

.reviews-title h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.review-count {
    color: #666;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.btn-review-toggle {
    background: var(--primary-color, #007bff);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-review-toggle:hover {
    background: var(--primary-hover, #0056b3);
}

/* Rating Summary */
.rating-summary {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.rating-overview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    align-items: center;
}

.rating-score {
    text-align: center;
}

.score {
    font-size: 3rem;
    font-weight: bold;
    color: #333;
    line-height: 1;
}

.stars {
    margin: 0.5rem 0;
    font-size: 1.2rem;
}

.total-reviews {
    color: #666;
    font-size: 0.9rem;
}

.rating-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rating-bar {
    display: grid;
    grid-template-columns: 60px 1fr 40px;
    gap: 1rem;
    align-items: center;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.rating-bar:hover {
    background: rgba(0, 0, 0, 0.05);
}

.star-label {
    font-size: 0.9rem;
    color: #666;
}

.bar-container {
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: #ffd700;
    transition: width 0.3s ease;
}

.count {
    font-size: 0.9rem;
    color: #666;
    text-align: right;
}

/* Review Form */
.review-form-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.review-form-container h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.review-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-input,
.form-textarea,
.sort-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.sort-select:focus {
    outline: none;
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.rating-input {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.star-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-btn.active,
.star-btn:hover {
    color: #ffd700;
}

.rating-text {
    margin-left: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-cancel {
    padding: 0.75rem 1.5rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.btn-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    background: var(--primary-color, #007bff);
    color: white;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-submit:hover {
    background: var(--primary-hover, #0056b3);
}

.btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Reviews Controls */
.reviews-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    gap: 2rem;
}

.filter-controls,
.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-controls span,
.sort-controls span {
    font-weight: 500;
    color: #333;
    margin-right: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.filter-btn:hover {
    background: #f8f9fa;
}

.filter-btn.active {
    background: var(--primary-color, #007bff);
    color: white;
    border-color: var(--primary-color, #007bff);
}

/* Reviews List */
.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.review-item {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
    padding: 2rem;
    transition: box-shadow 0.2s;
}

.review-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reviewer-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.verified-badge {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.review-rating {
    font-size: 1rem;
}

.review-date {
    color: #666;
    font-size: 0.9rem;
}

.review-title {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.review-comment {
    margin: 0 0 1.5rem 0;
    line-height: 1.6;
    color: #555;
}

.review-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.helpful-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    background: white;
    color: #666;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.helpful-btn:hover {
    background: #f8f9fa;
    border-color: #bbb;
}

.helpful-btn.active {
    background: #e7f3ff;
    border-color: var(--primary-color, #007bff);
    color: var(--primary-color, #007bff);
}

/* No Reviews */
.no-reviews {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.no-reviews p {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color, #007bff);
    cursor: pointer;
    text-decoration: underline;
    font-size: 1rem;
}

.btn-link:hover {
    color: var(--primary-hover, #0056b3);
}

/* Pagination */
.reviews-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .reviews-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .rating-overview {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .review-form .form-row {
        grid-template-columns: 1fr;
    }

    .reviews-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .filter-controls,
    .sort-controls {
        flex-wrap: wrap;
        justify-content: center;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .reviewer-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

.error-text {
    color: #dc3545;
}
