:root {
  --bg: #020a0d;
  --bg-2: #03141a;
  --surface: #00141c;
  --card: #001a23;
  --text: #f4fbff;
  --muted: #8aa3af;
  --dim: #6b8490;
  --accent: #027cb0;
  --accent-2: #0396d1;
  --accent-soft: rgba(2, 124, 176, 0.16);
  --accent-b: rgba(2, 124, 176, 0.45);
  --primary: #027cb0;
  --font: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --display: "Tajawal", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --media-matte: #001018;
}

html, body { font-family: var(--font); }
html[dir="rtl"] body,
html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .brand-name { font-family: var(--font); }

.sar-symbol {
  display: inline-block;
  width: 0.82em;
  height: 1em;
  vertical-align: -0.14em;
  margin-inline-start: 0.16em;
}

.atmosphere {
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(2, 124, 176, 0.18), transparent 58%),
    var(--bg);
}

.store-header {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 98px;
  background: rgba(2, 10, 13, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.store-header-inner {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto;
  min-height: 98px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.header-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-cluster-nav { justify-content: flex-start; }
.header-cluster-user { justify-content: flex-end; }
.header-logo {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.header-logo img { height: 44px; width: auto; max-width: 180px; object-fit: contain; display: block; }
.header-icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.header-lang {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 10px;
}
.header-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.cart-count-badge,
.mobile-tabbar em {
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
  padding: 0 5px;
}
.cart-link .cart-count-badge {
  position: absolute;
  top: 4px;
  inset-inline-end: 2px;
}
.header-search-panel,
.header-menu-panel {
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.header-search-panel[hidden],
.header-menu-panel[hidden] { display: none; }
.header-search-panel input { flex: 1; margin: 0; }
.header-menu-panel a {
  color: var(--muted);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
}

.home-marquee {
  overflow: hidden;
  margin: 0 0 18px;
  padding: 10px 0;
  border-radius: 12px;
  background: linear-gradient(90deg, #01608a, #027cb0 45%, #0396d1);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
}
.home-marquee span {
  display: inline-block;
  min-width: 200%;
  padding-inline: 2em;
  animation: marquee-shift 22s linear infinite;
}
.home-marquee.is-static span {
  animation: none;
  min-width: 0;
  transform: none;
}
@keyframes marquee-shift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.home-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  min-height: 520px;
  margin-bottom: 28px;
}
.home-hero.hero-show {
  min-height: 520px;
  margin: 0 0 28px;
}
.home-hero .hero-slide {
  min-height: 520px;
  align-items: center;
}
.home-hero .hero-art {
  object-position: 78% 42%;
}
html[dir="rtl"] .home-hero .hero-art {
  transform: scaleX(-1);
  object-position: 78% 42%;
}
.home-hero .hero-slide::after {
  background: linear-gradient(90deg, rgba(0, 10, 16, 0.9) 0%, rgba(0, 10, 16, 0.42) 44%, rgba(0, 10, 16, 0.1) 100%);
}
html[dir="rtl"] .home-hero .hero-slide::after {
  background: linear-gradient(270deg, rgba(0, 10, 16, 0.9) 0%, rgba(0, 10, 16, 0.42) 44%, rgba(0, 10, 16, 0.1) 100%);
}
.home-hero .hero-copy {
  max-width: 36rem;
  padding: 48px 44px 56px;
}
.home-hero .hero-copy h1 {
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  line-height: 1.12;
  margin: 0 0 12px;
}
.home-hero .hero-copy p {
  color: #d7eaf2;
  font-size: 1.06rem;
  max-width: 38ch;
}
.home-hero .kicker {
  color: #8ec8e3;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.hero-actions .btn {
  width: max-content;
  min-width: 10.5rem;
}
.home-hero-art, .home-hero-ph { min-height: 220px; }
.home-hero-art img, .home-hero-ph {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.home-hero-ph {
  background:
    radial-gradient(circle at 80% 20%, rgba(2, 124, 176, 0.45), transparent 42%),
    linear-gradient(160deg, #001018, #003044);
}
.home-hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 22px;
  background: linear-gradient(180deg, transparent 20%, rgba(0, 8, 12, 0.82));
}
.home-hero-copy h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin: 0 0 6px; }
.home-hero-line2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
.home-hero-badges { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.home-hero-badges li {
  background: rgba(2, 124, 176, 0.28);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  font-weight: 700;
}
@media (max-width: 720px) {
  .home-hero, .home-hero.hero-show, .home-hero .hero-slide { min-height: 420px; }
  .home-hero .hero-slide { align-items: end; }
  .home-hero .hero-copy { padding: 28px 20px 36px; }
  .home-hero .hero-slide::after,
  html[dir="rtl"] .home-hero .hero-slide::after {
    background: linear-gradient(180deg, rgba(0, 8, 14, 0.12) 0%, rgba(0, 8, 14, 0.5) 48%, rgba(0, 8, 14, 0.92) 100%);
  }
}

.home-tile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 28px;
}
.home-tile {
  position: relative;
  display: block;
  min-height: 140px;
  border-radius: 18px;
  overflow: hidden;
  background: #001a23;
  color: #fff;
  padding: 14px;
}
.home-tile-art {
  position: absolute;
  inset: 0;
  opacity: 0.45;
}
.home-tile-art img { width: 100%; height: 100%; object-fit: cover; }
.home-tile strong, .home-tile p, .home-tile-pill { position: relative; z-index: 1; }
.home-tile p { margin: 4px 0 10px; color: #d5e7ef; font-size: 0.85rem; }
.home-tile-pill {
  display: inline-block;
  background: var(--accent);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.home-carousel-wrap {
  overflow: hidden;
  direction: ltr;
}
.home-carousel {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 14px;
  width: max-content;
  max-width: none;
  overflow: visible;
  padding-bottom: 10px;
  margin-bottom: 8px;
  will-change: transform;
  animation: carousel-shift 28s linear infinite;
}
.home-carousel-wrap:hover .home-carousel,
.home-carousel-wrap:focus-within .home-carousel {
  animation-play-state: paused;
}
.home-carousel .card {
  flex: 0 0 210px;
  width: 210px;
  max-width: 210px;
}
.home-carousel .card:hover {
  transform: none;
}
@keyframes carousel-shift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .home-carousel,
  .home-marquee span,
  .banner.is-scrolling span {
    animation: none !important;
  }
}
.card .cover {
  aspect-ratio: var(--media-banner);
  border-radius: 16px 16px 0 0;
  background: #001a23;
}
.card .cover img {
  object-fit: contain;
  object-position: center center;
}
.card, .p-card {
  background: #001a23;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.05);
}
.p-card-centered .body { text-align: center; }
.p-card-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}
.p-card-pill {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent-2);
  font-weight: 700;
  margin-bottom: 6px;
}
.p-card-prices { display: flex; justify-content: center; gap: 8px; align-items: baseline; }
.price-was { color: var(--muted); text-decoration: line-through; font-size: 0.9rem; }
.atc-btn {
  width: 100%;
  background: #011318;
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.atc-btn:hover { background: #02212b; color: #fff; }

.home-promo { text-align: center; padding: 28px; background-size: cover; background-position: center; }
.home-shortcuts {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin: 0 0 22px;
  padding-bottom: 4px;
}
.home-shortcut {
  flex: 0 0 auto;
  background: #001a23;
  border: 1px solid rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.85rem;
}
.home-review-grid, .home-why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.home-reviews article, .home-why article {
  background: #001a23;
  border-radius: 16px;
  padding: 16px;
}
.home-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 28px 0;
  text-align: center;
}
.home-stats strong { display: block; font-size: 2rem; color: var(--accent-2); }
.home-faq details {
  background: #001a23;
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 8px;
}
.home-faq summary { cursor: pointer; font-weight: 700; }

.visitor-chip {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 88px;
  z-index: 35;
  background: #001a23;
  border: 1px solid var(--accent-b);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}
.coupon-popup {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 96px;
  z-index: 45;
  width: min(280px, calc(100% - 32px));
  background: #001a23;
  border: 1px solid var(--accent-b);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow);
}
.coupon-popup code {
  display: block;
  margin: 10px 0;
  padding: 8px;
  background: #011318;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.08em;
}
.coupon-close {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}
.purchase-toast {
  position: fixed;
  inset-inline-start: 16px;
  bottom: 132px;
  z-index: 36;
  background: #001a23;
  border-radius: 14px;
  padding: 10px 14px;
  max-width: 260px;
  font-size: 0.86rem;
}

.mobile-tabbar {
  display: none;
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  background: #001018;
  border-top: 1px solid rgba(255,255,255,0.08);
  grid-template-columns: repeat(5, 1fr);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.mobile-tabbar a, .mobile-tabbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 0.68rem;
  font-weight: 700;
  position: relative;
}
.mobile-tabbar .is-on, .mobile-tabbar a:hover { color: #fff; }
.mobile-tabbar em {
  position: absolute;
  top: 0;
  inset-inline-end: 18%;
}
.back-to-top {
  position: fixed;
  inset-inline-end: 16px;
  bottom: 168px;
  z-index: 34;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}
.account-card { max-width: 480px; margin: 20px auto; }
.account-photo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.account-avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
  flex: 0 0 88px;
}
.account-avatar-ph { border: 1px solid var(--border); }
.photo-modal[hidden],
.photo-preview-wrap img[hidden] {
  display: none !important;
}
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
}
.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 16, 0.72);
}
.photo-modal-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  margin: 0;
}
.photo-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.photo-modal-head h2 { margin: 0; }
.photo-modal-x { min-width: 44px; padding: 8px 12px; }
.avatar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 12px 0 18px;
}
.avatar-pick {
  aspect-ratio: 1;
  border-radius: 18px;
  border: 2px solid transparent;
  background: rgba(255,255,255,0.04);
  padding: 4px;
  cursor: pointer;
}
.avatar-pick img { width: 100%; height: 100%; border-radius: 14px; display: block; }
.avatar-pick.is-on, .avatar-pick:focus-visible {
  border-color: var(--accent);
  outline: none;
}
.photo-drop {
  border: 1px dashed var(--border);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
}
.photo-drop.is-over { border-color: var(--accent); background: var(--accent-soft); }
.photo-drop .btn { margin-top: 8px; }
.photo-preview-wrap { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.photo-modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
body.photo-modal-open { overflow: hidden; }
.order-history { list-style: none; padding: 0; }
.order-history li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .mobile-tabbar { display: grid; }
  body { padding-bottom: 78px; }
  .cart-bubble { display: none; }
  .home-carousel .card { flex: 0 0 168px; width: 168px; max-width: 168px; }
  .store-header-inner { min-height: 72px; gap: 4px; }
  .store-header { min-height: 72px; }
  .header-icon-btn { width: 36px; height: 36px; }
  .header-logo .brand-mark { display: none; }
  .wa-float, .btn-whatsapp {
    inset-block-end: 92px;
    bottom: 92px;
    z-index: 41;
  }
  .visitor-chip { bottom: 148px; }
  .purchase-toast { bottom: 188px; }
  .coupon-popup { bottom: 92px; }
  .cart-count-badge { top: 0; }
}
