/* ============================================================
   Thank's — Material Design System ("Lumen")
   Maroon · Gold · Warm neutral — bilingual (AR/EN)
   ============================================================ */

:root {
  --primary:       #4B1020;
  --primary-light: #6d1830;
  --primary-dark:  #2c0c16;
  --secondary:     #7A4B4B;
  --accent:        #C9A27E;
  --accent-light:  #dfc0a0;
  --bg:            #FBF6F0;
  --bg-light:      #FFFAF4;
  --surface:       #ffffff;
  --white:         #ffffff;
  --text:          #211a1b;
  --text-muted:    #6f5b58;
  --border:        #ece0d6;

  /* Material elevation */
  --e1: 0 1px 2px rgba(75,16,32,.10), 0 1px 3px rgba(75,16,32,.06);
  --e2: 0 2px 6px rgba(75,16,32,.10), 0 1px 10px rgba(75,16,32,.06);
  --e3: 0 4px 8px rgba(75,16,32,.12), 0 6px 20px rgba(75,16,32,.10);
  --e4: 0 8px 16px rgba(75,16,32,.14), 0 12px 28px rgba(75,16,32,.12);
  --shadow:    var(--e1);
  --shadow-lg: var(--e3);

  --radius:    16px;
  --radius-sm: 12px;
}

/* Base */
* { box-sizing: border-box; }
body {
  font-family: 'Roboto', 'Segoe UI', 'Arial', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] body { font-family: 'Tajawal', 'Arial', sans-serif; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-light); }

h1,h2,h3,h4,h5 { font-family: 'Roboto Flex', 'Roboto', sans-serif; }
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3,[dir="rtl"] h4,[dir="rtl"] h5 { font-family: 'Tajawal', sans-serif; }

.material-icons { vertical-align: middle; line-height: 1; }

/* ============================================================
   APP BAR / HEADER
   ============================================================ */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--e2);
}

.top-bar {
  background: var(--primary-dark);
  color: #f0e2d6;
  font-size: 0.78rem;
  padding: 7px 0;
  letter-spacing: 0.3px;
}

