/* =========================================================
   Wajhat Commerce - storefront theme
   Mobile-first. Navy #1B3A6B / Orange #F47B20 / Inter.
   ========================================================= */

:root {
  --wj-navy: #1B3A6B;
  --wj-navy-dark: #142C52;
  --wj-navy-light: #2D5390;
  --wj-navy-soft: #EEF3FA;
  --wj-orange: #F47B20;
  --wj-orange-dark: #D9660F;
  --wj-orange-soft: #FFF1E6;
  --wj-bg: #F4F6FA;
  --wj-card: #FFFFFF;
  --wj-text: #1F2937;
  --wj-muted: #6B7A90;
  --wj-border: #E3E8F0;
  --wj-success: #1E9E5A;
  --wj-success-soft: #E6F6ED;
  --wj-danger: #D64545;
  --wj-danger-soft: #FCEAEA;
  --wj-radius: 12px;
  --wj-radius-sm: 8px;
  --wj-shadow: 0 2px 12px rgba(27, 58, 107, 0.08);
  --wj-shadow-lg: 0 8px 28px rgba(27, 58, 107, 0.14);
  --wj-topbar-h: 60px;
  --wj-bottomnav-h: 64px;
  --wj-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;

  /* Bootstrap hooks */
  --bs-primary: #1B3A6B;
  --bs-primary-rgb: 27, 58, 107;
  --bs-link-color: #1B3A6B;
  --bs-link-color-rgb: 27, 58, 107;
  --bs-link-hover-color: #F47B20;
  --bs-link-hover-color-rgb: 244, 123, 32;
  --bs-body-font-family: var(--wj-font);
  --bs-body-bg: #F4F6FA;
  --bs-body-color: #1F2937;
  --bs-border-color: #E3E8F0;
  --bs-border-radius: 12px;
}

/* ---------- Base ---------- */
html { font-size: 15px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (min-width: 992px) { html { font-size: 16px; } }

body {
  font-family: var(--wj-font);
  background: var(--wj-bg);
  color: var(--wj-text);
  min-height: 100vh;
  /* keep content clear of the fixed bottom tab bar on mobile */
  padding-bottom: calc(var(--wj-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 16px);
}
@media (min-width: 992px) { body { padding-bottom: 0; } }

a { text-decoration: none; }
a:hover { color: var(--wj-orange); }
img { max-width: 100%; }
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--wj-navy); }
button { font-family: inherit; }

.store-main { padding-top: 12px; }
@media (min-width: 992px) { .store-main { padding-top: 24px; min-height: 60vh; } }

.text-navy { color: var(--wj-navy) !important; }
.text-orange { color: var(--wj-orange) !important; }
.text-muted, .text-secondary { color: var(--wj-muted) !important; }
.bg-navy { background: var(--wj-navy) !important; }
.bg-orange { background: var(--wj-orange) !important; }
.mobile-only { display: block; }
.desktop-only { display: none; }
@media (min-width: 992px) {
  .mobile-only { display: none !important; }
  .desktop-only { display: block; }
  .row.desktop-only { display: flex; }
}

