:root {
  --primary: #7861a5;
  --primary-deep: #54427e;
  --primary-soft: #efeaf7;
  --pink: #ba7faf;
  --yellow: #f2c200;
  --ink: #2b2342;
  --muted: #7a7290;
  --bg: #f7f5fb;
  --line: #e7e2f2;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(43,35,66,.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'IBM Plex Sans Arabic', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ════════ الانترو ════════ */
.intro {
  position: fixed; inset: 0;
  background: #fff;
  z-index: 100;
  display: grid; place-items: center;
  overflow: hidden;
}
.intro-stage {
  position: relative;
  width: min(560px, 88vw);
  text-align: center;
}
/* النظارة = صورة اللوجو الأصلية بدون أي تعديل — الأنيميشن خارجي فقط */
.glassbox {
  position: relative;
  width: min(310px, 58vw);
  margin: 0 auto;
}
.gb-frame {
  width: 100%;
  display: block;
  /* ظهور بأسلوب "الرسم" عبر ماسك متحرك — لا يغيّر الرسمة نفسها */
  -webkit-mask-image: linear-gradient(105deg, #000 46%, transparent 54%);
  mask-image: linear-gradient(105deg, #000 46%, transparent 54%);
  -webkit-mask-size: 250% 100%;
  mask-size: 250% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: maskReveal 1.5s cubic-bezier(.5,0,.25,1) .15s forwards;
}
@keyframes maskReveal { to { -webkit-mask-position: 0% 0; mask-position: 0% 0; } }
.gb-pupil {
  position: absolute;
  transform-origin: center;
  transform: scale(0);
  animation: popIn .45s cubic-bezier(.3,1.6,.5,1) 1.7s forwards,
             lookAround 2.4s ease-in-out 2.25s,
             blink 5s ease-in-out 4.8s infinite;
}
.gb-pupil.pr { left: 24.1%; top: 70.7%; width: 8.8%; }
.gb-pupil.pl { left: 70.7%; top: 69.6%; width: 8.8%; animation-delay: 1.82s, 2.25s, 4.9s; }
@keyframes popIn { to { transform: scale(1); } }
@keyframes lookAround {
  0%, 100% { translate: 0 0; }
  25% { translate: -7px 0; }
  55% { translate: 5px 2px; }
  80% { translate: 0 0; }
}
@keyframes blink {
  0%, 93%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(.12); }
}
.intro-logo {
  width: min(400px, 74vw);
  margin: 4px auto 0;
  display: block;
  opacity: 0;
  transform: translateY(16px) scale(.96);
  animation: logoIn .8s cubic-bezier(.2,1,.3,1) 2.9s forwards;
}
@keyframes logoIn { to { opacity: 1; transform: translateY(0) scale(1); } }
.intro-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
  font-size: 15px;
  color: var(--muted);
  letter-spacing: 6px;
  opacity: 0;
  animation: tagIn .7s ease 3.5s forwards;
}
.intro-tag i { width: 36px; height: 1.5px; background: var(--pink); }
@keyframes tagIn { from { opacity: 0; letter-spacing: 12px; } to { opacity: 1; letter-spacing: 6px; } }
.intro-iris {
  position: absolute;
  left: 50%; top: 50%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: linear-gradient(160deg, #7861a5, #54427e);
  transform: translate(-50%,-50%) scale(0);
  z-index: 5;
}
.intro.closing .intro-iris { animation: irisGrow .85s cubic-bezier(.7,0,.3,1) forwards; }
@keyframes irisGrow { to { transform: translate(-50%,-50%) scale(400); } }
.intro-skip {
  position: absolute;
  bottom: 28px; left: 28px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 13px;
  transition: all .2s;
  z-index: 6;
}
.intro-skip:hover { border-color: var(--primary); color: var(--primary); }
@media (prefers-reduced-motion: reduce) {
  .gb-frame, .gb-pupil, .intro-logo, .intro-tag { animation-duration: .01s !important; animation-delay: 0s !important; }
}

/* ════════ تسجيل الدخول ════════ */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.brand-panel {
  position: relative;
  background:
    radial-gradient(620px 420px at 18% 12%, rgba(186,127,175,.35), transparent 60%),
    radial-gradient(520px 480px at 90% 95%, rgba(43,35,66,.45), transparent 60%),
    linear-gradient(160deg, #7861a5 0%, #5a4685 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 56px;
  overflow: hidden;
}
.brand-panel::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.10) 1.2px, transparent 1.3px);
  background-size: 26px 26px;
  mask-image: radial-gradient(640px 520px at 30% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(640px 520px at 30% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.panel-logo {
  width: 190px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.hero-area { position: relative; z-index: 2; text-align: center; }
.hero-title {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.4;
}
.hero-sub {
  font-weight: 300;
  font-size: 15px;
  opacity: .85;
  max-width: 430px;
  margin: 10px auto 26px;
}
.hero-stats { display: flex; justify-content: center; gap: 14px; }
.hero-stats div {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  padding: 10px 22px;
  backdrop-filter: blur(4px);
}
.hero-stats b {
  display: block;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 22px;
  line-height: 1.2;
}
.hero-stats span { font-size: 12px; opacity: .8; }
.brand-foot {
  position: relative; z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 12.5px;
  opacity: .8;
  flex-wrap: wrap;
}
.form-panel { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.card { width: 100%; max-width: 440px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  font-weight: 500;
  margin-bottom: 16px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pink); }
.card h1 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-weight: 700; font-size: 30px; }
.lead { color: var(--muted); font-size: 14.5px; margin: 8px 0 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 500; margin-bottom: 7px; }
.control { position: relative; }
.control input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  padding: 13px 16px 13px 46px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.control input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(120,97,165,.14); }
.control svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; stroke: #a79ec4; }
.login-err { color: #c0392b; font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.btn-login {
  width: 100%;
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-weight: 700;
  font-size: 17px;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 12px 26px rgba(120,97,165,.32);
  transition: transform .15s, box-shadow .15s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(120,97,165,.4); }
.btn-login:focus-visible { outline: 3px solid var(--pink); outline-offset: 3px; }
.demo-hint {
  margin-top: 16px;
  background: #fffbea;
  border: 1px dashed #e8d48a;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #8a7430;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.divider { display: flex; align-items: center; gap: 14px; color: #b6afc9; font-size: 12.5px; margin: 24px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.apply-box {
  border: 1.5px dashed #d8cfeb;
  background: #fbfaff;
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
}
.apply-box strong { color: var(--ink); }
.apply-box a {
  display: inline-block;
  margin-top: 10px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 7px 18px;
}
.legal { text-align: center; font-size: 11.5px; color: #aaa3bf; margin-top: 24px; }

/* ════════ المنصة ════════ */
.topbar {
  position: sticky; top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 20px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 10px 26px;
}
.topbar-logo { height: 46px; cursor: pointer; }
.search-wrap { position: relative; flex: 1; max-width: 520px; }
.search-wrap svg { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; stroke: #a79ec4; }
.search-wrap input {
  width: 100%;
  border: 1.5px solid var(--line);
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 42px 10px 16px;
  font-family: inherit;
  font-size: 14px;
}
.search-wrap input:focus { outline: none; border-color: var(--primary); background: #fff; }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: all .2s;
}
.icon-btn svg { width: 20px; height: 20px; stroke: var(--ink); }
.icon-btn:hover { border-color: var(--primary); }
.icon-btn.active { background: var(--primary-soft); border-color: var(--primary); }
.text-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .2s;
}
.text-btn:hover { border-color: var(--primary); color: var(--primary); }
.badge {
  position: absolute;
  top: -4px; left: -4px;
  background: var(--pink);
  color: #fff;
  font-size: 11px;
  min-width: 19px; height: 19px;
  border-radius: 999px;
  display: grid; place-items: center;
  padding: 0 5px;
  font-style: normal;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s;
}
.user-chip:hover { border-color: #c0392b; color: #c0392b; }
.user-chip svg { width: 17px; height: 17px; stroke: currentColor; }

/* ════════ البانر الترحيبي ════════ */
.home-hero {
  position: relative;
  background:
    radial-gradient(560px 380px at 15% 10%, rgba(186,127,175,.4), transparent 60%),
    radial-gradient(480px 420px at 92% 95%, rgba(43,35,66,.5), transparent 60%),
    linear-gradient(160deg, #7861a5 0%, #5a4685 100%);
  color: #fff;
  border-radius: 24px;
  padding: 40px 46px;
  margin-bottom: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.home-hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.12) 1.2px, transparent 1.3px);
  background-size: 24px 24px;
  mask-image: radial-gradient(500px 400px at 75% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(500px 400px at 75% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hh-text { position: relative; z-index: 2; max-width: 560px; }
.hh-text .eyebrow { background: rgba(255,255,255,.16); color: #fff; }
.hh-text .eyebrow::before { background: var(--yellow); }
.hh-text h2 {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.4;
}
.hh-text p { font-weight: 300; font-size: 14.5px; opacity: .88; margin: 6px 0 18px; }
.hh-cta {
  display: inline-block;
  background: #fff;
  color: var(--primary-deep);
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  border: none;
  border-radius: 999px;
  padding: 11px 28px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  transition: transform .15s;
}
.hh-cta:hover { transform: translateY(-2px); }
.hh-glasses { position: relative; z-index: 2; width: 200px; flex-shrink: 0; opacity: .95; }
.hh-glasses img { filter: drop-shadow(0 14px 28px rgba(0,0,0,.22)); animation: heroFloat 6s ease-in-out infinite; }
@keyframes heroFloat { 0%,100% { transform: translateY(0) rotate(-2deg);} 50% { transform: translateY(-12px) rotate(2deg);} }
@media (prefers-reduced-motion: reduce) { .hh-glasses img { animation: none; } }

/* ════════ بوابات البراندات ════════ */
.brands-strip { margin-bottom: 26px; }
.bs-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.bs-head h3 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 19px; }
.bs-head button { border: none; background: none; color: var(--primary); font-size: 13px; font-weight: 600; }
.brands-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.bcard {
  position: relative;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 18px 12px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  overflow: hidden;
}
.bcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--pink));
  opacity: 0;
  transition: opacity .2s;
}
.bcard:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: var(--shadow); }
.bcard:hover::before { opacity: 1; }
.bcard.on { border-color: var(--primary); background: var(--primary-soft); }
.bcard.on::before { opacity: 1; }
.bcard .blogo {
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}
.bcard .blogo img { max-height: 44px; max-width: 86%; object-fit: contain; }
.bcard .bname {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--primary-deep);
  letter-spacing: .4px;
  line-height: 1.3;
  display: block;
}
.bcard .bcount { font-size: 11.5px; color: var(--muted); }

.layout { display: grid; grid-template-columns: 270px 1fr; gap: 24px; padding: 24px 26px; max-width: 1500px; margin: 0 auto; }

/* الفلاتر */
.filters {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  align-self: start;
  position: sticky;
  top: 86px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.filters-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.filters-head button { border: none; background: none; color: var(--primary); font-size: 12.5px; font-weight: 500; }
.fgroup { border-top: 1px solid var(--line); padding: 12px 0; }
.fgroup > b { display: flex; justify-content: space-between; font-size: 13.5px; cursor: pointer; }
.fgroup .opts { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.fopt {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 13px;
  font-size: 12.5px;
  color: var(--muted);
  transition: all .15s;
}
.fopt:hover { border-color: var(--primary); color: var(--primary); }
.fopt.on { background: var(--primary); border-color: var(--primary); color: #fff; }

/* الشبكة */
.content-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.content-head h2 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 24px; }
.head-actions { display: flex; gap: 8px; }
.chip-btn {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-family: inherit;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 16px;
}
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.pcard:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.pimg {
  position: relative;
  aspect-ratio: 1.15;
  background: #fff;
  cursor: pointer;
}
.pimg img { width: 100%; height: 100%; object-fit: contain; padding: 12px; }
.pimg .fav {
  position: absolute;
  top: 10px; left: 10px;
  width: 34px; height: 34px;
  border: none;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.pimg .fav svg { width: 17px; height: 17px; stroke: var(--pink); fill: none; stroke-width: 2; }
.pimg .fav.on svg { fill: var(--pink); }
.pchips { position: absolute; bottom: 8px; right: 10px; display: flex; gap: 5px; }
.pchip {
  background: var(--primary-soft);
  color: var(--primary-deep);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 9px;
}
.pchip.new { background: #fdeef7; color: #b03e8d; }
.pbody { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.pbrand { font-size: 11.5px; font-weight: 700; color: var(--primary); letter-spacing: .5px; }
.psku { font-size: 13.5px; font-weight: 600; line-height: 1.4; word-break: break-all; }
.pmeta { font-size: 11.5px; color: var(--muted); }
.pfoot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; }
.pprice b { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 18px; color: var(--primary-deep); }
.pprice span { font-size: 11px; color: var(--muted); display: block; line-height: 1; }
.add-btn {
  border: none;
  background: var(--primary);
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 12px;
  font-size: 20px;
  display: grid; place-items: center;
  transition: all .15s;
}
.add-btn:hover { background: var(--primary-deep); transform: scale(1.07); }
.add-btn.incart { background: #2d8a5f; }
.load-more-wrap { text-align: center; padding: 28px 0 50px; }
.btn-outline {
  border: 1.5px solid var(--primary);
  background: #fff;
  color: var(--primary);
  border-radius: 999px;
  padding: 11px 34px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  display: inline-block;
  cursor: pointer;
}
.btn-outline:hover { background: var(--primary-soft); }

/* ════════ المواد التسويقية ════════ */
.materials-box { max-width: 680px; padding: 26px; }
.materials-box h3 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 22px; margin-bottom: 4px; }
.materials-box .x { float: left; border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; }
.mat-list { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.mat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1.5px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  transition: border-color .2s;
}
.mat-item:hover { border-color: var(--primary); }
.mat-icon {
  width: 46px; height: 46px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: grid; place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.mat-info { flex: 1; min-width: 0; }
.mat-info b { font-size: 14px; display: block; }
.mat-info span { font-size: 12px; color: var(--muted); }
.mat-dl {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.mat-dl:hover { background: var(--primary-deep); }
.mat-empty { text-align: center; color: var(--muted); padding: 40px 0; font-size: 13.5px; }

/* ════════ ودجت الشات ════════ */
.chatw { position: fixed; bottom: 24px; left: 24px; z-index: 45; }
.chatw-fab {
  width: 58px; height: 58px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: 0 12px 28px rgba(120,97,165,.45);
  transition: transform .2s;
}
.chatw-fab:hover { transform: scale(1.08); }
.chatw-fab svg { width: 26px; height: 26px; }
.chatw-panel {
  position: absolute;
  bottom: 70px; left: 0;
  width: min(330px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(43,35,66,.22);
  overflow: hidden;
  transform-origin: bottom left;
  animation: chatIn .25s cubic-bezier(.2,1,.3,1);
}
@keyframes chatIn { from { opacity: 0; transform: scale(.9) translateY(10px); } }
.chatw-head {
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chatw-head b { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 16px; }
.chatw-head small { display: block; font-size: 11px; opacity: .85; font-weight: 300; }
.chatw-dot { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; margin-inline-start: auto; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.chatw-body { padding: 14px; max-height: 280px; overflow: auto; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.cw-msg { max-width: 85%; border-radius: 14px; padding: 8px 13px; font-size: 13px; line-height: 1.6; }
.cw-msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-end-start-radius: 4px; }
.cw-msg.me { background: var(--primary); color: #fff; align-self: flex-end; border-end-end-radius: 4px; }
.chatw-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff; }
.chatw-foot input {
  flex: 1;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 13px;
}
.chatw-foot input:focus { outline: none; border-color: var(--primary); }
.chatw-foot button {
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.chatw-wa {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #25d366;
  color: #fff;
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px;
}

/* مودال */
.modal {
  position: fixed; inset: 0;
  background: rgba(43,35,66,.5);
  backdrop-filter: blur(4px);
  z-index: 60;
  display: grid; place-items: center;
  padding: 20px;
  overflow: auto;
}
.modal-box {
  background: #fff;
  border-radius: 22px;
  max-width: 860px;
  width: 100%;
  max-height: 92vh;
  overflow: auto;
  animation: modalIn .25s cubic-bezier(.2,1,.3,1);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(.97); } }
.product-box { display: grid; grid-template-columns: 1fr 1fr; }
.pm-img { background: #fff; display: grid; place-items: center; padding: 20px; border-inline-end: 1px solid var(--line); }
.pm-img img { max-height: 380px; object-fit: contain; }
.pm-info { padding: 28px; }
.pm-info .x { float: left; border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; font-size: 15px; }
.pm-info h3 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 22px; margin: 4px 0 2px; word-break: break-all; }
.pm-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin: 18px 0; }
.pm-specs div { background: var(--bg); border-radius: 12px; padding: 8px 12px; font-size: 12.5px; }
.pm-specs span { color: var(--muted); display: block; font-size: 11px; }
.pm-price { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 16px; flex-wrap: wrap; }
.pm-price b { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 30px; color: var(--primary-deep); }
.pm-price s { color: #b6afc9; font-size: 14px; }
.qty-row { display: flex; gap: 10px; }
.qty {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.qty button { border: none; background: var(--bg); width: 40px; height: 46px; font-size: 18px; }
.qty input { width: 56px; border: none; text-align: center; font-family: inherit; font-size: 16px; font-weight: 600; }
.qty input:focus { outline: none; }
.qty-row .btn-login { flex: 1; padding: 12px; font-size: 15px; }

/* السلة */
.drawer { position: fixed; inset: 0; background: rgba(43,35,66,.45); z-index: 60; }
.drawer-box {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: min(430px, 94vw);
  background: #fff;
  display: flex;
  flex-direction: column;
  animation: slideIn .28s cubic-bezier(.2,1,.3,1);
}
@keyframes slideIn { from { transform: translateX(-100%); } }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 19px; }
.drawer-head .x { border: none; background: var(--bg); width: 34px; height: 34px; border-radius: 50%; }
.drawer-body { flex: 1; overflow: auto; padding: 16px 22px; }
.cart-empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 14px; }
.citem { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.citem img { width: 74px; height: 64px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.citem .ci-info { flex: 1; min-width: 0; }
.citem .ci-info b { font-size: 13px; display: block; word-break: break-all; line-height: 1.4; }
.citem .ci-info span { font-size: 11.5px; color: var(--muted); }
.ci-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button { width: 26px; height: 26px; border: 1.5px solid var(--line); background: #fff; border-radius: 8px; font-size: 14px; }
.ci-qty b { min-width: 22px; text-align: center; font-size: 14px; }
.ci-price { font-weight: 700; color: var(--primary-deep); font-size: 14px; }
.ci-del { border: none; background: none; color: #c0392b; font-size: 12px; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 22px 22px; }
.cart-total { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 12px; }
.cart-total b { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 20px; color: var(--primary-deep); }

/* الكوتيشن */
.quote-box { max-width: 820px; padding: 0; }
.quote-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; position: sticky; top: 0; background: #fff; z-index: 2; }
.quote-actions > div { display: flex; gap: 8px; flex-wrap: wrap; }
.quote-actions .btn-outline { padding: 9px 18px; font-size: 13px; }
.btn-wa {
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.qdoc { padding: 34px 38px; }
.qd-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 3px solid var(--primary); padding-bottom: 20px; flex-wrap: wrap; }
.qd-head img { height: 74px; }
.qd-title { text-align: left; }
.qd-title h2 { font-family: 'Baloo Bhaijaan 2', sans-serif; color: var(--primary-deep); font-size: 24px; line-height: 1.3; }
.qd-title small { color: var(--muted); font-size: 12px; }
.qd-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.qd-meta > div { background: var(--bg); border-radius: 14px; padding: 14px 18px; font-size: 13px; }
.qd-meta b { display: block; color: var(--primary-deep); font-size: 12px; margin-bottom: 4px; }
table.qd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 14px 0; }
.qd-table th { background: var(--primary); color: #fff; padding: 9px 10px; text-align: right; font-weight: 600; }
.qd-table th:first-child { border-radius: 0 10px 0 0; }
.qd-table th:last-child { border-radius: 10px 0 0 0; }
.qd-table td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: middle; }
.qd-table img { width: 58px; height: 44px; object-fit: contain; }
.qd-sum { display: flex; justify-content: flex-start; }
.qd-sum table { font-size: 13.5px; min-width: 280px; }
.qd-sum td { padding: 6px 10px; }
.qd-sum tr:last-child td { border-top: 2px solid var(--primary); font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 17px; color: var(--primary-deep); }
.qd-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.qd-terms { font-size: 11.5px; color: var(--muted); max-width: 460px; }
.qd-terms b { color: var(--ink); display: block; margin-bottom: 4px; }
.qd-qr { text-align: center; font-size: 10.5px; color: var(--muted); }
.qd-qr > div { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: inline-block; }
.qd-contact { text-align: center; background: linear-gradient(135deg, var(--primary), var(--primary-deep)); color: #fff; border-radius: 14px; padding: 12px; font-size: 12.5px; margin-top: 22px; }

/* ════════ موبايل ════════ */
.mobile-only { display: none; }
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .brand-panel { padding: 30px 22px; gap: 22px; }
  .panel-logo { width: 150px; }
  .hero-stats div { padding: 8px 14px; }
  .brand-foot { display: none; }
  .layout { grid-template-columns: 1fr; padding: 16px; }
  .filters {
    position: fixed;
    inset: auto 0 0 0;
    top: 18vh;
    z-index: 70;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -16px 50px rgba(0,0,0,.2);
    transform: translateY(110%);
    transition: transform .3s cubic-bezier(.2,1,.3,1);
    max-height: 82vh;
  }
  .filters.open { transform: translateY(0); }
  .mobile-only { display: inline-block; }
  .topbar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .topbar-logo { height: 38px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .user-chip span { display: none; }
  .text-btn span { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
  .product-box { grid-template-columns: 1fr; }
  .pm-img { border: none; border-bottom: 1px solid var(--line); }
  .pm-img img { max-height: 250px; }
  .qd-meta { grid-template-columns: 1fr; }
  .qdoc { padding: 22px 16px; }
  .home-hero { padding: 26px 22px; flex-direction: column; text-align: center; }
  .hh-glasses { width: 150px; }
  .brands-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 9px; }
  .bcard { padding: 12px 8px 10px; }
  .bcard .bname { font-size: 12.5px; }
}

/* ════════ طباعة ════════ */
@media print {
  @page { margin: 10mm; }
  body { background: #fff !important; }
  .topbar, .layout, .wa-float, .chatw, .drawer, #productModal, #intro, #login, #matModal { display: none !important; }
  #quoteModal { position: static !important; inset: auto; display: block !important; background: #fff; padding: 0; backdrop-filter: none; overflow: visible; }
  .modal-box { max-height: none !important; overflow: visible !important; box-shadow: none; border-radius: 0; max-width: none; animation: none; }
  .noprint { display: none !important; }
  .qdoc { padding: 0; }
  .qd-table img { width: 48px; height: 38px; }
}

/* ════════ شاشة الاختيار ════════ */
.gate {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(186,127,175,.12), transparent 60%),
    radial-gradient(500px 400px at 10% 90%, rgba(120,97,165,.12), transparent 60%),
    var(--bg);
}
.gate-logo { width: 220px; margin-bottom: 18px; }
.gate-title { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: clamp(24px, 3vw, 32px); color: var(--ink); }
.gate-sub { color: var(--muted); font-size: 14.5px; margin: 4px 0 30px; }
.gate-cards { display: grid; grid-template-columns: repeat(2, minmax(260px, 330px)); gap: 18px; }
.gate-card {
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 28px 26px;
  cursor: pointer;
  text-align: center;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.gate-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--pink));
  opacity: 0;
  transition: opacity .2s;
}
.gate-card:hover { border-color: var(--primary); transform: translateY(-4px); box-shadow: var(--shadow); }
.gate-card:hover::before { opacity: 1; }
.gc-icon { font-size: 38px; margin-bottom: 8px; }
.gate-card b { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 20px; color: var(--ink); display: block; }
.gate-card p { font-size: 13px; color: var(--muted); margin: 8px 0 14px; line-height: 1.7; }
.gc-cta { color: var(--primary); font-weight: 700; font-size: 14px; font-family: 'Baloo Bhaijaan 2', sans-serif; }
.gate-wa { margin-top: 26px; color: var(--muted); font-size: 13px; text-decoration: none; border-bottom: 1px dashed #c6bedd; padding-bottom: 2px; }
.gate-wa:hover { color: #25d366; border-color: #25d366; }
@media (max-width: 720px) { .gate-cards { grid-template-columns: 1fr; width: 100%; max-width: 400px; } }

/* ════════ نموذج التسجيل ════════ */
.register { min-height: 100vh; padding: 40px 16px; display: flex; justify-content: center; }
.reg-card {
  width: 100%;
  max-width: 760px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 36px 40px;
  height: fit-content;
}
.reg-card h1 { font-family: 'Baloo Bhaijaan 2', sans-serif; font-size: 26px; text-align: center; }
.reg-back {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
}
.reg-back:hover { border-color: var(--primary); color: var(--primary); }
.reg-sec {
  font-family: 'Baloo Bhaijaan 2', sans-serif;
  font-size: 17px;
  color: var(--primary-deep);
  margin: 26px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-soft);
}
.reg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.reg-grid .full { grid-column: 1 / -1; }
.reg-grid label { display: block; font-size: 12.5px; font-weight: 500; margin-bottom: 5px; }
.reg-grid input, .reg-grid select {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 13px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}
.reg-grid input:focus, .reg-grid select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(120,97,165,.12); }
.reg-files { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.rfile {
  display: flex;
  flex-direction: column;
  gap: 7px;
  border: 1.5px dashed #d8cfeb;
  background: #fbfaff;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s;
}
.rfile:hover { border-color: var(--primary); }
.rfile.hasfile { border-style: solid; border-color: #2d8a5f; background: #f2faf6; }
.rfile input { font-size: 11.5px; }
.reg-agree {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  background: var(--bg);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 22px 0 16px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  cursor: pointer;
}
.reg-agree input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); flex-shrink: 0; }
.reg-done {
  margin-top: 18px;
  background: #f2faf6;
  border: 1.5px solid #bfe5d2;
  border-radius: 16px;
  padding: 18px 20px;
  text-align: center;
}
.reg-done b { font-size: 16px; color: #2d8a5f; }
.reg-done p { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.reg-done-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .reg-card { padding: 24px 18px 30px; }
  .reg-grid, .reg-files { grid-template-columns: 1fr; }
}

/* ════════ عداد الكمية على الكارت ════════ */
.qrow { display: flex; align-items: center; gap: 6px; margin-top: 9px; }
.qstep {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  flex-shrink: 0;
}
.qstep button {
  border: none;
  background: var(--bg);
  width: 28px; height: 30px;
  font-size: 15px;
  color: var(--ink);
}
.qstep button:hover { background: var(--primary-soft); color: var(--primary-deep); }
.qstep b { min-width: 30px; text-align: center; font-size: 13.5px; }
.qstep b.inc { color: var(--primary-deep); }
.qchips { display: flex; gap: 4px; }
.qchip {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 9px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  transition: all .15s;
}
.qchip:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-deep); }

/* ════════ كاروسيل صور الكارت ════════ */
.pdots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.pdots i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #d8d2e8;
  transition: all .2s;
}
.pdots i.on { background: var(--primary); width: 14px; border-radius: 4px; }
.pm-thumbs { display: flex; gap: 8px; justify-content: center; padding: 0 0 16px; }
.pm-thumbs img {
  width: 56px; height: 44px;
  object-fit: contain;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.pm-thumbs img.on { border-color: var(--primary); }

/* ════════ نقاط ألوان الفلاتر ════════ */
.cdot {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 50%;
  margin-inline-end: 5px;
  vertical-align: -1px;
  border: 1px solid rgba(0,0,0,.15);
}
.cdot.transparent {
  background: linear-gradient(135deg, #fff 45%, #d8e6f0 55%);
  border-style: dashed;
}
.fopt.on .cdot { border-color: rgba(255,255,255,.7); }

/* ════════ طلباتي ════════ */
.order-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.order-actions button, .order-actions a {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  text-decoration: none;
  cursor: pointer;
}
.order-actions button:hover, .order-actions a:hover { border-color: var(--primary); color: var(--primary-deep); }
.order-actions .primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.gate-logo { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 14px 22px; box-shadow: var(--shadow); }