/* Logo sits on a white chip so the dark maroon mark stays visible on the maroon bar */
.navbar-brand img {
  height: 46px;
  width: auto;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  padding: 4px 12px;
  box-shadow: var(--e1);
}
.navbar-brand .logo-text { font-size: 1.6rem; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.navbar-brand .logo-text span { color: var(--accent); }

/* Search — Material filled pill inside the app bar */
.nav-search {
  background: rgba(255,255,255,0.16);
  border-radius: 28px;
  overflow: hidden;
  align-items: center;
  max-width: 560px;
  transition: background 0.2s, box-shadow 0.2s;
}
.nav-search:focus-within { background: rgba(255,255,255,0.24); box-shadow: 0 0 0 2px rgba(201,162,126,0.55); }
.nav-search .form-control {
  border: none;
  border-radius: 28px;
  padding: 11px 20px;
  font-size: 0.92rem;
  background: transparent;
  color: #fff;
  min-width: 200px;
}
.nav-search .form-control::placeholder { color: rgba(255,255,255,0.72); }
.nav-search .form-control:focus { border: none; box-shadow: none; background: transparent; color: #fff; }
.nav-search .btn-search {
  border-radius: 28px;
  background: transparent;
  color: #fff;
  border: none;
  padding: 8px 18px;
  font-size: 1.15rem;
}
.nav-search .btn-search:hover { color: var(--accent); }

/* Icon buttons — Material circular with state layer */
.nav-icon-btn {
  position: relative;
  color: #fff;
  font-size: 1.25rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.16); color: #fff; }

.cart-badge, .wish-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.62rem;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

/* Category tabs */
.main-nav { background: var(--primary-light); }
.main-nav .nav-link {
  color: #ecd9cf;
  font-size: 0.86rem;
  font-weight: 500;
  padding: 13px 16px;
  border-radius: 0;
  border-bottom: 3px solid transparent;
  letter-spacing: 0.02em;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.main-nav .nav-link:hover { color: #fff; background: rgba(255,255,255,0.06); }
.main-nav .nav-link.active { color: #fff; background: transparent; border-bottom-color: var(--accent); }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero-slider .carousel-item {
  height: 520px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  position: relative;
  overflow: hidden;
}
.hero-slider .carousel-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(75,16,32,0.88) 0%, rgba(75,16,32,0.15) 65%);
  display: flex;
  align-items: center;
}
[dir="rtl"] .hero-overlay { background: linear-gradient(to left, rgba(75,16,32,0.88) 0%, rgba(75,16,32,0.15) 65%); }

.hero-content { color: #fff; max-width: 540px; padding: 0 40px; }
.hero-content h1 { font-size: 3rem; font-weight: 700; line-height: 1.1; margin-bottom: 16px; }
.hero-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 28px; }

/* Material filled button (gold) */
.btn-hero {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 14px 34px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 24px;
  box-shadow: var(--e2);
  transition: all 0.2s;
  display: inline-block;
}
.btn-hero:hover { background: #d4af89; color: var(--primary); box-shadow: var(--e3); transform: translateY(-1px); }

.carousel-indicators [data-bs-target] { background-color: var(--accent); width: 10px; height: 10px; border-radius: 50%; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title { font-size: 1.8rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.section-subtitle { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 28px; }
.section-divider { width: 50px; height: 3px; background: var(--accent); border-radius: 2px; margin: 10px 0 24px; }

/* ============================================================
   OCCASIONS / CATEGORIES ROW
   ============================================================ */
.occasions-section { background: var(--surface); padding: 36px 0; border-bottom: 1px solid var(--border); }

.occasion-card { text-align: center; cursor: pointer; transition: transform 0.2s; }
.occasion-card:hover { transform: translateY(-4px); }
.occasion-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.9rem;
  border: none;
  box-shadow: var(--e1);
  transition: all 0.25s;
}
.occasion-card:hover .occasion-icon { background: var(--primary); color: #fff; box-shadow: var(--e3); }
.occasion-label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }
.occasion-card:hover .occasion-label { color: var(--primary); }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: none;
  box-shadow: var(--e1);
  transition: all 0.25s;
  position: relative;
  height: 100%;
}
.product-card:hover { box-shadow: var(--e3); transform: translateY(-3px); }

.product-card .card-img-wrapper { position: relative; height: 220px; overflow: hidden; background: var(--bg-light); }
.product-card .card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .card-img-wrapper img { transform: scale(1.05); }

.product-img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--accent-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.badge-sale, .badge-new, .badge-best {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 8px;
  box-shadow: var(--e1);
}
.badge-sale { background: #d7263d; color: #fff; }
.badge-new  { background: var(--accent); color: var(--primary); }
.badge-best { background: var(--primary); color: #fff; }

.btn-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,0.95);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 1rem;
  color: var(--text-muted);
  box-shadow: var(--e1);
}
.btn-wishlist:hover, .btn-wishlist.active { color: #d7263d; background: #fff; box-shadow: var(--e2); }

.product-card .card-body { padding: 16px; }
.product-title {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-category { font-size: 0.72rem; color: var(--accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }

.product-rating { font-size: 0.8rem; color: #f0a92e; margin-bottom: 8px; }
.product-rating .reviews { color: var(--text-muted); }

.price-current { font-size: 1.18rem; font-weight: 700; color: var(--primary); }
.price-original { font-size: 0.85rem; color: var(--text-muted); text-decoration: line-through; margin-left: 6px; }

/* Material filled button */
.btn-add-cart {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 100%;
  padding: 11px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 24px;
  box-shadow: var(--e1);
  transition: all 0.2s;
  margin-top: 12px;
  cursor: pointer;
}
.btn-add-cart:hover { background: var(--primary-light); box-shadow: var(--e2); transform: translateY(-1px); }

/* ============================================================
   FLASH SALE SECTION
   ============================================================ */
.flash-sale-section { background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); padding: 54px 0; color: #fff; }
.flash-sale-section .section-title { color: #fff; }
.flash-sale-section .section-subtitle { color: rgba(255,255,255,0.75); }
.flash-sale-section .section-divider { background: var(--accent); }

.countdown-wrapper { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.countdown-block {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  min-width: 68px;
}
.countdown-value { font-size: 2rem; font-weight: 700; line-height: 1; display: block; }
.countdown-label { font-size: 0.68rem; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.5px; }
.countdown-sep { font-size: 1.8rem; font-weight: 700; opacity: 0.7; margin-top: -8px; }

.flash-product-card {
  background: rgba(255,255,255,0.1);
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--e2);
  transition: all 0.25s;
}
.flash-product-card:hover { background: rgba(255,255,255,0.18); transform: translateY(-3px); box-shadow: var(--e3); }
.flash-product-card .card-img-wrapper { height: 180px; overflow: hidden; background: rgba(255,255,255,0.08); }
.flash-product-card .card-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.flash-product-card .card-body { padding: 14px; }
.flash-product-card .product-title { color: #fff; }
.flash-product-card .price-current { color: var(--accent); }
.flash-product-card .price-original { color: rgba(255,255,255,0.55); }
.flash-product-card .btn-add-cart { background: var(--accent); color: var(--primary); }
.flash-product-card .btn-add-cart:hover { background: var(--accent-light); }

/* ============================================================
   SECTION BACKGROUNDS
   ============================================================ */
.section-white { background: var(--surface); }
.section-bg    { background: var(--bg); }
.section-pad   { padding: 60px 0; }

/* ============================================================
   BANNERS ROW
   ============================================================ */
.promo-banner {
  border-radius: var(--radius);
  overflow: hidden;
  height: 180px;
  position: relative;
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  display: flex;
  align-items: center;
  padding: 24px;
  box-shadow: var(--e1);
  transition: all 0.25s;
}
.promo-banner:hover { transform: translateY(-3px); box-shadow: var(--e3); }
.promo-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; }
.promo-banner-content { position: relative; z-index: 1; color: #fff; }
.promo-banner-content h4 { font-weight: 700; font-size: 1.2rem; margin-bottom: 4px; }
.promo-banner-content p  { font-size: 0.85rem; opacity: 0.85; margin: 0; }

/* ============================================================
   VALUE PROPS / FEATURES
   ============================================================ */
.feature-card {
  text-align: center;
  padding: 28px 20px;
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--e1);
  transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--e3); transform: translateY(-3px); }
.feature-icon { font-size: 2.4rem; margin-bottom: 14px; display: block; }
.feature-card h6 { font-weight: 700; color: var(--primary); margin-bottom: 6px; }
.feature-card p  { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--primary-dark); color: rgba(255,255,255,0.85); padding: 60px 0 30px; }
.footer-brand .logo-text { color: #fff; font-size: 1.5rem; font-weight: 800; }
.footer-brand .logo-text span { color: var(--accent); }
.footer-brand p { font-size: 0.85rem; margin-top: 10px; opacity: 0.75; }

.footer-heading { color: #fff; font-weight: 700; font-size: 0.85rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.1em; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.7); font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }

.social-links { display: flex; gap: 10px; margin-top: 16px; }
.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.9rem;
  transition: all 0.2s;
  border: none;
}
.social-link:hover { background: var(--accent); color: var(--primary); transform: translateY(-2px); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 40px; padding-top: 20px; font-size: 0.8rem; opacity: 0.65; }

.newsletter-input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 25px 0 0 25px;
  color: #fff;
  padding: 11px 16px;
  font-size: 0.85rem;
  width: calc(100% - 100px);
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus { outline: none; border-color: var(--accent); }
.newsletter-btn {
  background: var(--accent);
  color: var(--primary);
  border: none;
  padding: 11px 20px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 0 25px 25px 0;
  cursor: pointer;
}
.newsletter-btn:hover { background: var(--accent-light); }

/* ============================================================
   PRODUCT DETAIL PAGE
   ============================================================ */
.product-detail .main-image { border-radius: var(--radius); overflow: hidden; height: 480px; background: var(--bg-light); box-shadow: var(--e1); }
.product-detail .main-image img { width: 100%; height: 100%; object-fit: cover; }
.thumb-gallery { display: flex; gap: 10px; margin-top: 12px; }
.thumb-gallery .thumb {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.thumb-gallery .thumb.active { border-color: var(--primary); }
.thumb-gallery .thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-title-lg { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.2; }
.price-lg { font-size: 2rem; font-weight: 700; color: var(--primary); }
.price-lg-original { font-size: 1.2rem; color: var(--text-muted); text-decoration: line-through; }

.variant-group { margin: 20px 0; }
.variant-group label { font-weight: 700; font-size: 0.9rem; margin-bottom: 10px; display: block; }
.variant-options { display: flex; gap: 10px; flex-wrap: wrap; }
.variant-btn {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
  color: var(--text);
  box-shadow: var(--e1);
}
.variant-btn:hover, .variant-btn.selected { border-color: var(--primary); background: var(--primary); color: #fff; }

.qty-control {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  width: fit-content;
}
.qty-btn {
  background: var(--bg-light);
  border: none;
  width: 42px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.15s;
  font-weight: 700;
  color: var(--primary);
}
.qty-btn:hover { background: var(--bg); }
.qty-input { border: none; width: 52px; height: 44px; text-align: center; font-weight: 700; font-size: 1rem; background: var(--surface); }
.qty-input:focus { outline: none; }

.btn-add-cart-lg {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px 38px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 28px;
  box-shadow: var(--e2);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-add-cart-lg:hover { background: var(--primary-light); box-shadow: var(--e3); transform: translateY(-1px); }

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-item {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: none;
  box-shadow: var(--e1);
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  align-items: center;
}
.cart-item img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; background: var(--bg-light); flex-shrink: 0; }
.cart-item-details { flex: 1; }
.cart-item-title { font-weight: 700; margin-bottom: 4px; }
.cart-item-variant { font-size: 0.82rem; color: var(--text-muted); }

.order-summary-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--e2);
  padding: 24px;
  position: sticky;
  top: 100px;
}
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; border-bottom: 1px solid var(--bg); }
.summary-total { font-size: 1.15rem; font-weight: 700; color: var(--primary); border-bottom: none; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-section {
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--e1);
  padding: 24px;
  margin-bottom: 20px;
}
.checkout-section h5 { font-weight: 700; color: var(--primary); margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--bg); }

.time-slot-btn {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s;
  color: var(--text);
}
.time-slot-btn:hover, .time-slot-btn.selected { border-color: var(--primary); background: rgba(75,16,32,0.06); color: var(--primary); }
.time-slot-btn .slot-extra { display: block; font-size: 0.7rem; color: var(--accent); font-weight: 700; margin-top: 2px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page { min-height: 100vh; background: var(--bg); display: flex; align-items: center; padding: 40px 0; }
.auth-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--e4);
  overflow: hidden;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}
.auth-header { background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%); padding: 36px; text-align: center; color: #fff; }
.auth-header h2 { font-weight: 700; margin-bottom: 4px; }
.auth-header p  { opacity: 0.85; font-size: 0.9rem; margin: 0; }
.auth-body { padding: 32px; }

.form-label { font-weight: 500; font-size: 0.88rem; color: var(--text); margin-bottom: 6px; }
.form-control, .form-select {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.92rem;
  background: var(--bg-light);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(75,16,32,0.1);
  background: var(--surface);
}
.form-control.is-invalid { border-color: #dc3545; }
.input-group-text { background: var(--bg-light); border: 1.5px solid var(--border); color: var(--text-muted); border-radius: 12px; }

/* Material filled button */
.btn-primary-custom {
  background: var(--primary);
  color: #fff;
  border: none;
  width: 100%;
  padding: 13px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 24px;
  box-shadow: var(--e2);
  transition: all 0.2s;
  cursor: pointer;
}
.btn-primary-custom:hover { background: var(--primary-light); box-shadow: var(--e3); }
.btn-primary-custom:disabled { opacity: 0.65; cursor: not-allowed; box-shadow: none; }

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-wrapper { background: var(--surface); padding: 14px 0; border-bottom: 1px solid var(--border); }
.breadcrumb { margin: 0; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }
.breadcrumb-item a { color: var(--primary); font-size: 0.85rem; }
.breadcrumb-item.active { font-size: 0.85rem; color: var(--text-muted); }

/* ============================================================
   FILTERS SIDEBAR
   ============================================================ */
.filters-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--e1);
  padding: 20px;
  position: sticky;
  top: 100px;
}
.filter-title { font-weight: 700; font-size: 1rem; color: var(--primary); margin-bottom: 16px; }
.filter-section { margin-bottom: 20px; }
.filter-section h6 { font-weight: 700; font-size: 0.85rem; color: var(--text); margin-bottom: 10px; }
.filter-check .form-check-label { font-size: 0.85rem; }
.filter-check .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.price-range-display { font-size: 0.85rem; color: var(--primary); font-weight: 600; }
.form-range::-webkit-slider-thumb { background: var(--primary); }
.form-range::-moz-range-thumb { background: var(--primary); }

/* ============================================================
   ORDER STATUS TRACKER
   ============================================================ */
.order-tracker { display: flex; justify-content: space-between; position: relative; margin: 30px 0; }
.order-tracker::before { content: ''; position: absolute; top: 20px; left: 0; right: 0; height: 2px; background: var(--border); }
.tracker-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; z-index: 1; }
.tracker-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--e1);
  transition: all 0.3s;
}
.tracker-step.done .tracker-dot { background: var(--accent); border-color: var(--accent); color: var(--primary); }
.tracker-step.active .tracker-dot { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(75,16,32,0.15); }
.tracker-label { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-align: center; }
.tracker-step.active .tracker-label { color: var(--primary); }
.tracker-step.done  .tracker-label  { color: var(--secondary); }