/* ---------- Focus & buttons ---------- */
.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(27, 58, 107, 0.18);
}
.btn { border-radius: 10px; font-weight: 600; }
.btn-primary { --bs-btn-bg: var(--wj-navy); --bs-btn-border-color: var(--wj-navy); --bs-btn-hover-bg: var(--wj-navy-dark); --bs-btn-hover-border-color: var(--wj-navy-dark); --bs-btn-active-bg: var(--wj-navy-dark); --bs-btn-active-border-color: var(--wj-navy-dark); }
.btn-navy { background: var(--wj-navy); color: #fff; border: 1px solid var(--wj-navy); }
.btn-navy:hover, .btn-navy:focus { background: var(--wj-navy-dark); color: #fff; }
.btn-outline-navy { background: #fff; color: var(--wj-navy); border: 1px solid var(--wj-navy); }
.btn-outline-navy:hover { background: var(--wj-navy); color: #fff; }
.btn-orange { background: var(--wj-orange); color: #fff; border: 1px solid var(--wj-orange); }
.btn-orange:hover, .btn-orange:focus { background: var(--wj-orange-dark); border-color: var(--wj-orange-dark); color: #fff; }
.btn-outline-orange { background: #fff; color: var(--wj-orange); border: 1px solid var(--wj-orange); }
.btn-outline-orange:hover { background: var(--wj-orange); color: #fff; }

.btn-primary-orange {
  display: block;
  width: 100%;
  background: var(--wj-orange);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  letter-spacing: .01em;
  transition: background .15s ease, transform .1s ease;
}
.btn-primary-orange:hover, .btn-primary-orange:focus { background: var(--wj-orange-dark); color: #fff; }
.btn-primary-orange:active { transform: translateY(1px); }
.btn-primary-orange:disabled, .btn-primary-orange.disabled { opacity: .6; pointer-events: none; }

/* ---------- Top bar (mobile) ---------- */
.store-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--wj-topbar-h);
  background: #fff;
  box-shadow: 0 1px 0 var(--wj-border), 0 2px 10px rgba(27, 58, 107, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  gap: 8px;
}
.store-topbar .brand { display: flex; align-items: center; }
.store-topbar .brand img { height: 32px; width: auto; }
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--wj-navy);
  font-size: 24px;
  line-height: 1;
}
.icon-btn:hover, .icon-btn:focus { background: var(--wj-navy-soft); color: var(--wj-navy); }
.cart-badge {
  position: absolute;
  top: 2px;
  inset-inline-end: 0;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--wj-orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
  transition: transform .2s ease;
}
.cart-badge.is-empty { display: none; }
.cart-badge.bump { transform: scale(1.3); }
@media (min-width: 992px) { .store-topbar { display: none; } }

/* Mobile sub-bar: search + price toggle */
.store-subbar {
  background: #fff;
  border-bottom: 1px solid var(--wj-border);
  padding: 8px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (min-width: 992px) { .store-subbar { display: none; } }

/* ---------- Search form ---------- */
.search-form { display: flex; align-items: stretch; width: 100%; }
.search-form .form-control {
  border-start-start-radius: 10px;
  border-end-start-radius: 10px;
  border-start-end-radius: 0;
  border-end-end-radius: 0;
  border-inline-end: 0;
  height: 42px;
  min-height: 42px;
  font-size: 14px;
  background: #F8FAFD;
}
.search-form .form-control:focus { background: #fff; }
.search-form .btn {
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: 10px;
  border-end-end-radius: 10px;
  background: var(--wj-orange);
  color: #fff;
  border: 1px solid var(--wj-orange);
  width: 46px;
  padding: 0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.search-form .btn:hover { background: var(--wj-orange-dark); border-color: var(--wj-orange-dark); }

/* ---------- Price toggle pill ---------- */
.price-toggle {
  display: inline-flex;
  align-items: center;
  background: #E9EEF6;
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  white-space: nowrap;
}
.price-toggle form { display: contents; }
.price-toggle button {
  border: 0;
  background: transparent;
  color: var(--wj-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  line-height: 1.1;
  transition: background .15s ease, color .15s ease;
}
.price-toggle button:hover { color: var(--wj-navy); }
.price-toggle button.active { background: var(--wj-navy); color: #fff; box-shadow: 0 1px 4px rgba(27, 58, 107, .25); }
.price-toggle.price-toggle-sm button { padding: 6px 12px; font-size: 12px; }
.price-toggle.price-toggle-block { display: flex; width: 100%; }
.price-toggle.price-toggle-block form { display: flex; flex: 1; }
.price-toggle.price-toggle-block button { flex: 1; text-align: center; }
.price-toggle.price-toggle-orange button.active { background: var(--wj-orange); }

/* ---------- Desktop navbar ---------- */
.store-navbar { display: none; position: sticky; top: 0; z-index: 1030; background: #fff; box-shadow: 0 1px 0 var(--wj-border), 0 2px 10px rgba(27, 58, 107, 0.06); }
@media (min-width: 992px) { .store-navbar { display: block; } }
.store-navbar-main { display: flex; align-items: center; gap: 24px; height: 80px; }
.store-navbar-main .brand img { height: 44px; width: auto; }
.store-navbar-main .search-form { flex: 1; max-width: 560px; }
.store-navbar-main .search-form .form-control { height: 44px; }
.store-navbar-actions { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.nav-icon-btn {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 64px;
  height: 56px;
  padding: 0 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--wj-navy);
  font-size: 11px;
  font-weight: 600;
}
.nav-icon-btn i { font-size: 22px; line-height: 1; }
.nav-icon-btn:hover, .nav-icon-btn:focus { background: var(--wj-navy-soft); color: var(--wj-navy); }
.nav-icon-btn .cart-badge { top: 4px; inset-inline-end: 10px; }
.nav-icon-btn.dropdown-toggle::after { display: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; color: var(--wj-muted); padding: 0 6px; white-space: nowrap; }
.lang-switch form { display: contents; }
.lang-switch button { border: 0; background: transparent; color: var(--wj-muted); font: inherit; font-weight: 600; padding: 6px 8px; border-radius: 8px; line-height: 1.2; cursor: pointer; }
.lang-switch button[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--wj-font); }
.lang-switch button:hover, .lang-switch button:focus-visible { color: var(--wj-navy); background: var(--wj-navy-soft); }
.lang-switch button.active { color: var(--wj-navy); font-weight: 800; cursor: default; }
.lang-switch .lang-sep { color: #B9C4D6; }
.lang-switch.lang-switch-menu { padding: 4px 12px 8px; gap: 6px; }
.lang-switch.lang-switch-menu .lang-sep { display: none; }
.lang-switch.lang-switch-menu button { border: 1px solid var(--wj-border); padding: 8px 18px; font-size: 14px; }
.lang-switch.lang-switch-menu button.active { background: var(--wj-navy); border-color: var(--wj-navy); color: #fff; }
/* Compact language toggle in the mobile top bar */
.topbar-actions { display: flex; align-items: center; gap: 2px; }
.lang-toggle { display: inline-flex; margin: 0; }
.lang-toggle .lang-toggle-btn { font-size: 14px; font-weight: 800; letter-spacing: 0; }
.lang-toggle .lang-toggle-btn[lang="ar"] { font-family: "IBM Plex Sans Arabic", var(--wj-font); font-size: 18px; }
.store-navbar-links { background: var(--wj-navy); }
.store-navbar-links .nav { display: flex; align-items: center; gap: 4px; height: 46px; }
.store-navbar-links .nav-link {
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.store-navbar-links .nav-link:hover, .store-navbar-links .nav-link.active { color: #fff; background: rgba(255, 255, 255, .12); }
.store-navbar-links .nav-link.all-categories { background: var(--wj-orange); color: #fff; }
.store-navbar-links .nav-link.all-categories:hover { background: var(--wj-orange-dark); }
.store-navbar-links .nav-link.deals i { color: var(--wj-orange); }

.dropdown-menu { border: 1px solid var(--wj-border); border-radius: 12px; box-shadow: var(--wj-shadow-lg); padding: 8px; min-width: 200px; }
.dropdown-item { border-radius: 8px; font-size: 14px; font-weight: 500; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.dropdown-item i { color: var(--wj-orange); font-size: 16px; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--wj-navy-soft); color: var(--wj-navy); }
.dropdown-header { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--wj-muted); }

/* ---------- Offcanvas menu (mobile) ---------- */
.store-offcanvas { width: 300px !important; max-width: 86vw; }
.store-offcanvas .offcanvas-header { background: var(--wj-navy); color: #fff; padding: 16px; }
.store-offcanvas .offcanvas-header img { height: 32px; }
.store-offcanvas .btn-close { filter: invert(1) grayscale(1) brightness(2); }
.store-offcanvas .offcanvas-body { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.menu-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--wj-muted); font-weight: 700; padding: 12px 12px 4px; }
.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  color: var(--wj-navy);
  font-weight: 600;
  font-size: 15px;
  background: transparent;
  border: 0;
  width: 100%;
  text-align: start;
}
.menu-link i { font-size: 20px; color: var(--wj-orange); width: 24px; text-align: center; }
.menu-link:hover, .menu-link:focus, .menu-link.active { background: var(--wj-navy-soft); color: var(--wj-navy); }
.menu-link.danger { color: var(--wj-danger); }
.menu-link.danger i { color: var(--wj-danger); }

/* ---------- Bottom tab bar (mobile) ---------- */
.store-bottomnav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1030;
  height: calc(var(--wj-bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #fff;
  border-top: 1px solid var(--wj-border);
  box-shadow: 0 -4px 16px rgba(27, 58, 107, 0.08);
  display: flex;
  align-items: stretch;
}
.store-bottomnav .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--wj-muted);
  font-size: 11px;
  font-weight: 600;
  position: relative;
  transition: color .15s ease;
}
.store-bottomnav .tab i { font-size: 23px; line-height: 1; }
.store-bottomnav .tab.active { color: var(--wj-orange); }
.store-bottomnav .tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--wj-orange);
}
.store-bottomnav .tab:hover { color: var(--wj-orange); }
@media (min-width: 992px) { .store-bottomnav { display: none; } }

/* ---------- Alerts ---------- */
.store-alerts { margin-top: 12px; }
.alert { border-radius: var(--wj-radius); border: 0; font-size: 14px; font-weight: 500; box-shadow: var(--wj-shadow); }
.alert-success { background: var(--wj-success-soft); color: #14663B; }
.alert-danger { background: var(--wj-danger-soft); color: #9F2A2A; }
.alert-warning { background: var(--wj-orange-soft); color: #9A4A0C; }
.alert-info { background: var(--wj-navy-soft); color: var(--wj-navy); }

/* ---------- Toast ---------- */
#store-toast {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(var(--wj-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 12px);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 576px) { #store-toast { inset-inline-start: auto; width: 340px; } }
@media (min-width: 992px) { #store-toast { bottom: 24px; inset-inline-end: 24px; } }
.store-toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--wj-navy);
  color: #fff;
  padding: 12px 14px;
  border-radius: 10px;
  border-inline-start: 4px solid var(--wj-success);
  box-shadow: var(--wj-shadow-lg);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  --wj-toast-shift: 24px; /* slide in from the inline-end edge on wider screens; negated in RTL */
}
.store-toast-item.show { opacity: 1; transform: none; }
@media (min-width: 576px) { .store-toast-item { transform: translateX(var(--wj-toast-shift)); } }
.store-toast-item.error { border-inline-start-color: #fff; background: var(--wj-danger); }
.store-toast-item i { font-size: 18px; }

/* ---------- Section header ---------- */
.store-section { margin: 20px 0; }
@media (min-width: 992px) { .store-section { margin: 32px 0; } }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.section-header h2, .section-header .h2 { font-size: 18px; font-weight: 800; color: var(--wj-navy); margin: 0; }
.section-header .view-all { color: var(--wj-orange); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.section-header .view-all:hover { color: var(--wj-orange-dark); }
@media (min-width: 992px) {
  .section-header { margin-bottom: 18px; }
  .section-header h2, .section-header .h2 { font-size: 24px; }
  .section-header .view-all { font-size: 14px; }
}
.page-title { font-size: 22px; font-weight: 800; color: var(--wj-navy); margin: 4px 0 14px; }
@media (min-width: 992px) { .page-title { font-size: 28px; margin: 8px 0 20px; } }
.page-subtitle { color: var(--wj-muted); font-size: 14px; margin-top: -8px; margin-bottom: 16px; }

/* ---------- Hero banner ---------- */
.hero-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 210px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--wj-navy) center / cover no-repeat;
  color: #fff;
  box-shadow: var(--wj-shadow-lg);
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(20, 44, 82, .92) 0%, rgba(20, 44, 82, .65) 55%, rgba(20, 44, 82, .15) 100%);
}
.hero-banner .hero-content { position: relative; padding: 24px 20px; max-width: 100%; }
.hero-banner .hero-kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--wj-orange); margin-bottom: 8px; }
.hero-banner h1, .hero-banner h2 { color: #fff; font-size: 22px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.hero-banner p { font-size: 13px; color: rgba(255, 255, 255, .85); margin-bottom: 14px; max-width: 420px; }
.hero-banner .btn-hero { display: inline-block; background: var(--wj-orange); color: #fff; font-weight: 700; padding: 10px 22px; border-radius: 10px; font-size: 14px; }
.hero-banner .btn-hero:hover { background: var(--wj-orange-dark); color: #fff; }
@media (min-width: 768px) {
  .hero-banner { min-height: 300px; }
  .hero-banner .hero-content { padding: 40px 40px; max-width: 60%; }
  .hero-banner h1, .hero-banner h2 { font-size: 34px; }
  .hero-banner p { font-size: 16px; }
}
@media (min-width: 992px) {
  .hero-banner { min-height: 380px; border-radius: 20px; }
  .hero-banner .hero-content { padding: 56px; }
  .hero-banner h1, .hero-banner h2 { font-size: 42px; }
}
.hero-carousel .carousel-indicators { margin-bottom: 8px; }
.hero-carousel .carousel-indicators [data-bs-target] { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .6); opacity: 1; }
.hero-carousel .carousel-indicators .active { background: var(--wj-orange); width: 22px; border-radius: 4px; }
.hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { width: 56px; opacity: 0; transition: opacity .2s; }
.hero-carousel:hover .carousel-control-prev, .hero-carousel:hover .carousel-control-next { opacity: .9; }
@media (max-width: 991.98px) { .hero-carousel .carousel-control-prev, .hero-carousel .carousel-control-next { display: none; } }

/* ---------- Category tiles ---------- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (min-width: 576px) { .category-grid { gap: 14px; } }
@media (min-width: 768px) { .category-grid { grid-template-columns: repeat(6, 1fr); } }
@media (min-width: 1200px) { .category-grid { grid-template-columns: repeat(9, 1fr); gap: 16px; } }
.category-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 10px 6px;
  background: transparent;
  color: var(--wj-navy);
  text-align: center;
  transition: color .18s ease;
}
/* Label stays navy on hover too (the global a:hover would otherwise turn it orange). */
.category-tile:hover, .category-tile:focus-visible { color: var(--wj-navy); }
/* Round avatar, no card behind it: navy ring at rest, orange only on the tile you are on.
   The label stays navy throughout — orange text on white is too low-contrast to read. */
.category-tile img, .category-tile .tile-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 4px solid var(--wj-navy);
  box-shadow: 0 0 0 4px var(--wj-navy-soft);
  background: var(--wj-card);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}
.category-tile img { object-fit: cover; }
.category-tile .tile-icon { color: var(--wj-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; }
.category-tile:hover img, .category-tile:hover .tile-icon,
.category-tile:focus-visible img, .category-tile:focus-visible .tile-icon {
  border-color: var(--wj-orange);
  box-shadow: 0 0 0 4px var(--wj-orange-soft), 0 4px 14px rgba(244, 123, 32, .22);
  transform: scale(1.04);
}
.category-tile:hover .tile-icon, .category-tile:focus-visible .tile-icon { background: var(--wj-orange-soft); color: var(--wj-orange); }
.category-tile span { font-size: 12px; font-weight: 600; line-height: 1.25; }
.category-tile .count { font-size: 11px; color: var(--wj-muted); font-weight: 500; }
@media (min-width: 992px) {
  .category-tile { padding: 12px 8px; gap: 12px; }
  .category-tile img, .category-tile .tile-icon { width: 76px; height: 76px; border-width: 5px; }
  .category-tile .tile-icon { font-size: 28px; }
  .category-tile span { font-size: 13px; }
}
/* Category list rows (All Categories page) */
.category-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--wj-card);
  border-radius: var(--wj-radius);
  box-shadow: var(--wj-shadow);
  color: var(--wj-navy);
}
.category-row img { width: 56px; height: 56px; border-radius: 10px; }
.category-row .name { font-weight: 700; font-size: 15px; }
.category-row .meta { font-size: 12px; color: var(--wj-muted); }
.category-row .bi-chevron-right { margin-inline-start: auto; color: var(--wj-muted); }
.category-row:hover { color: var(--wj-navy); box-shadow: var(--wj-shadow-lg); }

/* ---------- Chip filters ---------- */
.chip-row { display: flex; gap: 8px; overflow-x: auto; padding-block: 2px 8px; padding-inline: 0; scroll-padding-inline: 12px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--wj-border);
  color: var(--wj-navy);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.chip:hover { border-color: var(--wj-navy); color: var(--wj-navy); }
.chip.active { background: var(--wj-navy); border-color: var(--wj-navy); color: #fff; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter-bar .form-select { width: auto; min-width: 150px; min-height: 40px; padding-top: 6px; padding-bottom: 6px; font-size: 13px; }
.result-count { font-size: 13px; color: var(--wj-muted); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 992px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; } }
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--wj-card);
  border-radius: var(--wj-radius);
  box-shadow: var(--wj-shadow);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-2px); box-shadow: var(--wj-shadow-lg); }
/* Square image box: flex-shrink 0 + min-height 0 stop a tall photo from stretching the card
   (a flex item's automatic minimum size is its content, which overrides aspect-ratio). */
.product-card-img { display: block; position: relative; aspect-ratio: 1 / 1; background: #F8FAFD; flex: 0 0 auto; min-height: 0; overflow: hidden; }
.product-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.product-card-body { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px 12px; flex: 1; }
.product-name {
  color: var(--wj-navy);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-name:hover { color: var(--wj-orange); }
.product-size { font-size: 12px; color: var(--wj-muted); }
.sold-by { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--wj-muted); margin: 2px 0; }
.sold-by i { font-size: 12px; color: var(--wj-orange); }
.sold-by-lg { font-size: 13px; margin-bottom: 6px; }
.badge-instock, .badge-outofstock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}
.badge-instock { background: var(--wj-success-soft); color: var(--wj-success); }
.badge-outofstock { background: var(--wj-danger-soft); color: var(--wj-danger); }
.price-pair { display: flex; align-items: flex-end; gap: 12px; margin-top: 2px; flex-wrap: wrap; }
.price { display: flex; flex-direction: column; line-height: 1.15; }
.price .amount { font-weight: 700; }
.price .label { font-size: 10px; font-weight: 500; color: var(--wj-muted); white-space: nowrap; }
.price.active .amount { color: var(--wj-navy); font-size: 16px; font-weight: 800; }
.price.active .label { color: var(--wj-navy); font-weight: 600; }
.price.muted .amount { color: var(--wj-muted); font-size: 12.5px; font-weight: 600; }
.price.muted .label { color: #98A3B5; }
.price-pair.price-pair-lg .price.active .amount { font-size: 24px; }
.price-pair.price-pair-lg .price.muted .amount { font-size: 15px; }
.price-pair.price-pair-lg .price .label { font-size: 12px; }
.product-card-actions, .add-to-cart-form { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; }
@media (min-width: 992px) {
  .product-card-body { padding: 12px 14px 14px; gap: 6px; }
  .product-name { font-size: 15px; }
  .price.active .amount { font-size: 17px; }
}

/* ---------- Qty control & cart button ---------- */
.qty-control {
  display: inline-flex;
  align-items: stretch;
  height: 36px;
  border: 1px solid var(--wj-border);
  border-radius: var(--wj-radius-sm);
  overflow: hidden;
  background: #fff;
  flex: 1;
  min-width: 96px;
  max-width: 140px;
}
.qty-btn {
  width: 32px;
  flex: 0 0 32px;
  border: 0;
  background: var(--wj-bg);
  color: var(--wj-navy);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
}
.qty-btn:hover { background: var(--wj-navy-soft); }
.qty-btn:active { background: #DCE5F3; }
.qty-control input {
  width: 100%;
  min-width: 32px;
  border: 0;
  border-inline: 1px solid var(--wj-border);
  text-align: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--wj-navy);
  background: #fff;
  -moz-appearance: textfield;
  appearance: textfield;
  outline: none;
}
.qty-control input::-webkit-outer-spin-button, .qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-control.qty-control-lg { height: 44px; max-width: 170px; }
.qty-control.qty-control-lg .qty-btn { width: 42px; flex-basis: 42px; }
.btn-cart {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: var(--wj-radius-sm);
  background: var(--wj-orange);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .1s ease;
}
.btn-cart:hover, .btn-cart:focus { background: var(--wj-orange-dark); color: #fff; }
.btn-cart:active { transform: scale(.96); }
.btn-cart.is-loading { opacity: .6; pointer-events: none; }
.btn-cart:disabled { opacity: .5; }
.btn-cart.btn-cart-wide { width: auto; padding: 0 20px; gap: 8px; font-size: 15px; font-weight: 700; height: 44px; }

/* ---------- Product detail ---------- */
.gallery-main { background: #fff; border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs .thumb { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 10px; border: 2px solid var(--wj-border); background: #fff; overflow: hidden; cursor: pointer; }
.gallery-thumbs .thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs .thumb.active { border-color: var(--wj-orange); }
.detail-panel { background: #fff; border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); padding: 16px; }
@media (min-width: 992px) { .detail-panel { padding: 24px; } }
.detail-title { font-size: 20px; font-weight: 800; color: var(--wj-navy); margin-bottom: 2px; }
@media (min-width: 992px) { .detail-title { font-size: 26px; } }
.detail-sku { font-size: 12px; color: var(--wj-muted); }
.highlights { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.highlights li { display: flex; gap: 8px; font-size: 14px; }
.highlights li::before { content: '\2713'; color: var(--wj-success); font-weight: 800; }
.spec-table { width: 100%; font-size: 14px; }
.spec-table th { width: 38%; color: var(--wj-muted); font-weight: 600; padding: 10px 12px; background: #F8FAFD; }
.spec-table td { padding: 10px 12px; color: var(--wj-text); }
.spec-table tr { border-bottom: 1px solid var(--wj-border); }
.spec-table tr:last-child { border-bottom: 0; }

/* ---------- Cart ---------- */
.cart-line {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  padding: 12px;
  background: var(--wj-card);
  border-radius: var(--wj-radius);
  box-shadow: var(--wj-shadow);
  margin-bottom: 10px;
  align-items: start;
}
.cart-line img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: #F8FAFD; }
.cart-line-info { min-width: 0; }
.cart-line-name { display: block; font-weight: 700; color: var(--wj-navy); font-size: 14px; line-height: 1.3; }
.cart-line-size { font-size: 12px; color: var(--wj-muted); }
.cart-line-unit { font-size: 12px; color: var(--wj-muted); margin-top: 2px; }
.cart-line-unit strong { color: var(--wj-navy); }
.cart-line-controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px dashed var(--wj-border); }
.cart-line-total { font-weight: 800; color: var(--wj-navy); font-size: 15px; white-space: nowrap; }
.cart-line-remove { border: 0; background: transparent; color: var(--wj-danger); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px; border-radius: 6px; }
.cart-line-remove:hover { background: var(--wj-danger-soft); }
@media (min-width: 768px) {
  .cart-line { grid-template-columns: 88px 1fr 170px 110px 44px; align-items: center; padding: 14px 16px; }
  .cart-line img { width: 88px; height: 88px; }
  .cart-line-controls { display: contents; }
  .cart-line-controls .qty-control { justify-self: start; }
  .cart-line-total { text-align: end; font-size: 16px; }
  .cart-line-remove { justify-self: end; }
  .cart-line-remove span { display: none; }
}
.promo-form { display: flex; gap: 8px; }
.promo-form .form-control { flex: 1; }
.promo-form .btn { white-space: nowrap; }

/* ---------- Totals box ---------- */
.totals-box { background: var(--wj-card); border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); padding: 16px; }
.totals-box h3, .totals-box .h3 { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.totals-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 0; font-size: 14px; color: var(--wj-text); }
.totals-row span:last-child { font-weight: 600; color: var(--wj-navy); }
.totals-row.total { border-top: 1px solid var(--wj-border); margin-top: 6px; padding-top: 12px; font-size: 17px; font-weight: 800; color: var(--wj-navy); }
.totals-row.total span:last-child { font-size: 20px; font-weight: 800; }
.totals-note { font-size: 12px; color: var(--wj-muted); margin-top: 4px; }
.totals-box .btn-primary-orange { margin-top: 14px; }
/* Delivery charge: "Free" pill and free-delivery nudge */
.totals-row span.delivery-free { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--wj-success-soft); color: var(--wj-success); }
.free-delivery-nudge { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: var(--wj-radius-sm); background: var(--wj-orange-soft); color: #9A4A0C; font-size: 12.5px; line-height: 1.4; }
.free-delivery-nudge > i { color: var(--wj-orange); font-size: 16px; line-height: 1.1; flex-shrink: 0; }
.free-delivery-nudge strong { font-weight: 700; white-space: nowrap; }
@media (min-width: 992px) { .totals-box { padding: 22px; position: sticky; top: 150px; } }

/* ---------- Generic cards & lists ---------- */
.store-card { background: var(--wj-card); border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); padding: 16px; }
.store-card + .store-card { margin-top: 12px; }
.store-card-title { font-size: 15px; font-weight: 800; color: var(--wj-navy); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.store-card-title i { color: var(--wj-orange); }
@media (min-width: 992px) { .store-card { padding: 22px; } }

.order-card { display: block; background: var(--wj-card); border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); padding: 14px 16px; margin-bottom: 10px; color: var(--wj-text); }
.order-card:hover { box-shadow: var(--wj-shadow-lg); color: var(--wj-text); }
.order-card .order-number { font-weight: 800; color: var(--wj-navy); }
.order-card .order-meta { font-size: 12px; color: var(--wj-muted); }
.order-card .order-total { font-weight: 800; color: var(--wj-navy); }

.status-pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--wj-navy-soft); color: var(--wj-navy); }
.status-pill.status-placed, .status-pill.status-processing, .status-pill.status-packed { background: var(--wj-navy-soft); color: var(--wj-navy); }
.status-pill.status-pending, .status-pill.status-pendingfinanceapproval, .status-pill.status-outfordelivery { background: var(--wj-orange-soft); color: #B85A0E; }
.status-pill.status-approved, .status-pill.status-financeapproved, .status-pill.status-delivered { background: var(--wj-success-soft); color: var(--wj-success); }
.status-pill.status-rejected, .status-pill.status-financerejected, .status-pill.status-cancelled { background: var(--wj-danger-soft); color: var(--wj-danger); }

/* ---------- Status timeline ---------- */
.status-timeline { list-style: none; margin: 0; padding: 4px 0 0; }
.status-step { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 22px; }
.status-step::before { content: ''; position: absolute; inset-inline-start: 13px; top: 28px; bottom: 0; width: 2px; background: var(--wj-border); }
.status-step:last-child { padding-bottom: 0; }
.status-step:last-child::before { display: none; }
.status-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--wj-border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #fff;
  z-index: 1;
}
.status-step.done .status-dot { background: var(--wj-success); border-color: var(--wj-success); }
.status-step.done::before { background: var(--wj-success); }
.status-step.current .status-dot { background: var(--wj-orange); border-color: var(--wj-orange); box-shadow: 0 0 0 4px rgba(244, 123, 32, .2); }
.status-step.rejected .status-dot { background: var(--wj-danger); border-color: var(--wj-danger); }
.status-step .title { font-weight: 700; color: var(--wj-navy); font-size: 14px; line-height: 28px; }
.status-step.pending .title { color: var(--wj-muted); font-weight: 600; }
.status-step .meta { font-size: 12px; color: var(--wj-muted); margin-top: -4px; }
.status-step .note { font-size: 13px; color: var(--wj-text); margin-top: 4px; background: #F8FAFD; padding: 8px 10px; border-radius: 8px; }

/* ---------- Auth card ---------- */
.auth-wrap { display: flex; justify-content: center; padding: 8px 0 24px; }
.auth-card { width: 100%; max-width: 480px; background: var(--wj-card); border-radius: 16px; box-shadow: var(--wj-shadow-lg); padding: 24px 20px; }
.auth-card.auth-card-wide { max-width: 760px; }
.auth-card .auth-logo { display: block; margin: 0 auto 16px; height: 40px; }
.auth-card h1 { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-card .auth-sub { text-align: center; color: var(--wj-muted); font-size: 14px; margin-bottom: 20px; }
.auth-card .auth-footer { text-align: center; font-size: 14px; color: var(--wj-muted); margin-top: 18px; }
.auth-card .auth-footer a { color: var(--wj-orange); font-weight: 700; }
.auth-tabs { display: flex; background: #E9EEF6; border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs .nav-link { flex: 1; text-align: center; border-radius: 9px; color: var(--wj-muted); font-weight: 700; font-size: 14px; padding: 9px; }
.auth-tabs .nav-link.active { background: var(--wj-navy); color: #fff; }
@media (max-width: 575.98px) { .auth-tabs { padding: 3px; } .auth-tabs .nav-link { font-size: 12px; padding: 8px 4px; line-height: 1.2; } }
.form-section-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--wj-orange); margin: 18px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--wj-border); }
@media (min-width: 992px) { .auth-card { padding: 36px 40px; } }

/* ---------- Forms ---------- */
.form-label { font-size: 13px; font-weight: 600; color: var(--wj-navy); margin-bottom: 5px; }
.form-control, .form-select {
  border: 1px solid var(--wj-border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--wj-text);
  background-color: #fff;
  min-height: 44px;
}
.form-control::placeholder { color: #A3AEC0; }
.form-control:focus, .form-select:focus { border-color: var(--wj-navy); box-shadow: 0 0 0 3px rgba(27, 58, 107, .15); }
textarea.form-control { min-height: 96px; }
.form-control-sm { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.form-check-input { width: 18px; height: 18px; margin-top: .15em; border-color: #B9C4D6; }
.form-check-input:checked { background-color: var(--wj-navy); border-color: var(--wj-navy); }
.form-check-label { font-size: 14px; }
.form-text { font-size: 12px; color: var(--wj-muted); }
.input-group-text { border-radius: 10px; border-color: var(--wj-border); background: #F8FAFD; color: var(--wj-muted); font-size: 14px; }
.form-control[type="file"] { padding: 8px 12px; }
.form-control[type="file"]::file-selector-button { background: var(--wj-navy-soft); color: var(--wj-navy); border: 0; border-radius: 6px; padding: 5px 10px; font-weight: 600; margin-inline-end: 10px; }
.field-validation-error, .text-danger.field-validation-error { display: block; font-size: 12px; color: var(--wj-danger); margin-top: 4px; font-weight: 500; }
.validation-summary-errors { background: var(--wj-danger-soft); color: #9F2A2A; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 18px; }
.input-validation-error { border-color: var(--wj-danger) !important; }
.input-validation-error:focus { box-shadow: 0 0 0 3px rgba(214, 69, 69, .15) !important; }

/* Selectable option cards (addresses, payment methods) */
.option-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px; background: #fff; border: 2px solid var(--wj-border); border-radius: var(--wj-radius); cursor: pointer; transition: border-color .15s ease, background .15s ease; margin-bottom: 10px; }
.option-card:hover { border-color: #B9C4D6; }
.option-card.selected, .option-card:has(input:checked) { border-color: var(--wj-orange); background: var(--wj-orange-soft); }
.option-card input[type="radio"] { margin-top: 3px; accent-color: var(--wj-orange); }
.option-card .option-title { font-weight: 700; color: var(--wj-navy); font-size: 14px; }
.option-card .option-desc { font-size: 13px; color: var(--wj-muted); }
.option-card.disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Empty state ---------- */
.empty-state { text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--wj-radius); box-shadow: var(--wj-shadow); }
.empty-state i { font-size: 52px; color: #C9D2E3; display: block; margin-bottom: 12px; }
.empty-state h3 { font-size: 18px; font-weight: 800; }
.empty-state p { color: var(--wj-muted); font-size: 14px; max-width: 360px; margin: 0 auto 16px; }

/* ---------- Trust strip & footer ---------- */
.store-footer { background: var(--wj-navy); color: #fff; margin-top: 32px; padding: 32px 0 20px; }
.store-footer .footer-logo { height: 36px; margin-bottom: 12px; }
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 992px) { .trust-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item .trust-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: var(--wj-orange); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.trust-item strong { display: block; font-size: 14px; font-weight: 700; color: #fff; }
.trust-item small { display: block; font-size: 12px; color: rgba(255, 255, 255, .7); line-height: 1.4; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.footer-links a { color: rgba(255, 255, 255, .8); font-weight: 500; }
.footer-links a:hover { color: var(--wj-orange); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 24px; padding-top: 16px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: rgba(255, 255, 255, .65); }
.footer-bottom .tagline { color: var(--wj-orange); font-weight: 700; font-size: 14px; font-style: italic; }
@media (min-width: 992px) {
  .store-footer { margin-top: 56px; padding: 48px 0 24px; }
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--wj-border); margin: 14px 0; }
.breadcrumb { font-size: 13px; margin-bottom: 10px; }
.breadcrumb-item + .breadcrumb-item::before { color: #B9C4D6; }
.breadcrumb-item.active { color: var(--wj-muted); }
.table { --bs-table-bg: #fff; }
.pending-banner { background: var(--wj-orange-soft); border: 1px solid #FFD5B5; color: #9A4A0C; border-radius: var(--wj-radius); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; }
.pending-banner i { font-size: 22px; color: var(--wj-orange); }
.pending-banner .btn i { font-size: inherit; color: inherit; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pay-actions form { margin: 0; }
.sticky-bottom-cta { position: sticky; bottom: calc(var(--wj-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 8px); z-index: 10; }
@media (min-width: 992px) { .sticky-bottom-cta { position: static; } }

/* =========================================================
   Phase B additions - page-level components
   ========================================================= */

/* Read-only price-type indicator (cart) */
.price-toggle .pt-item { display: inline-block; color: var(--wj-muted); font-size: 13px; font-weight: 600; padding: 7px 16px; border-radius: 999px; line-height: 1.1; }
.price-toggle.price-toggle-sm .pt-item { padding: 6px 12px; font-size: 12px; }
.price-toggle .pt-item.active { background: var(--wj-navy); color: #fff; box-shadow: 0 1px 4px rgba(27, 58, 107, .25); }
.price-toggle-readonly { cursor: default; }

/* Listing header (category / search) */
.listing-header { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.back-btn { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--wj-shadow); color: var(--wj-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.back-btn:hover { background: var(--wj-navy); color: #fff; }
.listing-title { font-size: 20px; font-weight: 800; color: var(--wj-navy); margin: 0; line-height: 1.2; }
@media (min-width: 992px) { .listing-title { font-size: 26px; } }
.listing-filters { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.listing-filters .form-select { min-height: 42px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
@media (min-width: 768px) {
  .listing-filters { flex-direction: row; align-items: center; }
  .listing-filters .search-form { flex: 1; max-width: 520px; }
  .listing-filters .form-select { width: auto; min-width: 200px; }
}
.category-row .tile-icon { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 10px; background: var(--wj-navy-soft); color: var(--wj-navy); display: inline-flex; align-items: center; justify-content: center; font-size: 26px; }
.min-w-0 { min-width: 0; }
@media (min-width: 768px) { .w-md-auto { width: auto !important; } }

/* Product detail */
.detail-desc { font-size: 14px; color: var(--wj-text); margin: 8px 0 4px; }
.price-box { background: #F8FAFD; border: 1px solid var(--wj-border); border-radius: var(--wj-radius); padding: 12px 14px; margin: 12px 0 14px; }
.detail-add-form { padding-top: 0; }
@media (max-width: 575.98px) { .detail-add-form { flex-wrap: wrap; } .detail-add-form .btn-cart-wide { width: 100%; } }

/* Compact item lines (checkout summary, confirmation, order details) */
.summary-lines { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.summary-line { display: flex; align-items: center; gap: 10px; }
.summary-line img { width: 48px; height: 48px; object-fit: contain; border-radius: 8px; background: #F8FAFD; flex: 0 0 48px; }
.summary-line-info { flex: 1; min-width: 0; }
.summary-line-name { font-size: 13.5px; font-weight: 600; color: var(--wj-navy); display: block; line-height: 1.3; }
.summary-line-meta { font-size: 12px; color: var(--wj-muted); }
.summary-line-total { font-weight: 700; color: var(--wj-navy); font-size: 13.5px; white-space: nowrap; }

/* Orders list */
.order-card-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-card .order-total { font-size: 15px; white-space: nowrap; }

/* Order history */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 10px 12px; background: #F8FAFD; border-radius: 10px; }
.history-time { font-size: 12px; color: var(--wj-muted); }
.history-title { font-size: 14px; color: var(--wj-navy); }
.history-note { font-size: 13px; color: var(--wj-text); margin-top: 2px; }
.history-by { font-size: 12px; color: var(--wj-muted); }
@media (min-width: 768px) { .history-item { grid-template-columns: 150px 1fr; gap: 12px; } }

/* Confirmation / status pages */
.confirm-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--wj-success-soft); color: var(--wj-success); display: flex; align-items: center; justify-content: center; font-size: 38px; margin: 0 auto 14px; }
.confirm-icon.pending { background: var(--wj-orange-soft); color: var(--wj-orange); }
.confirm-icon.rejected { background: var(--wj-danger-soft); color: var(--wj-danger); }
.confirmation-card .totals-row { padding: 4px 0; }
.trust-grid-light .trust-item strong { color: var(--wj-navy); }
.trust-grid-light .trust-item small { color: var(--wj-muted); }

/* Checkout */
.new-address-fields { margin-top: 10px; padding-top: 12px; border-top: 1px dashed var(--wj-border); }
.option-card .status-pill { vertical-align: middle; }
.option-card input[type="radio"]:disabled { cursor: not-allowed; }

.option-card .option-selected-note { display: none; margin-top: 6px; font-size: 12px; font-weight: 600; color: #B85A0E; background: var(--wj-orange-soft); border-radius: var(--wj-radius-sm); padding: 6px 10px; }
.option-card input[type="radio"]:checked ~ div .option-selected-note { display: block; }

/* Online payment (PayFort / Amazon Payment Services) */
.status-pill.status-pendingpayment { background: var(--wj-orange-soft); color: #B85A0E; }
.pay-card { text-align: center; }
.pay-card h1 { font-size: 20px; line-height: 1.3; }
.pay-icon { position: relative; width: 84px; height: 84px; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--wj-navy-soft); color: var(--wj-navy); font-size: 32px; }
.pay-spinner { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--wj-orange); border-right-color: var(--wj-orange); animation: pay-spin .9s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay-spinner { animation-duration: 3s; } }
.pay-sandbox-badge { display: inline-flex; align-items: center; gap: 6px; background: #FFF8DB; border: 1px solid #F5D77A; color: #7A5A00; border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; }
.pay-summary { background: #F8FAFD; border: 1px solid var(--wj-border); border-radius: var(--wj-radius); padding: 8px 14px; margin-bottom: 16px; text-align: start; }
.pay-summary .totals-row { align-items: center; }
.pay-hint { font-size: 12px; color: var(--wj-muted); margin: 10px 0 0; }
.pay-secured { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--wj-border); font-size: 12px; font-weight: 600; color: var(--wj-muted); }
.pay-secured > i { color: var(--wj-success); }
.pay-methods { font-weight: 500; margin-top: 2px; }
.pay-card .pending-banner, .pay-card .alert { text-align: start; }
.pay-info { background: var(--wj-success-soft); color: #14663B; border-radius: var(--wj-radius-sm); padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.pay-info.awaiting { background: var(--wj-orange-soft); color: #9A4A0C; }
.pay-info strong { display: block; font-size: 14px; }
.pay-info .pay-info-line { display: flex; justify-content: space-between; gap: 10px; margin-top: 2px; }
.pay-info .pay-info-line span:last-child { font-weight: 700; direction: ltr; unicode-bidi: isolate; text-align: end; word-break: break-all; }
.order-card-wrap { position: relative; margin-bottom: 10px; }
.order-card-wrap .order-card { margin-bottom: 0; }
.order-card-wrap.has-action .order-card { border-end-start-radius: 0; border-end-end-radius: 0; }
.order-card-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--wj-orange-soft); border-radius: 0 0 var(--wj-radius) var(--wj-radius); padding: 8px 16px; font-size: 12.5px; font-weight: 600; color: #9A4A0C; box-shadow: var(--wj-shadow); }
.order-card-action .btn { white-space: nowrap; font-weight: 700; }

/* Account */
.account-header { display: flex; align-items: center; gap: 14px; }
.avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: var(--wj-navy); color: #fff; font-weight: 800; font-size: 20px; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.address-card + .address-card { margin-top: 10px; }
.address-card.is-editing { border: 2px solid var(--wj-orange); }

/* Saudi riyal symbol (official SAMA glyph, inherits text colour) */
.sar{display:inline-block;width:.78em;height:.78em;background-color:currentColor;-webkit-mask:url("/images/sar.svg") no-repeat center/contain;mask:url("/images/sar.svg") no-repeat center/contain;vertical-align:-0.06em;margin-inline-end:.12em}

/* Mobile verification (OTP) */
.otp-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--wj-orange-soft); color: var(--wj-orange); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 12px; }
.otp-mobile { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 16px; }
.otp-mobile-label { font-size: 12px; color: var(--wj-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.otp-mobile-number { font-size: 18px; font-weight: 800; color: var(--wj-navy); letter-spacing: .08em; direction: ltr; unicode-bidi: isolate; }
.otp-mobile-number i { color: var(--wj-orange); font-size: 16px; margin-inline-end: 4px; letter-spacing: 0; }
.otp-dev-code { background: #FFF8DB; border: 1px solid #F5D77A; color: #7A5A00; border-radius: var(--wj-radius-sm); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.otp-dev-code i { font-size: 16px; }
.otp-dev-code code { background: #fff; border: 1px dashed #E0BF55; border-radius: 6px; padding: 2px 10px; font-size: 18px; font-weight: 800; color: var(--wj-navy); letter-spacing: .3em; }
.otp-input-wrap { margin-bottom: 6px; }
.otp-input { display: block; width: 100%; max-width: 280px; margin: 0 auto; padding: 12px 14px; font-family: var(--wj-font); font-size: 32px; font-weight: 800; line-height: 1.2; text-align: center; letter-spacing: .45em; text-indent: .45em; color: var(--wj-navy); background: var(--wj-navy-soft); border: 2px solid var(--wj-border); border-radius: var(--wj-radius); outline: none; direction: ltr; -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.otp-input::placeholder { color: #B9C4D6; letter-spacing: .45em; }
.otp-input:focus { background: #fff; border-color: var(--wj-orange); box-shadow: 0 0 0 4px rgba(244, 123, 32, .18); }
.otp-input.input-validation-error { border-color: var(--wj-danger); background: var(--wj-danger-soft); }
.otp-input-wrap .field-validation-error { text-align: center; }
.otp-help { text-align: center; font-size: 12px; color: var(--wj-muted); margin-bottom: 16px; }
.otp-resend { text-align: center; font-size: 14px; color: var(--wj-muted); margin-top: 18px; }
.otp-resend form { display: inline; }
.otp-resend-btn { background: none; border: 0; padding: 0; margin-inline-start: 4px; font: inherit; font-weight: 700; color: var(--wj-orange); cursor: pointer; }
.otp-resend-btn:hover, .otp-resend-btn:focus { color: var(--wj-orange-dark); text-decoration: underline; outline: none; }
.otp-resend-btn:disabled { color: var(--wj-muted); cursor: not-allowed; text-decoration: none; }
.otp-resend-btn .js-otp-countdown { color: var(--wj-navy); font-variant-numeric: tabular-nums; }

/* Verify-mobile banner (under the top bar for unverified logged-in users) */
.verify-banner { background: var(--wj-orange); color: #fff; font-size: 13px; font-weight: 600; }
.verify-banner .container { display: flex; align-items: center; gap: 8px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.verify-banner i { font-size: 18px; flex: 0 0 auto; }
.verify-banner span { flex: 1 1 auto; min-width: 0; }
.verify-banner a { color: #fff; font-weight: 800; white-space: nowrap; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; margin-inline-start: auto; }
.verify-banner a:hover, .verify-banner a:focus { color: #FFE7D3; }
@media (max-width: 575.98px) { .verify-banner { font-size: 12.5px; } .verify-banner span { flex-basis: calc(100% - 26px); } .verify-banner a { margin-inline-start: 26px; } }

/* =========================================================
   Arabic / RTL
   Directional rules above use logical properties; this block
   covers what logical properties cannot express.
   ========================================================= */

/* Arabic typeface, a little more line-height, headings stay bold */
html[lang="ar"] body { font-family: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif; line-height: 1.7; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6,
html[lang="ar"] .page-title, html[lang="ar"] .listing-title, html[lang="ar"] .detail-title { font-weight: 700; line-height: 1.4; }
html[lang="ar"] .hero-banner h1, html[lang="ar"] .hero-banner h2 { line-height: 1.35; }
html[lang="ar"] .product-name, html[lang="ar"] .cart-line-name, html[lang="ar"] .summary-line-name { line-height: 1.5; }
html[lang="ar"] .price { line-height: 1.3; }

/* Arabic letters must stay joined: no letter-spacing, no uppercase, no italics */
html[lang="ar"] .hero-kicker, html[lang="ar"] .menu-section-title, html[lang="ar"] .dropdown-header,
html[lang="ar"] .form-section-title, html[lang="ar"] .otp-mobile-label, html[lang="ar"] .btn-primary-orange,
html[lang="ar"] .avatar { letter-spacing: 0; text-transform: none; }
html[lang="ar"] .footer-bottom .tagline { font-style: normal; }

/* Tiny labels are hard to read in Arabic script: bump them slightly */
html[lang="ar"] .price .label { font-size: 11px; }
html[lang="ar"] .store-bottomnav .tab { font-size: 12px; }
html[lang="ar"] .badge-instock, html[lang="ar"] .badge-outofstock { font-size: 11.5px; line-height: 1.6; }
html[lang="ar"] .status-pill { font-size: 12px; }
html[lang="ar"] .nav-icon-btn { font-size: 12px; }

/* Directional icons point the other way */
[dir="rtl"] .bi-chevron-right, [dir="rtl"] .bi-chevron-left,
[dir="rtl"] .bi-arrow-right, [dir="rtl"] .bi-arrow-left,
[dir="rtl"] .bi-arrow-right-short, [dir="rtl"] .bi-arrow-left-short,
[dir="rtl"] .bi-arrow-right-circle, [dir="rtl"] .bi-arrow-left-circle,
[dir="rtl"] .bi-chevron-double-right, [dir="rtl"] .bi-chevron-double-left,
[dir="rtl"] .bi-caret-right-fill, [dir="rtl"] .bi-caret-left-fill,
[dir="rtl"] .bi-box-arrow-right, [dir="rtl"] .bi-box-arrow-in-right,
[dir="rtl"] .bi-box-arrow-left, [dir="rtl"] .bi-box-arrow-in-left,
[dir="rtl"] .bi-reply, [dir="rtl"] .bi-send { display: inline-block; transform: scaleX(-1); }

/* Offcanvas menu opens from the right (bootstrap.rtl does this too; kept explicit for the store menu) */
[dir="rtl"] .store-offcanvas.offcanvas-start { right: 0; left: auto; border-right: 0; border-left: 1px solid rgba(0, 0, 0, .2); }
[dir="rtl"] .store-offcanvas.offcanvas-start:not(.show) { transform: translateX(100%); }

/* Hero: dark side of the gradient sits behind the (right-aligned) text */
[dir="rtl"] .hero-banner::before { background: linear-gradient(270deg, rgba(20, 44, 82, .92) 0%, rgba(20, 44, 82, .65) 55%, rgba(20, 44, 82, .15) 100%); }
/* Carousel: bootstrap.rtl already swaps prev/next sides and arrow images; keep our pill indicators in reading order */
[dir="rtl"] .hero-carousel .carousel-indicators { direction: rtl; }

/* Category chips: scroll starts at the right edge; leave room after the last chip */
[dir="rtl"] .chip-row { direction: rtl; }
.chip-row::after { content: ''; flex: 0 0 4px; }

/* Qty stepper stays a number line: minus | value | plus (value is LTR digits) */
[dir="rtl"] .qty-control { direction: ltr; }
[dir="rtl"] .qty-control input { direction: ltr; }

/* Price toggle pill: Arabic labels are short, give them even padding and no tracking */
[dir="rtl"] .price-toggle button, [dir="rtl"] .price-toggle .pt-item { letter-spacing: 0; padding-inline: 18px; }
[dir="rtl"] .price-toggle.price-toggle-sm button, [dir="rtl"] .price-toggle.price-toggle-sm .pt-item { padding-inline: 14px; font-size: 12.5px; }

/* Totals rows: label at the start (right), amount at the end (left), digits kept in one LTR run */
[dir="rtl"] .totals-row span:last-child, [dir="rtl"] .cart-line-total, [dir="rtl"] .summary-line-total,
[dir="rtl"] .order-card .order-total { text-align: end; unicode-bidi: isolate; }
[dir="rtl"] .price .amount { unicode-bidi: isolate; }

/* Bottom tab bar: tabs follow reading order (Home at the right); the active indicator is centred by flexbox, so it needs no mirroring */
[dir="rtl"] .store-bottomnav { direction: rtl; }
[dir="rtl"] .store-bottomnav .tab i { transform: none; }

/* Toast: slides in from the left edge (inline-end) in RTL */
[dir="rtl"] .store-toast-item { --wj-toast-shift: -24px; }

/* Mixed-direction content: LTR islands inside Arabic text */
bdi, .ltr { unicode-bidi: isolate; }
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="tel"], [dir="rtl"] input[type="number"],
[dir="rtl"] input[dir="ltr"], [dir="rtl"] textarea[dir="ltr"] { direction: ltr; text-align: end; }
[dir="rtl"] input[type="email"]::placeholder, [dir="rtl"] input[type="tel"]::placeholder { text-align: end; }
[dir="rtl"] .otp-input, [dir="rtl"] .qty-control input { text-align: center; }
[dir="rtl"] .detail-sku bdi, [dir="rtl"] .order-number bdi { direction: ltr; }

/* Search inputs: the magnifier button sits at the left end */
[dir="rtl"] .search-form .form-control { text-align: start; }

/* Breadcrumb and dropdown icon spacing */
[dir="rtl"] .dropdown-item { text-align: start; }

/* Account / orders components (agent B pages) */
.spec-table th, .spec-table td { text-align: start; }
/* pay-info values are LTR islands (card masks, references): keep them flush with the outer (left) edge in RTL */
[dir="rtl"] .pay-info .pay-info-line span:last-child { text-align: left; }
/* timeline: grid columns mirror on their own; the rail uses inset-inline-start so it stays under the dot */
