/* HG App — ثيم فاخر: أسود دافي + دهبي، وصور الأقسام هي اللي بتدي اللون */
@font-face {
  font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url(/fonts/readex-pro-arabic-wght-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Readex Pro'; font-style: normal; font-display: swap; font-weight: 160 700;
  src: url(/fonts/readex-pro-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* خط العناوين */
@font-face {
  font-family: 'El Messiri'; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(/fonts/el-messiri-arabic-wght-normal.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'El Messiri'; font-style: normal; font-display: swap; font-weight: 400 700;
  src: url(/fonts/el-messiri-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --hg-red: #EC1F27; --af-violet: #6F00FF;
  color-scheme: dark;
  --red: #ED1C24;            /* أحمر لوجو HG */
  --aura: #3B0270;           /* بنفسجي لوجو Aura */
  --gold: #C8A45A;
  --gold-2: #E9D29A;
  --gold-3: #A9853F;
  --gold-grad: linear-gradient(135deg, #F0DCA6 0%, #C8A45A 52%, #A9853F 100%);
  --on-gold: #1B1508;
  --ivory: #F6F1E7;
  --ink: #F4EEE3;
  --ink-soft: #D3CABA;
  --muted: #9A927F;
  --bg: #0E0C09;
  --surface: rgba(255, 255, 255, .05);
  --line: rgba(233, 210, 154, .20);
  --hair: rgba(255, 255, 255, .08);
  --danger: #FF9DA1;
  --danger-wash: rgba(237, 28, 36, .16);
  --ok: #8FE0B5;
  --ok-wash: rgba(60, 180, 120, .16);
  --display: 'El Messiri', 'Readex Pro', 'Segoe UI', Tahoma, sans-serif;
  --radius: 16px;
  --nav-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* ألوان الخلفية في الصفحات العامة */
  --c2: #C8A45A; --tone: #E9D29A; --tint: rgba(200, 164, 90, .14);
  --blob1: rgba(237, 28, 36, .15); --blob2: rgba(104, 44, 190, .17); --blob3: rgba(200, 164, 90, .13);
}
/* لمسة لون كل قسم */
.t-natural  { --c2: #8FCB54; --tone: #BFE695; --tint: rgba(143, 203, 84, .15);  --blob1: rgba(120, 190, 70, .17);  --blob2: rgba(200, 164, 90, .12); --blob3: rgba(40, 120, 70, .16); }
.t-cleaners { --c2: #4FC8DA; --tone: #A5E6F0; --tint: rgba(79, 200, 218, .15);  --blob1: rgba(60, 180, 215, .17);  --blob2: rgba(200, 164, 90, .11); --blob3: rgba(30, 100, 150, .16); }
.t-tahara   { --c2: #E8DCC8; --tone: #F3EADB; --tint: rgba(232, 220, 200, .13); --blob1: rgba(240, 225, 200, .12); --blob2: rgba(200, 164, 90, .12); --blob3: rgba(210, 150, 170, .10); }
.t-oriental { --c2: #E0A14A; --tone: #F2C98A; --tint: rgba(224, 161, 74, .16);  --blob1: rgba(160, 30, 50, .18);   --blob2: rgba(224, 161, 74, .15); --blob3: rgba(110, 60, 20, .18); }
.t-men      { --c2: #6FA3E0; --tone: #B4D2F5; --tint: rgba(111, 163, 224, .15); --blob1: rgba(50, 100, 190, .18);  --blob2: rgba(200, 164, 90, .11); --blob3: rgba(20, 50, 110, .2); }
.t-women    { --c2: #F08AB3; --tone: #F9C0D6; --tint: rgba(240, 138, 179, .15); --blob1: rgba(220, 70, 130, .17);  --blob2: rgba(200, 164, 90, .11); --blob3: rgba(150, 30, 90, .16); }
.t-premium  { --c2: #E5BD03; --tone: #F4D76A; --tint: rgba(229, 189, 3, .14);   --blob1: rgba(229, 189, 3, .13);   --blob2: rgba(200, 164, 90, .14); --blob3: rgba(140, 100, 20, .16); }
.t-other    { --c2: #C8A45A; --tone: #E9D29A; --tint: rgba(200, 164, 90, .14); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Readex Pro', 'Segoe UI', Tahoma, system-ui, sans-serif; font-size: 15px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 600; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--gold-2); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
.lnum { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
[hidden] { display: none !important; }

#app { max-width: 560px; margin: 0 auto; min-height: 100dvh; position: relative; }

/* ---------- الخلفية: توهج ألوان هادي + ذرات دهبية ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: radial-gradient(120% 80% at 50% 0%, #1A150E 0%, var(--bg) 62%); }
.blob { position: absolute; width: 82vmax; height: 82vmax; border-radius: 50%; will-change: transform; }
.blob.b1 { background: radial-gradient(closest-side, var(--blob1), transparent); top: -34vmax; left: -30vmax; animation: blobA 22s ease-in-out infinite alternate; }
.blob.b2 { background: radial-gradient(closest-side, var(--blob2), transparent); bottom: -34vmax; right: -30vmax; animation: blobB 27s ease-in-out infinite alternate; }
.blob.b3 { width: 60vmax; height: 60vmax; background: radial-gradient(closest-side, var(--blob3), transparent); top: 30%; left: 26%; animation: blobC 31s ease-in-out infinite alternate; }
@keyframes blobA { to { transform: translate(20vmax, 16vmax) scale(1.18); } }
@keyframes blobB { to { transform: translate(-18vmax, -16vmax) scale(1.22); } }
@keyframes blobC { from { transform: translate(-22vmax, 10vmax) scale(.9); } to { transform: translate(16vmax, -14vmax) scale(1.12); } }

.floater { position: absolute; bottom: -40px; color: var(--gold-2); will-change: transform, opacity; animation: floatUp 26s linear infinite, twinkle 3.6s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(233, 210, 154, .7)); }
.floater svg { display: block; width: 100%; height: 100%; }
@keyframes floatUp { from { transform: translate3d(0, 0, 0) rotate(0deg); } to { transform: translate3d(var(--dx, 24px), -118vh, 0) rotate(var(--rot, 120deg)); } }
@keyframes twinkle { 0%, 100% { opacity: .08; } 50% { opacity: .5; } }
.f1  { left: 6%;  width: 9px;  height: 9px;  animation-duration: 24s, 3.2s; animation-delay: -3s, 0s; }
.f2  { left: 17%; width: 5px;  height: 5px;  animation-duration: 19s, 2.6s; animation-delay: -11s, -.8s; --dx: -30px; }
.f3  { left: 28%; width: 13px; height: 13px; animation-duration: 31s, 4.2s; animation-delay: -17s, -1.4s; --dx: 40px; }
.f4  { left: 39%; width: 6px;  height: 6px;  animation-duration: 21s, 3s;   animation-delay: -6s, -2s; --dx: -18px; }
.f5  { left: 51%; width: 4px;  height: 4px;  animation-duration: 17s, 2.4s; animation-delay: -13s, -.4s; }
.f6  { left: 62%; width: 11px; height: 11px; animation-duration: 28s, 3.8s; animation-delay: -21s, -1.9s; --dx: -36px; --rot: -140deg; }
.f7  { left: 73%; width: 5px;  height: 5px;  animation-duration: 20s, 2.8s; animation-delay: -9s, -1.1s; --dx: 28px; }
.f8  { left: 83%; width: 8px;  height: 8px;  animation-duration: 25s, 3.4s; animation-delay: -15s, -2.6s; --dx: -22px; }
.f9  { left: 92%; width: 4px;  height: 4px;  animation-duration: 18s, 2.2s; animation-delay: -4s, -.2s; --dx: -44px; }
.f10 { left: 45%; width: 15px; height: 15px; animation-duration: 34s, 4.6s; animation-delay: -25s, -3s; --dx: 18px; --rot: 200deg; }

/* ---------- الدخول والتسجيل ---------- */
.auth { min-height: 100dvh; display: flex; flex-direction: column; }
.auth-brand { position: relative; padding: 34px 24px 26px; text-align: center; }
/* صورة صفحة الدخول (اختيارية): public/cats/login-cover — الصورة فوق كاملة والكلام تحتها */
.auth-brand.has-img { padding: 0 24px 20px; }
.auth-cover { position: relative; overflow: hidden; margin: 0 -24px; height: min(42dvh, calc(min(100vw, 560px) * .75)); }
.auth-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; animation: drift 24s ease-in-out infinite alternate; }
.auth-cover .scrim { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(14, 12, 9, 0) 58%, rgba(14, 12, 9, .7) 84%, var(--bg) 100%); }
.auth-brand.has-img h1 { position: relative; margin-top: -30px; }
.auth-brand.has-img p { position: relative; }
.logos { display: flex; align-items: center; justify-content: center; gap: 22px; direction: ltr; }
.logos .hg { height: 112px; width: auto; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .55)); }
.logos .aura { height: 100px; width: auto; filter: drop-shadow(0 4px 18px rgba(0, 0, 0, .55)); }
.logos i { width: 1px; height: 64px; background: linear-gradient(to bottom, transparent, rgba(233, 210, 154, .6), transparent); }
.auth-brand h1 { margin-top: 24px; font-size: 28px; line-height: 1.3; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p { margin: 6px auto 0; color: var(--ink-soft); font-size: 15px; max-width: 34ch; }
.auth-panel {
  flex: 1; background: rgba(255, 255, 255, .045); border-top: 1px solid var(--line); border-radius: 28px 28px 0 0;
  padding: 22px 22px calc(28px + var(--safe-b)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.auth-panel h2 { font-size: 22px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; background: rgba(255, 255, 255, .06); border: 1px solid var(--hair); border-radius: 13px; padding: 4px; margin-bottom: 20px; }
.seg button { border: 0; background: transparent; padding: 10px 8px; border-radius: 10px; font-weight: 500; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--gold-grad); color: var(--on-gold); font-weight: 600; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink-soft); }
.field small { display: block; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); color: var(--ink);
  border-radius: 12px; padding: 13px 14px; font-size: 16px;
}
.field input::placeholder, .field textarea::placeholder { color: #7D7666; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-2); background: rgba(255, 255, 255, .09); }
.field input.ltr { direction: ltr; text-align: right; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 0; border-radius: 13px; padding: 14px 16px; font-size: 16px; font-weight: 700;
  background: var(--gold-grad); color: var(--on-gold); box-shadow: 0 12px 30px -16px rgba(233, 210, 154, .8);
  transition: transform .15s ease, filter .15s ease;
}
.btn:active { transform: scale(.985); filter: brightness(.95); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--line); font-weight: 500; box-shadow: none; }
.btn.small { width: auto; padding: 9px 14px; font-size: 14px; }

.msg { border-radius: 12px; padding: 11px 14px; font-size: 14px; margin-bottom: 14px; }
.msg.err { background: var(--danger-wash); color: var(--danger); }
.msg.info { background: rgba(200, 164, 90, .14); color: var(--gold-2); }
.msg.ok { background: var(--ok-wash); color: var(--ok); }

.steps { list-style: none; padding: 0; margin: 18px 0 22px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 0 40px 16px 0; color: var(--ink-soft); text-align: right; }
.steps li::before {
  content: counter(s); position: absolute; right: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; background: transparent; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--gold-2);
}
.steps li.ok::before { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); content: '✓'; }
.steps li b { display: block; color: var(--ink); font-weight: 600; }

/* ---------- الهيكل ---------- */
.shell { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 14px); }
.shell.has-minicart { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 92px); }
.top {
  position: sticky; top: 0; z-index: 5; padding: 12px 18px;
  background: rgba(14, 12, 9, .78); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top h1 { font-size: 22px; }

/* اللوجوهين بالأبيض فوق: أيقونة hg وختم Aura Fragrances */
.brands { display: flex; align-items: center; gap: 12px; direction: ltr; flex: none; }
.brands img { display: block; width: auto; }
.brands .b-hg { height: 26px; }
.brands .b-aura { height: 38px; }
.brands i { width: 1px; height: 26px; background: linear-gradient(to bottom, transparent, rgba(233, 210, 154, .6), transparent); }
.brands.big { gap: 14px; }
.brands.big .b-hg { height: 34px; }
.brands.big .b-aura { height: 50px; }
.brands.big i { height: 34px; }

.home-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 18px 8px; }
.hello b { display: block; font-family: var(--display); font-size: 25px; font-weight: 600; line-height: 1.3; }
.hello span { color: var(--muted); font-size: 14px; }

.sticky-search { position: sticky; top: 0; z-index: 5; padding: 8px 12px 10px; background: rgba(14, 12, 9, .7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.search { position: relative; }
.search input {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 44px 13px 14px; font-size: 16px;
  background: rgba(255, 255, 255, .07); color: var(--ink);
}
.search input::placeholder { color: #8A826F; }
.search input:focus { outline: none; border-color: var(--gold-2); background: rgba(255, 255, 255, .1); }
.search span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--gold); display: flex; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px 8px; font-size: 13.5px; color: var(--muted); }
.filters { display: flex; align-items: center; gap: 8px; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, .05); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; color: var(--ink-soft); }
.chip[aria-pressed="true"] { background: var(--gold-grad); border-color: transparent; color: var(--on-gold); font-weight: 600; }
.brand-seg { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); border-radius: 999px; padding: 3px; }
.brand-seg button { border: 0; background: transparent; border-radius: 999px; padding: 0 12px; font-size: 13.5px; color: var(--ink-soft); display: flex; align-items: center; justify-content: center; height: 36px; min-width: 46px; }
.brand-seg button[data-brand="hg"], .brand-seg button[data-brand="aura"] { opacity: .55; }
/* نفس الأيقونتين اللي فوق: hg وختم Aura Fragrances */
.brand-seg img { height: 20px; width: auto; display: block; }
.brand-seg button[data-brand="aura"] { padding: 0 8px; }
.brand-seg button[data-brand="aura"] img { height: 30px; }
/* لما العميل يختار الشركة، خلفية الأيقونة بتاخد لون الشركة واللوجو يفضل أبيض */
.brand-seg button[aria-pressed="true"] { opacity: 1; }
.brand-seg button[data-brand="hg"][aria-pressed="true"] { background: var(--hg-red); }
.brand-seg button[data-brand="aura"][aria-pressed="true"] { background: var(--af-violet); }
.brand-seg button[data-brand="all"][aria-pressed="true"] { background: var(--gold-grad); color: var(--on-gold); font-weight: 600; box-shadow: none; }
.notice { margin: 0 18px 10px; font-size: 13px; color: var(--muted); }
.tiles + .notice { margin-top: 16px; }

/* ---------- كود الخصم الخاص بالعميل ---------- */
.voucher {
  position: relative; margin: 10px 12px 0; border-radius: 18px; display: grid; grid-template-columns: auto 1fr; align-items: stretch;
  background: linear-gradient(160deg, #1E1810, #110E09); border: 1px dashed rgba(233, 210, 154, .55); overflow: hidden;
}
.voucher.on { border-style: solid; border-color: var(--gold-2); box-shadow: 0 0 0 1px var(--gold-2), 0 18px 30px -24px #000; }
.card .voucher, .sum-in .voucher { margin: 0 0 14px; }
.v-pct { display: grid; align-content: center; justify-items: center; gap: 2px; padding: 14px 16px; background: var(--gold-grad); color: var(--on-gold); min-width: 92px; }
.v-pct b { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; }
.v-pct small { font-size: 12px; font-weight: 500; }
.v-body { display: grid; gap: 4px; padding: 12px 14px; justify-items: start; }
.v-title { font-weight: 600; color: var(--ivory); font-size: 14.5px; }
.v-code { font-size: 17px; font-weight: 600; letter-spacing: .08em; color: var(--gold-2); }
.v-exp { font-size: 12.5px; color: var(--muted); }
.v-body .btn { margin-top: 6px; width: auto; }
.v-mix { color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* ---------- بانر الخصم ---------- */
.promo {
  position: relative; overflow: hidden; margin: 10px 12px 0; border-radius: 20px; padding: 18px 20px;
  display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px;
  border: 1px solid rgba(233, 210, 154, .5);
  background: radial-gradient(130% 150% at 100% 0%, rgba(200, 164, 90, .2), rgba(200, 164, 90, 0) 58%), linear-gradient(165deg, #1C170E, #0F0C08);
  box-shadow: 0 22px 34px -26px #000;
}
/* إطار داخلي رفيع زي كروت الدعوات */
.promo::before { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(233, 210, 154, .2); border-radius: 15px; pointer-events: none; }
.promo::after { content: ''; position: absolute; top: 0; bottom: 0; width: 46%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 244, 214, .12), transparent); animation: sheen 6.5s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0%, 55% { left: -60%; } 100% { left: 130%; } }
.promo-num { text-align: center; }
.promo-num small { display: block; font-size: 12.5px; color: var(--gold-2); line-height: 1.4; }
.promo-num b { display: block; font-family: var(--display); font-size: 46px; font-weight: 700; line-height: 1.02; padding-top: 4px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.promo-body { position: relative; padding-inline-start: 18px; }
.promo-body::before { content: ''; position: absolute; inset-inline-start: 0; top: 2px; bottom: 2px; width: 1px; background: linear-gradient(to bottom, transparent, rgba(233, 210, 154, .55), transparent); }
.promo-body p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; }
.promo-body p .num, .promo-body p .lnum { color: var(--ivory); font-weight: 500; }
/* سلّم الخصم: نقطة لكل نسبة */
.tiers { list-style: none; margin: 12px 0 0; padding: 0; display: flex; justify-content: space-between; position: relative; }
.tiers::before { content: ''; position: absolute; top: 3px; left: 4px; right: 4px; height: 1px; background: rgba(233, 210, 154, .32); }
.tiers li { position: relative; display: grid; justify-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); min-width: 16px; }
.tiers li::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #17130C; box-shadow: 0 0 0 1px rgba(233, 210, 154, .65); }
.tiers li:first-child { color: var(--gold-2); }
.tiers li:first-child::before, .tiers li:last-child::before { background: var(--gold-2); box-shadow: 0 0 0 3px rgba(233, 210, 154, .16); }
.tiers li:last-child { color: var(--gold-2); }
.motif svg { display: block; width: 100%; height: 100%; }

.sec-title { font-size: 21px; margin: 22px 18px 12px; display: flex; align-items: center; gap: 12px; }
.sec-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to left, var(--line), transparent); }

/* ---------- مربعات الأقسام ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 12px; }
.tile {
  position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 18px; padding: 0; text-align: right;
  border: 1px solid rgba(233, 210, 154, .34); background: linear-gradient(135deg, var(--c2), #14110B 78%); color: #fff;
  box-shadow: 0 16px 34px -22px #000; transition: transform .2s ease, border-color .2s ease;
}
.tile:active { transform: scale(.975); border-color: var(--gold-2); }
.tile.wide { grid-column: 1 / -1; aspect-ratio: 3 / 1; }
.tile-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: drift 18s ease-in-out infinite alternate; }
.tile:nth-child(even) .tile-img { animation-delay: -6s; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.12) translate(-1.5%, -1%); } }
.scrim { position: absolute; inset: 0; background: linear-gradient(to left, rgba(8, 6, 3, .8) 0%, rgba(8, 6, 3, .38) 46%, rgba(8, 6, 3, 0) 74%), linear-gradient(to top, rgba(8, 6, 3, .5), rgba(8, 6, 3, 0) 60%); }
.tile-name { position: absolute; right: 14px; bottom: 30px; font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.25; text-shadow: 0 2px 10px rgba(0, 0, 0, .65); }
.tile-count { position: absolute; right: 14px; bottom: 11px; font-size: 12.5px; color: var(--gold-2); text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.tile.wide .tile-name { font-size: 24px; bottom: 34px; right: 18px; }
.tile.wide .tile-count { right: 18px; bottom: 14px; }
.tile .motif { position: absolute; color: #fff; opacity: .16; }
.tile .motif.m1 { width: 84px; height: 84px; left: -14px; top: -14px; }
.tile .motif.m2 { width: 34px; height: 34px; left: 44%; top: 12px; }
.tile .motif.m3 { width: 26px; height: 26px; left: 16px; bottom: 14px; }
.tile .motif.m4 { width: 44px; height: 44px; left: 56px; top: 44px; }
.tile-logo { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); height: 78%; width: auto; }
.tile.has-img .tile-logo { left: auto; right: 16px; top: 12px; transform: none; height: 30px; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }

/* ---------- رأس صفحة القسم ---------- */
.hero {
  position: relative; overflow: hidden; min-height: clamp(172px, 40vw, 224px); padding: 14px 16px 16px; color: #fff;
  display: flex; flex-direction: column; border-radius: 0 0 26px 26px; border-bottom: 1px solid rgba(233, 210, 154, .4);
  background: linear-gradient(120deg, #14110B 20%, var(--c2) 160%);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 82% 50%; animation: drift 22s ease-in-out infinite alternate; }
.hero .scrim { background: linear-gradient(to left, rgba(8, 6, 3, .82) 0%, rgba(8, 6, 3, .42) 44%, rgba(8, 6, 3, 0) 76%), linear-gradient(to bottom, rgba(8, 6, 3, .45), rgba(8, 6, 3, 0) 42%); }
/* زرار الرجوع واللوجوهين جنب بعض ناحية اليمين، بعيد عن العبوات اللي في الصورة */
.hero-row { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.back {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; border: 1px solid rgba(255, 255, 255, .26); border-radius: 999px; padding: 0 14px 0 11px;
  background: rgba(10, 8, 5, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #fff; font-size: 14px;
}
.back span { display: flex; }
.back b { font-weight: 500; }
/* على الموبايلات الضيقة زرار الرجوع يبقى سهم بس، عشان اللوجوهين مايغطوش العبوة */
@media (max-width: 429px) { .back { width: 40px; padding: 0; justify-content: center; } .back b { display: none; } }
.hero-brands {
  display: flex; align-items: center; gap: 10px; direction: ltr; height: 40px; padding: 0 9px 0 13px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .26); background: rgba(10, 8, 5, .5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hero-brands img { display: block; width: auto; }
.hero-brands .m-hg { height: 21px; }
.hero-brands .m-aura { height: 32px; }
.hero-brands i { width: 1px; height: 20px; background: linear-gradient(to bottom, transparent, rgba(233, 210, 154, .7), transparent); }
.hero-brands.dark { padding: 0 12px; background: #0B0B0B; border-color: rgba(229, 189, 3, .7); }
.hero-brands .m-gold { height: 25px; }
.hero h1 { position: relative; margin-top: auto; font-size: 32px; font-weight: 700; line-height: 1.25; text-shadow: 0 2px 14px rgba(0, 0, 0, .7); }
.hero-count { position: relative; font-size: 13.5px; color: var(--gold-2); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.hero .motif { position: absolute; color: #fff; opacity: .13; }
.hero .motif.m1 { width: 130px; height: 130px; left: -22px; top: -22px; }
.hero .motif.m2 { width: 52px; height: 52px; left: 64px; top: 92px; }
.hero .motif.m3 { width: 30px; height: 30px; left: 18px; bottom: 14px; }
.hero .motif.m4 { width: 70px; height: 70px; left: 46%; top: -24px; }

/* ---------- قائمة المنتجات ---------- */
.list { list-style: none; margin: 0 12px; padding: 0; background: rgba(255, 255, 255, .045); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.item { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 13px 12px; border-bottom: 1px solid var(--hair); }
.item:last-child { border-bottom: 0; }
.item.off .item-name, .item.off .price { color: var(--muted); }

/* خانة اللوجو: لوجو اللستة اللي الصنف تبعها (HG و Aura بالأبيض، والبريميوم دهبي على أسود) */
.label {
  width: 52px; height: 52px; border-radius: 14px 14px 14px 4px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .04)); box-shadow: 0 0 0 1px rgba(233, 210, 154, .4), 0 8px 18px -12px #000;
}
.label .lg { width: 62%; height: 62%; object-fit: contain; }
.label.lg-aura .lg { width: 70%; height: 70%; }
/* HG أحمر و AF بنفسجي ثابتين جنب كل صنف، واللوجو أبيض. البريميوم زي ما هو. */
.label.lg-hg { background: var(--hg-red); box-shadow: 0 8px 18px -12px #000; }
.label.lg-aura { background: var(--af-violet); box-shadow: 0 8px 18px -12px #000; }
.label.lg-premium { background: #0B0B0B; box-shadow: 0 0 0 1px rgba(229, 189, 3, .7), 0 8px 18px -12px #000; }
.label.photo img { width: 100%; height: 100%; object-fit: cover; }
.item.off .label { filter: grayscale(1); opacity: .35; }
.code { direction: ltr; unicode-bidi: isolate; font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 6px; background: var(--tint); color: var(--tone); align-self: center; }
.item.off .code { background: rgba(255, 255, 255, .06); color: var(--muted); }

.item-name { font-size: 15px; font-weight: 500; line-height: 1.4; overflow-wrap: anywhere; }
.item-meta { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 13px; color: var(--muted); }
.price { font-size: 15px; font-weight: 600; color: var(--gold-2); }
.pre { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.stock.low { color: var(--gold); }
.stock.none { color: var(--muted); }
.cat-tag { color: var(--tone); font-weight: 500; }

.add {
  width: 42px; height: 42px; border-radius: 50%; border: 1.5px solid var(--gold); background: transparent; color: var(--gold-2);
  display: grid; place-items: center; font-size: 22px; line-height: 1; transition: transform .15s ease, background-color .15s ease;
}
.add:active { transform: scale(.9); background: rgba(200, 164, 90, .18); }
.add:disabled { border-color: var(--hair); color: #5C564A; cursor: default; }
.stepper { display: flex; align-items: center; background: var(--gold-grad); border-radius: 999px; color: var(--on-gold); animation: pop .22s ease; }
@keyframes pop { from { transform: scale(.86); opacity: .4; } to { transform: none; opacity: 1; } }
.stepper button { width: 36px; height: 42px; border: 0; background: none; color: var(--on-gold); font-size: 20px; font-weight: 600; line-height: 1; }
.stepper .qty { width: 42px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--on-gold); text-align: center; font-weight: 700; font-size: 16px; padding: 0; direction: ltr; }
.stepper .qty:focus { outline: none; background: #fff; }

.empty { text-align: center; padding: 48px 28px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-family: var(--display); font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.empty .btn { margin: 18px auto 0; max-width: 240px; }
.skeleton { margin: 0 12px; border-radius: var(--radius); border: 1px solid var(--hair); background: rgba(255, 255, 255, .04); height: 300px; display: grid; place-items: center; color: var(--muted); }

/* ---------- شريط السلة ---------- */
.minicart {
  position: fixed; z-index: 6; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  width: min(536px, calc(100% - 24px)); border: 1px solid rgba(233, 210, 154, .5); border-radius: 16px; color: var(--ink);
  background: rgba(22, 18, 12, .92); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -18px #000;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; text-align: right;
}
.minicart small { display: block; font-size: 12.5px; color: var(--muted); }
.minicart b { font-size: 16px; font-weight: 600; color: var(--gold-2); }
.minicart .go { background: var(--gold-grad); color: var(--on-gold); border-radius: 11px; padding: 9px 14px; font-weight: 700; font-size: 14px; flex: none; }

/* ---------- الشريط اللي تحت ---------- */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 6; border-top: 1px solid var(--line);
  background: rgba(14, 12, 9, .88); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); padding-bottom: var(--safe-b);
}
.nav-in { max-width: 560px; margin: 0 auto; height: var(--nav-h); display: grid; grid-template-columns: repeat(4, 1fr); }
.nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 12px; font-weight: 500; color: #8C8473; }
.nav .ico { position: relative; display: grid; place-items: center; width: 58px; height: 32px; border-radius: 16px; transition: background-color .2s ease, transform .2s ease; }
.nav svg { display: block; }
.nav svg .f { fill: currentColor; fill-opacity: 0; transition: fill-opacity .2s ease; }
.nav button[aria-current="page"] { color: var(--gold-2); font-weight: 600; }
.nav button[aria-current="page"] .ico { background: rgba(200, 164, 90, .17); box-shadow: inset 0 0 0 1px rgba(233, 210, 154, .28); }
.nav button[aria-current="page"] svg .f { fill-opacity: .25; }
.nav button:active .ico { transform: scale(.92); }
.badge {
  position: absolute; top: -5px; left: 4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}

/* ---------- السلة والطلبات ---------- */
.section { margin: 14px 12px 0; }
.card { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card + .card { margin-top: 12px; }
.card .field { margin-bottom: 0; }
.card .field + .field { margin-top: 14px; }
.section > .btn, .section > div > .msg { margin-top: 12px; }
.card-title { font-size: 20px; margin-bottom: 12px; }
.total-row { display: flex; align-items: baseline; justify-content: space-between; }
.total-row + .total-row { margin-top: 6px; }
.total-row .big { font-size: 24px; font-weight: 700; color: var(--gold-2); }
.total-row.off { color: var(--danger); font-weight: 500; }
.total-row.due { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--hair); }
.ship-note { margin-top: 8px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); }
.nudge { margin-top: 12px; border-radius: 12px; padding: 10px 12px; background: rgba(200, 164, 90, .13); color: var(--gold-2); font-size: 13.5px; }
.nudge .track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); margin-top: 8px; overflow: hidden; direction: rtl; }
.nudge .track i { display: block; height: 100%; background: var(--gold-grad); border-radius: 3px; }
.hint { font-size: 13px; color: var(--muted); margin-top: 10px; }

.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; cursor: pointer; background: rgba(255, 255, 255, .03); }
.opt input { width: 20px; height: 20px; margin: 0; accent-color: var(--gold); flex: none; }
.opt b { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.opt small { display: block; font-size: 13px; color: var(--muted); margin: 0; }
.opt:has(input:checked) { border-color: var(--gold-2); background: rgba(200, 164, 90, .12); }
.field .opt span { margin: 0; }

.order { display: block; width: 100%; text-align: right; border: 0; background: none; padding: 14px 14px; border-bottom: 1px solid var(--hair); color: var(--ink); }
.order:last-child { border-bottom: 0; }
.order-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.order-name { font-weight: 600; font-size: 16px; }
.order-customer { margin-top: 2px; font-size: 14px; color: var(--ink-soft); }
.state { font-size: 12.5px; font-weight: 600; border-radius: 999px; padding: 3px 11px; }
.state.wait { background: rgba(200, 164, 90, .16); color: var(--gold-2); }
.state.sale { background: var(--ok-wash); color: var(--ok); }
.state.cancel { background: rgba(255, 255, 255, .08); color: var(--muted); }
.order-lines { margin: 10px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--hair); list-style: none; font-size: 13.5px; color: var(--ink-soft); }
.order-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.pre-line { white-space: pre-line; }

.done { text-align: center; padding: 40px 26px 10px; }
.done .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--gold-grad); color: var(--on-gold); display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 0 40px -6px rgba(233, 210, 154, .7); }
.done h2 { font-size: 26px; }
.done p { color: var(--ink-soft); margin-top: 8px; }
.done .ref { display: inline-block; margin-top: 14px; padding: 8px 22px; border-radius: 12px; border: 1px solid var(--line); background: rgba(200, 164, 90, .12); color: var(--gold-2); font-weight: 700; font-size: 20px; }
.done .sum { max-width: 300px; margin: 16px auto 0; text-align: right; }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.kv:last-of-type { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }

#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 18px); transform: translate(-50%, 20px); z-index: 20;
  background: var(--ivory); color: var(--on-gold); padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; max-width: min(92vw, 420px); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; box-shadow: 0 16px 40px -14px #000;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- حركة الدخول ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.fresh .promo, .fresh .tile, .fresh .hero h1, .fresh .hero-count, .fresh .card { animation: rise .5s cubic-bezier(.2, .8, .2, 1) both; }
.fresh .tile:nth-child(1) { animation-delay: .05s; } .fresh .tile:nth-child(2) { animation-delay: .1s; }
.fresh .tile:nth-child(3) { animation-delay: .15s; } .fresh .tile:nth-child(4) { animation-delay: .2s; }
.fresh .tile:nth-child(5) { animation-delay: .25s; } .fresh .tile:nth-child(6) { animation-delay: .3s; }
.fresh .tile:nth-child(7) { animation-delay: .35s; }
.fresh .list .item:nth-child(-n+9) { animation: rise .42s cubic-bezier(.2, .8, .2, 1) both; }
.fresh .list .item:nth-child(2) { animation-delay: .04s; } .fresh .list .item:nth-child(3) { animation-delay: .08s; }
.fresh .list .item:nth-child(4) { animation-delay: .12s; } .fresh .list .item:nth-child(5) { animation-delay: .16s; }
.fresh .list .item:nth-child(6) { animation-delay: .2s; } .fresh .list .item:nth-child(7) { animation-delay: .24s; }
.fresh .list .item:nth-child(8) { animation-delay: .28s; } .fresh .list .item:nth-child(9) { animation-delay: .32s; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* ---------- شاشة التحميل: فيديو اللوجوهين على خلفية بنفس لون الفيديو ---------- */
#splash { position: fixed; inset: 0; z-index: 200; overflow: hidden; display: grid; place-items: center; background: #222; transition: opacity .45s ease, visibility 0s .45s; }
#splash.out { opacity: 0; visibility: hidden; pointer-events: none; }
/* الفيديو 1080×1920 واللوجو في نصه بالظبط: بنعرضه بعرض ثابت تقريباً عشان اللوجو يطلع بحجم مناسب على الموبايل والكمبيوتر، وأطرافه بتدوب في الخلفية */
.sp-video { position: absolute; top: 50%; left: 50%; width: clamp(620px, 100vw, 860px); aspect-ratio: 9 / 16; transform: translate(-50%, -50%); object-fit: cover; opacity: 0; transition: opacity .2s ease; pointer-events: none; -webkit-mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at center, #000 62%, transparent 100%); }
#splash.playing .sp-video { opacity: 1; }
/* البديل الثابت: بيظهر بس لو الفيديو ماشتغلش خلال ثانية */
.sp-logos { position: relative; display: flex; align-items: center; gap: 24px; direction: ltr; animation: sp-fade .5s 1s both; }
#splash.playing .sp-logos { display: none; }
.sp-logos span { display: block; background: center / contain no-repeat; }
.sp-logos .sp-hg { width: 74px; height: 84px; background-image: url(/brand/hg-white-icon.png); }
.sp-logos .sp-af { width: 108px; height: 108px; background-image: url(/brand/aura-white-seal.png); }
.sp-logos i { width: 1px; height: 80px; background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, .55), transparent); }
@keyframes sp-fade { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .floater { opacity: .2; }
}

/* ---------- صفحة الإدارة ---------- */
.admin { max-width: 560px; margin: 0 auto; padding: 22px 14px 40px; }
.admin h1 { font-size: 26px; margin-bottom: 4px; }
.admin .sub { color: var(--muted); margin-bottom: 18px; }
.admin .admin-sec { font-size: 21px; margin: 26px 0 4px; }
.admin .row small { display: block; }
.admin .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.admin .row:last-child { border-bottom: 0; }
.admin .row b { display: block; font-weight: 600; }
.admin .row small { color: var(--muted); }
.admin .row.offline b { color: var(--muted); text-decoration: line-through; }
.admin .acts { display: flex; gap: 6px; flex: none; }
.admin .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