/* ============================================================
   FLOATING ACTION BUTTON
   ============================================================ */
.fab {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: var(--accent);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--e3);
  z-index: 900;
  cursor: pointer;
  transition: all 0.2s;
}
.fab:hover { background: var(--accent-light); color: var(--primary); transform: scale(1.06); box-shadow: var(--e4); }
[dir="rtl"] .fab { right: auto; left: 26px; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; }
.toast { border-radius: 12px; border: none; min-width: 280px; box-shadow: var(--e3); }
.toast.bg-success { background: var(--primary) !important; }

/* ============================================================
   MISC
   ============================================================ */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom   { background-color: var(--primary) !important; }
.btn-outline-primary-custom {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 24px;
  padding: 9px 22px;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-primary-custom:hover { background: var(--primary); color: #fff; box-shadow: var(--e2); }

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; display: block; }
.empty-state h4 { color: var(--text); font-weight: 700; }

.spinner-primary { color: var(--primary); width: 2rem; height: 2rem; }

/* Scroll-behavior */
html { scroll-behavior: smooth; }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.lang-switcher { display: flex; align-items: center; gap: 6px; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.3);
  text-decoration: none;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.lang-btn:hover, .lang-btn.active-lang { color: #fff; background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.6); }
.lang-flag { font-size: 1rem; }

/* ============================================================
   COMPREHENSIVE RTL OVERRIDES
   ============================================================ */
[dir="rtl"] body,
[dir="rtl"] .btn,
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] input,
[dir="rtl"] textarea { font-family: 'Tajawal', 'Segoe UI', sans-serif; letter-spacing: 0; }

[dir="rtl"] .text-md-start { text-align: right !important; }
[dir="rtl"] .text-md-end   { text-align: left  !important; }
[dir="rtl"] .text-start    { text-align: right !important; }
[dir="rtl"] .text-end      { text-align: left  !important; }

/* ── Header ── */
[dir="rtl"] .site-header .ms-auto  { margin-left: 0  !important; margin-right: auto !important; }
[dir="rtl"] .site-header .me-3     { margin-right: 0 !important; margin-left: 1rem !important; }

/* ── Product cards ── */
[dir="rtl"] .badge-sale,
[dir="rtl"] .badge-new,
[dir="rtl"] .badge-best   { left: auto; right: 12px; }
[dir="rtl"] .btn-wishlist { right: auto; left: 10px; }
[dir="rtl"] .cart-badge, [dir="rtl"] .wish-badge { right: auto; left: 2px; }
[dir="rtl"] .price-original { margin-left: 0; margin-right: 6px; }
[dir="rtl"] .product-card .card-body { text-align: right; }
[dir="rtl"] .product-rating { justify-content: flex-end; }

/* ── Hero / Sections ── */
[dir="rtl"] .hero-content { text-align: right; }
[dir="rtl"] .hero-content .hero-btns { justify-content: flex-end; }
[dir="rtl"] .section-title { text-align: right; }

/* ── Flash sale ── */
[dir="rtl"] .flash-sale-section .text-start { text-align: right !important; }
[dir="rtl"] .countdown-wrapper { flex-direction: row-reverse; }

/* ── Order tracker ── */
[dir="rtl"] .order-tracker { direction: rtl; }
[dir="rtl"] .tracker-step::before { left: auto; right: 50%; transform: translateX(50%); }

/* ── Auth cards ── */
[dir="rtl"] .auth-card .text-start { text-align: right !important; }
[dir="rtl"] .input-group .form-control:first-child { border-radius: 0 12px 12px 0; border-right-width: 1px; border-left-width: 0; }
[dir="rtl"] .input-group .input-group-text:last-child { border-radius: 12px 0 0 12px; }

/* ── Forms ── */
[dir="rtl"] .form-label  { display: block; text-align: right; }
[dir="rtl"] .form-check  { padding-left: 0; padding-right: 1.5em; }
[dir="rtl"] .form-check-input { float: right; margin-left: 0; margin-right: -1.5em; }

/* ── Bootstrap utility flips ── */
[dir="rtl"] .me-1 { margin-right: 0 !important; margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-right: 0 !important; margin-left: 0.5rem  !important; }
[dir="rtl"] .me-3 { margin-right: 0 !important; margin-left: 1rem    !important; }
[dir="rtl"] .ms-1 { margin-left: 0  !important; margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-left: 0  !important; margin-right: 0.5rem  !important; }
[dir="rtl"] .ms-3 { margin-left: 0  !important; margin-right: 1rem    !important; }
[dir="rtl"] .ms-auto { margin-left: 0    !important; margin-right: auto !important; }
[dir="rtl"] .me-auto { margin-right: 0   !important; margin-left: auto  !important; }
[dir="rtl"] .ps-3 { padding-left: 0  !important; padding-right: 1rem !important; }
[dir="rtl"] .pe-3 { padding-right: 0 !important; padding-left: 1rem  !important; }

/* ── Footer ── */
[dir="rtl"] .footer-brand   { text-align: right; }
[dir="rtl"] .footer-links   { padding-right: 0; text-align: right; }
[dir="rtl"] .newsletter-input { border-radius: 0 25px 25px 0; }
[dir="rtl"] .newsletter-btn  { border-radius: 25px 0 0 25px; }
[dir="rtl"] .social-links    { justify-content: flex-start; }

/* ── Alerts & toasts ── */
[dir="rtl"] .alert { text-align: right; }
[dir="rtl"] .alert .btn-close { margin-left: 0; margin-right: auto; }
[dir="rtl"] .toast-container  { left: 1rem; right: auto; }

/* ── Tables ── */
[dir="rtl"] table { direction: rtl; }
[dir="rtl"] th, [dir="rtl"] td { text-align: right; }

/* ── Dropdowns ── */
[dir="rtl"] .dropdown-menu { text-align: right; }
[dir="rtl"] .dropdown-menu.dropdown-menu-end { right: auto; left: 0; }

/* ── Breadcrumb ── */
[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before { content: "\\"; float: right; padding-right: 0; padding-left: 0.5rem; }

/* ── Pagination ── */
[dir="rtl"] .pagination { flex-direction: row-reverse; }
.page-link { color: var(--primary); border-radius: 10px !important; margin: 0 3px; border: 1px solid var(--border); }
.page-item.active .page-link { background: var(--primary); border-color: var(--primary); }
