/* ============ NEXORA — هوية "البوتيك" ============
   خط العناوين: عارف رقعة | خط النص: Readex Pro (محلّيان)
   الشكل المميز: القوس (إطار علوي دائري) */

@font-face { font-family: 'Aref Ruqaa'; font-weight: 400; font-display: swap; src: url(/public/fonts/aref-ruqaa-arabic-400-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Aref Ruqaa'; font-weight: 700; font-display: swap; src: url(/public/fonts/aref-ruqaa-arabic-700-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Aref Ruqaa'; font-weight: 400; font-display: swap; src: url(/public/fonts/aref-ruqaa-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Aref Ruqaa'; font-weight: 700; font-display: swap; src: url(/public/fonts/aref-ruqaa-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: 'Readex Pro'; font-weight: 160 700; font-display: swap; src: url(/public/fonts/readex-pro-arabic-wght-normal.woff2) format('woff2'); unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Readex Pro'; font-weight: 160 700; font-display: swap; src: url(/public/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+2000-206F, U+20AC, U+2122; }

:root {
  --brand: #8c2b5a;                       /* توتي */
  --brand-dark: color-mix(in srgb, var(--brand) 76%, #1a0a14);
  --brand-soft: color-mix(in srgb, var(--brand) 13%, #fff);
  --brand-tint: color-mix(in srgb, var(--brand) 6%, #fff);
  --petal: #fdf4f2;
  --blush: #f6dde0;
  --lilac: #e9dff3;
  --champagne: #ebd9be;
  --sage: #d6e6d9;
  --plum: #2e1a28;
  --muted: #7d6873;
  --line: #ecd9db;
  --ink: var(--plum);
  --bg: var(--petal);
  --ok: #2f7a4d; --err: #b3263e;
  --lift: 0 10px 30px -16px color-mix(in srgb, var(--brand) 55%, transparent);
  --font-display: 'Aref Ruqaa', 'Readex Pro', serif;
  --font-body: 'Readex Pro', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.75; font-size: 16px; font-weight: 400; }
body.shop { --bg: var(--brand-tint); }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.4; font-weight: 600; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; }
.display { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.muted { color: var(--muted); } .small { font-size: .88rem; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }

/* ---------- عناصر مشتركة ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  background: var(--brand); color: #fff; border: 0; border-radius: 999px; padding: 11px 26px; min-height: 46px;
  font: inherit; font-weight: 500; box-shadow: var(--lift); transition: background .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--brand-dark); } .btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
.btn.ghost:hover { background: var(--brand-soft); }
.btn.light { background: #fff; color: var(--brand-dark); box-shadow: none; } .btn.light:hover { background: var(--blush); }
.btn.danger { background: #fff; color: var(--err); box-shadow: inset 0 0 0 1.5px #f0c4cb; } .btn.danger:hover { background: #fdecee; }
.btn.sm { padding: 5px 16px; min-height: 36px; font-size: .88rem; }
.btn.block { width: 100%; }
.card { background: #fff; border-radius: 24px; padding: 20px; box-shadow: var(--lift); }
.card + .card { margin-top: 14px; }
.grid > .card + .card, .stats > .card + .card { margin-top: 0; }
.grid { display: grid; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

label { display: block; font-weight: 500; margin-bottom: 4px; font-size: .93rem; }
input, select, textarea {
  width: 100%; font: inherit; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 16px;
  background: #fff; color: var(--ink); min-height: 46px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
input[type=color] { padding: 4px; height: 46px; } input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--brand); }
input[type=file] { padding: 8px 12px; }
textarea { min-height: 96px; resize: vertical; }
.field + .field { margin-top: 14px; }
.hint { color: var(--muted); font-size: .84rem; margin-top: 3px; }
.ltr { direction: ltr; text-align: left; }

.alert { padding: 12px 16px; border-radius: 18px; margin-bottom: 14px; font-weight: 400; }
.alert.ok { background: #e6f4ec; color: var(--ok); } .alert.err { background: #fdecee; color: var(--err); } .alert.warn { background: #fbf0dc; color: #8a5a00; }

.badge { display: inline-block; padding: 1px 12px; border-radius: 999px; font-size: .78rem; font-weight: 500; background: var(--brand-soft); color: var(--brand-dark); white-space: nowrap; }
.badge.new { background: #e3edff; color: #2347b8; } .badge.confirmed { background: var(--lilac); color: #5b2e91; }
.badge.shipping { background: var(--champagne); color: #7a4c0a; } .badge.delivered { background: var(--sage); color: #25663f; }
.badge.returned, .badge.cancelled { background: #fadadf; color: var(--err); } .badge.off { background: #eee6e8; color: var(--muted); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: right; padding: 11px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; }
th { color: var(--muted); font-size: .8rem; font-weight: 500; } tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.type-pick label { margin: 0; cursor: pointer; position: relative; }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; }
.type-pick span { display: block; text-align: center; padding: 12px 6px; border-radius: 999px; font-weight: 500; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); transition: all .15s; }
.type-pick input:checked + span { background: var(--brand); color: #fff; box-shadow: var(--lift); }
.type-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }

/* ---------- الشعار ---------- */
.logo { direction: ltr; font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; color: var(--plum); line-height: 1; display: inline-flex; align-items: baseline; gap: 6px; }
.logo i { font-style: normal; color: var(--brand); }
.logo small { font-family: var(--font-body); font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: .02em; }

/* ---------- الصفحة التعريفية ---------- */
.site-head { position: relative; z-index: 5; }
.site-head .container { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }

.l-hero { padding: 26px 0 60px; }
.l-hero .container { display: grid; gap: 38px; align-items: center; }
@media (min-width: 900px) { .l-hero .container { grid-template-columns: 1.05fr .95fr; gap: 56px; } .l-hero { padding-top: 40px; } }
.l-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1.25; margin: 0 0 18px; color: var(--plum); }
.l-hero p.lead { font-size: 1.1rem; max-width: 34em; color: #5d4655; margin: 0 0 26px; }
.l-hero .cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.l-hero .note { color: var(--muted); font-size: .88rem; }

.demo { --brand: #8c2b5a; --brand-dark: color-mix(in srgb, var(--brand) 76%, #1a0a14); --brand-soft: color-mix(in srgb, var(--brand) 13%, #fff); display: grid; justify-items: center; gap: 18px; }
.demo .arch-frame {
  width: min(320px, 86vw); aspect-ratio: 3 / 4.3; border-radius: 999px 999px 28px 28px; background: var(--brand-soft);
  padding: 18px 18px 0; overflow: hidden; position: relative; transition: background .35s;
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--brand) 60%, transparent);
}
.demo .mini-top { text-align: center; padding-top: 34px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: var(--brand-dark); transition: color .35s; }
.demo .mini-bar { margin: 10px auto 0; width: 70%; height: 26px; border-radius: 999px; background: #fff; opacity: .85; }
.demo .mini-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.demo .mini-item { background: #fff; border-radius: 999px 999px 14px 14px; padding: 8px 8px 10px; text-align: center; font-size: .72rem; }
.demo .mini-pic { aspect-ratio: 4/5; border-radius: 999px 999px 10px 10px; background: var(--brand); margin-bottom: 6px; opacity: .88; transition: background .35s; position: relative; overflow: hidden; }
.demo .mini-pic::after { content: ''; position: absolute; inset: auto 22% 14% 22%; height: 38%; border-radius: 40% 40% 12px 12px; background: rgba(255,255,255,.55); }
.demo .mini-item:nth-child(2) .mini-pic { background: color-mix(in srgb, var(--brand) 55%, #fff); }
.demo .mini-price { font-weight: 600; color: var(--brand-dark); transition: color .35s; }
.demo .mini-btn { margin: 14px auto 0; width: 64%; padding: 7px; border-radius: 999px; background: var(--brand); color: #fff; text-align: center; font-size: .78rem; font-weight: 500; transition: background .35s; }
.demo .swatches { display: flex; gap: 12px; align-items: center; }
.demo .swatches button { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; background: var(--c); box-shadow: inset 0 0 0 3px rgba(255,255,255,.6), 0 4px 12px -4px var(--c); transition: transform .15s; }
.demo .swatches button:hover { transform: scale(1.12); }
.demo .swatches button[aria-pressed=true] { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--c); }
.demo .swatch-name { color: var(--muted); font-size: .9rem; min-height: 1.6em; }

.l-types { background: #fff; padding: 64px 0; }
.l-types h2, .l-how h2 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 8px; }
.l-types .sub { color: var(--muted); max-width: 36em; margin: 0 0 34px; }
.type-row { display: grid; gap: 22px; }
@media (min-width: 800px) { .type-row { grid-template-columns: repeat(3, 1fr); } }
.type { border-radius: 999px 999px 28px 28px; padding: 54px 26px 28px; text-align: center; }
.type.t1 { background: var(--blush); } .type.t2 { background: var(--lilac); } .type.t3 { background: var(--champagne); }
.type h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 6px; }
.type p { color: #5d4655; font-size: .92rem; margin: 0 0 16px; }
.type .samples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.type .samples span { background: rgba(255,255,255,.75); padding: 3px 14px; border-radius: 999px; font-size: .85rem; }
.type .samples .dot { width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }

.l-feat { padding: 64px 0 20px; }
.feat-list { display: grid; gap: 0; max-width: 780px; }
.feat-list div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.feat-list div:first-child { border-top: 1px solid var(--line); }
@media (min-width: 700px) { .feat-list div { grid-template-columns: 210px 1fr; gap: 24px; align-items: baseline; } }
.feat-list b { font-weight: 600; color: var(--brand-dark); } .feat-list span { color: #5d4655; }

.l-how { padding: 54px 0 70px; }
.steps { display: grid; gap: 18px; padding: 0; margin: 28px 0 0; list-style: none; counter-reset: s; }
@media (min-width: 800px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: s; position: relative; padding-top: 4px; }
.steps li::before { content: counter(s, arabic-indic); font-family: var(--font-display); font-weight: 700; font-size: 3.4rem; line-height: 1; color: var(--brand); display: block; margin-bottom: 4px; }
.steps b { display: block; font-weight: 600; margin-bottom: 2px; } .steps span { color: #5d4655; }

.l-cta { background: var(--brand); color: #fff; text-align: center; padding: 64px 0; border-radius: 999px 999px 0 0; margin-top: 10px; }
.l-cta h2 { font-family: var(--font-display); font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin-bottom: 18px; }
.site-foot { background: var(--plum); color: #d9c6d0; padding: 28px 0 34px; font-size: .9rem; text-align: center; }
.site-foot a { color: #fff; } .site-foot .logo { color: #fff; }

.auth { max-width: 480px; margin: 12px auto 40px; }
.auth h1 { font-family: var(--font-display); font-size: 2.1rem; margin-bottom: 4px; }

/* ---------- لوحة التحكم ---------- */
.dash { display: flex; min-height: 100vh; }
.side { width: 240px; background: var(--blush); padding: 24px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; border-radius: 0 0 0 0; }
.side .logo { padding: 0 12px 22px; font-size: 2rem; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 999px; color: var(--plum); font-weight: 500; margin-bottom: 4px; transition: background .15s; }
.side nav a:hover { background: rgba(255,255,255,.6); }
.side nav a.on { background: var(--brand); color: #fff; box-shadow: var(--lift); }
.side .grow { flex: 1; }
.main { flex: 1; min-width: 0; padding: 26px 30px; padding-bottom: 90px; }
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-family: var(--font-display); font-size: 2rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { box-shadow: none; border-radius: 24px 24px 24px 6px; }
.stats .stat:nth-child(1) { background: var(--blush); } .stats .stat:nth-child(2) { background: var(--lilac); }
.stats .stat:nth-child(3) { background: var(--champagne); } .stats .stat:nth-child(4) { background: var(--sage); }
.stat b { display: block; font-size: 1.45rem; font-weight: 600; } .stat span { color: #5d4655; font-size: .88rem; }
.count-dot { background: var(--brand); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .74rem; margin-right: auto; }
.side nav a.on .count-dot { background: #fff; color: var(--brand); }
.prod-row { display: flex; gap: 12px; align-items: center; }
.thumb { width: 58px; height: 58px; border-radius: 999px 999px 12px 12px; object-fit: cover; background: var(--brand-soft); flex: none; }
.var-row { display: grid; grid-template-columns: 1fr 1fr 90px 44px; gap: 8px; margin-bottom: 8px; align-items: center; }
.var-row.one { grid-template-columns: 1fr 90px 44px; }
.img-list { display: flex; gap: 10px; flex-wrap: wrap; }
.img-list label { margin: 0; font-weight: 400; font-size: .8rem; text-align: center; }
.img-list img { width: 74px; height: 88px; object-fit: cover; border-radius: 999px 999px 12px 12px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 8px; }
.tabs a { white-space: nowrap; padding: 6px 16px; border-radius: 999px; background: #fff; color: var(--plum); font-weight: 500; font-size: .9rem; box-shadow: inset 0 0 0 1.5px var(--line); }
.tabs a.on { background: var(--brand); color: #fff; box-shadow: var(--lift); }
.copybox { background: var(--brand-soft); border-radius: 18px; padding: 10px 16px; word-break: break-all; direction: ltr; text-align: left; font-weight: 500; color: var(--brand-dark); }

@media (max-width: 800px) {
  .side { position: fixed; bottom: 10px; right: 10px; left: 10px; top: auto; width: auto; height: auto; flex-direction: row; padding: 6px; border-radius: 999px; z-index: 20; box-shadow: 0 14px 34px -10px color-mix(in srgb, var(--brand) 55%, transparent); background: #fff; }
  .side .logo, .side .grow, .side .side-extra { display: none; }
  .side nav { display: flex; width: 100%; justify-content: space-around; }
  .side nav a { flex-direction: column; gap: 0; padding: 6px 12px; font-size: .72rem; position: relative; margin: 0; }
  .side nav a .ico { font-size: 1.2rem; }
  .count-dot { position: absolute; top: -2px; left: 10%; margin: 0; }
  .main { padding: 16px 14px 100px; }
  th, td { padding: 8px 4px; font-size: .88rem; } .hide-m { display: none; }
  .var-row { grid-template-columns: 1fr 1fr; } .var-row.one { grid-template-columns: 1fr 80px 44px; }
  .type-pick { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 1.7rem; }
}

/* ---------- واجهة المتجر ---------- */
.shop-top { background: var(--brand); color: #fff; text-align: center; padding: 7px 12px; font-size: .88rem; }
.shop-head { background: color-mix(in srgb, var(--brand-tint) 88%, transparent); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 10; }
.shop-head .container { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.shop-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 1.55rem; color: var(--brand-dark); line-height: 1.1; }
.shop-logo img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.shop-head form { flex: 1; } .shop-head input { min-height: 42px; border-radius: 999px; padding-inline: 18px; border-color: transparent; background: #fff; }
.cart-link { position: relative; font-size: 1.4rem; color: var(--brand-dark); padding: 0 6px; }
.cart-link b { position: absolute; top: -7px; left: -5px; background: var(--brand); color: #fff; border-radius: 999px; font-size: .68rem; min-width: 18px; text-align: center; line-height: 18px; font-weight: 500; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 14px 0 4px; }
.cats a { white-space: nowrap; padding: 6px 18px; border-radius: 999px; background: #fff; color: var(--plum); font-weight: 500; font-size: .92rem; }
.cats a.on { background: var(--brand); color: #fff; box-shadow: var(--lift); }
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 14px; padding: 18px 0; }
@media (min-width: 700px) { .products { grid-template-columns: repeat(3, 1fr); gap: 30px 20px; } }
@media (min-width: 980px) { .products { grid-template-columns: repeat(4, 1fr); } }
.pcard { display: block; color: var(--ink); position: relative; text-align: center; }
.pcard .pic { aspect-ratio: 4 / 5; border-radius: 999px 999px 18px 18px; background: var(--brand-soft); overflow: hidden; transition: transform .25s, box-shadow .25s; }
.pcard:hover .pic { transform: translateY(-3px); box-shadow: var(--lift); }
.pcard .pic img { width: 100%; height: 100%; object-fit: cover; }
.pcard .info { padding: 10px 6px 0; }
.pcard .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 0 8px; }
.price { font-weight: 600; color: var(--brand-dark); white-space: nowrap; }
.old { color: var(--muted); text-decoration: line-through; font-size: .84rem; font-weight: 400; white-space: nowrap; }
.tag { position: absolute; top: 40px; right: 6px; background: var(--brand); color: #fff; font-size: .74rem; font-weight: 500; padding: 2px 11px; border-radius: 999px; z-index: 2; }
.tag.sold { background: var(--plum); }
.pdp { display: grid; gap: 24px; padding: 20px 0; }
.pdp > * { min-width: 0; }
@media (min-width: 800px) { .pdp { grid-template-columns: 1fr 1fr; gap: 44px; } }
.pdp h1 { font-family: var(--font-display); font-size: 2.1rem; }
.gallery .big { aspect-ratio: 4 / 5; border-radius: 999px 999px 24px 24px; overflow: hidden; background: var(--brand-soft); }
.gallery .big img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; justify-content: center; }
.gallery .thumbs img { width: 56px; height: 66px; object-fit: cover; border-radius: 999px 999px 10px 10px; cursor: pointer; border: 2px solid transparent; }
.gallery .thumbs img.on { border-color: var(--brand); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; font-weight: 500; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; min-height: 0; }
.chips span { display: block; padding: 8px 18px; border-radius: 999px; background: #fff; cursor: pointer; box-shadow: inset 0 0 0 1.5px var(--line); transition: all .15s; }
.chips input:checked + span { background: var(--brand); color: #fff; box-shadow: var(--lift); }
.chips input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }
.chips input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.attrs { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; margin: 14px 0; }
.attrs dt { color: var(--muted); } .attrs dd { margin: 0; font-weight: 500; }
.cart-line { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .thumb { width: 66px; height: 78px; }
.cart-line .qty { width: 70px; min-height: 40px; padding: 4px 8px; }
.sum div { display: flex; justify-content: space-between; padding: 4px 0; }
.sum .total { font-size: 1.15rem; font-weight: 600; border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 10px; }
.shop-foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 34px 0 44px; }
.pager { display: flex; gap: 8px; justify-content: center; padding: 8px 0 24px; }
.empty { text-align: center; padding: 56px 10px; color: var(--muted); }
.wa-fab { position: fixed; bottom: 16px; left: 16px; background: #25d366; color: #fff; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 8px 20px -6px rgba(0,0,0,.3); z-index: 15; }
body:has(.side) .wa-fab { display: none; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print { body { background: #fff; } .no-print { display: none !important; } }

.pdp .old { margin-inline-start: 10px; }

/* ============ الستايلات: كل ما يخص واجهة المتجر يقرأ من متغيرات الستايل (انظر themes.js) ============ */
body.shop { background: var(--bg); color: var(--ink); --r-pic: 999px 999px 18px 18px; }
body.shop h1, body.shop h2, body.shop h3, body.shop .shop-logo, body.shop .pdp h1 { font-family: var(--font-display); font-weight: var(--fw-display, 700); }
body.shop h1, body.shop h2, body.shop h3, body.shop .shop-logo { word-spacing: var(--ws, normal); }
body.shop h1 { font-size: 1.7rem; } body.shop h2 { font-size: 1.25rem; } body.shop h3 { font-size: 1.05rem; }
body.shop .pdp h1 { font-size: 2.1rem; }
body.shop .shop-top, body.shop .tag, body.shop .cart-link b, body.shop .cats a.on, body.shop .chips input:checked + span { color: var(--on-brand); }
body.shop .shop-head { background: color-mix(in srgb, var(--bg) 90%, transparent); }
body.shop .shop-head input { background: var(--surface); border-radius: var(--r-chip); color: var(--ink); }
body.shop .shop-logo { color: var(--ink); }
body.shop .cart-link { color: var(--ink); }
body.shop .cats a, body.shop .chips span { background: var(--surface); color: var(--ink); border-radius: var(--r-chip); }
body.shop .cats a { box-shadow: inset 0 0 0 1.5px var(--line); }
body.shop .cats a.on, body.shop .chips input:checked + span { background: var(--brand); }
body.shop .products { gap: var(--pgap, 22px 14px); }
body.shop .pcard .pic, body.shop .thumb { border-radius: var(--r-pic); border: var(--pic-bd, none); background: var(--brand-soft); aspect-ratio: var(--ratio, 4 / 5); }
body.shop .thumb { aspect-ratio: auto; }
body.shop .pcard .pic { box-shadow: var(--hard, none); }
body.shop .pcard:hover .pic { box-shadow: var(--hard, var(--lift)); transform: translate(-2px, -3px); }
body.shop .gallery .big { border-radius: var(--r-pic2, var(--r-pic)); border: var(--pic-bd, none); background: var(--brand-soft); aspect-ratio: var(--ratio, 4 / 5); box-shadow: var(--hard, none); }
body.shop .gallery .thumbs img { border-radius: min(10px, var(--r-chip)); }
body.shop .tag { border-radius: var(--r-chip); }
body.shop .tag.sold { background: var(--ink); color: var(--bg); }
body.shop .btn { border-radius: var(--r-btn); color: var(--on-brand); box-shadow: var(--hard, none); }
body.shop .btn:hover { background: var(--brand-dark); }
body.shop .btn.ghost { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1.5px var(--brand); }
body.shop .btn.light { background: var(--surface); color: var(--ink); }
body.shop .card { background: var(--surface); border-radius: var(--r-card); border: var(--pic-bd, none); box-shadow: var(--hard, var(--lift)); }
body.shop input, body.shop select, body.shop textarea { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: min(14px, var(--r-chip)); }
body.shop input:focus, body.shop select:focus, body.shop textarea:focus { border-color: var(--brand); }
body.shop .price { color: var(--brand-dark); }
body.shop a { color: var(--brand-dark); }
body.shop .btn:not(.ghost):not(.light) { color: var(--on-brand); }
body.shop .pcard, body.shop .cats a:not(.on), body.shop .shop-logo, body.shop .cart-link { color: var(--ink); }
body.shop .chips span { box-shadow: inset 0 0 0 1.5px var(--line); }

/* ---------- اختيار الستايل في الإعدادات ---------- */
.theme-group { font-weight: 600; color: var(--brand-dark); margin: 16px 0 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 620px) { .theme-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.theme-opt { position: relative; margin: 0; cursor: pointer; display: block; }
.theme-opt > input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
.theme-card { display: grid; gap: 4px; padding: 10px; border-radius: 16px; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .15s; }
.theme-card b { font-size: 1rem; line-height: 1.3; } .theme-card small { font-size: .76rem; line-height: 1.4; }
.theme-pics { display: flex; gap: 6px; margin-bottom: 4px; }
.theme-pics i { width: 34px; height: 44px; display: block; }
.theme-opt input:checked + .theme-card { box-shadow: 0 0 0 3px var(--brand); }
.theme-opt input:focus-visible + .theme-card { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }
.theme-prev { position: absolute; top: 8px; left: 8px; font-size: .74rem; background: rgba(255,255,255,.92); color: #333 !important; padding: 1px 10px; border-radius: 999px; box-shadow: 0 1px 4px rgba(0,0,0,.2); }

/* ---------- تخصيص التصميم (الإعدادات) ---------- */
.design-sec { font-weight: 600; margin: 22px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.design-sec small { font-weight: 400; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-size: .8rem; font-weight: 500; cursor: pointer; padding: 2px 4px; margin-inline-start: auto; text-decoration: underline; }
.lp-sticky { position: sticky; top: 6px; z-index: 6; background: #fff; padding: 4px 0 6px; }
.lp { --lp-bg: #fff; --lp-surface: #fff; --lp-ink: #222; --lp-muted: #666; --lp-line: #ddd; --lp-brand: #8c2b5a; --lp-on: #fff; --lp-fh: inherit; --lp-fb: inherit; --lp-fw: 700; --lp-rpic: 12px; --lp-rbtn: 999px; --lp-bd: 0;
  background: var(--lp-bg); color: var(--lp-ink); font-family: var(--lp-fb); border-radius: 16px; padding: 8px 10px 10px; box-shadow: 0 0 0 1px var(--lp-line); line-height: 1.5; }
.lp-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 6px; border-bottom: 1px solid var(--lp-line); margin-bottom: 8px; }
.lp-logo { display: flex; align-items: center; gap: 8px; } .lp-logo img { height: 30px; width: auto; max-width: 110px; object-fit: contain; }
.lp-logo b { font-family: var(--lp-fh); font-weight: var(--lp-fw); font-size: 1.1rem; }
.lp-body { display: flex; gap: 10px; align-items: stretch; }
.lp-pic { width: 62px; min-height: 74px; background: var(--lp-brand); opacity: .85; border-radius: var(--lp-rpic); border: var(--lp-bd); flex: none; }
.lp-info { flex: 1; min-width: 0; background: var(--lp-surface); border-radius: 10px; padding: 4px 10px; }
.lp-info h4 { margin: 0; font-family: var(--lp-fh); font-weight: var(--lp-fw); font-size: 1rem; }
.lp-info p { margin: 0; font-size: .78rem; color: var(--lp-muted); }
.lp-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.lp-price { font-weight: 600; font-size: .86rem; color: var(--lp-ink); }
.lp-btn { background: var(--lp-brand); color: var(--lp-on); border-radius: var(--lp-rbtn); padding: 1px 14px; font-size: .8rem; font-weight: 500; }
.color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.color-grid label { margin: 0; font-size: .86rem; font-weight: 500; display: grid; gap: 4px; }
.color-grid input[type=color] { width: 100%; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sw { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; padding: 0; }
.font-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.font-opt { margin: 0; position: relative; cursor: pointer; }
.font-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; pointer-events: none; }
.font-opt span { display: block; text-align: center; padding: 8px 4px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font-size: 1.05rem; line-height: 1.5; }
.font-opt input:checked + span { box-shadow: 0 0 0 3px var(--brand); }
.font-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, #fff); outline-offset: 2px; }
.logo-cur { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.logo-cur img { height: 64px; max-width: 140px; width: auto; object-fit: contain; border-radius: 10px; background: #f6f1f2; padding: 4px; }
.check { display: flex; gap: 8px; align-items: center; margin: 4px 0; font-weight: 400; cursor: pointer; }
body.shop .shop-logo img { width: auto; height: 44px; max-width: 150px; border-radius: 0; object-fit: contain; }
.grid > .card, .grid > form.card { min-width: 0; }
.lp, .lp-body, .lp-info, .lp-top { min-width: 0; }
body.shop .pdesc { margin: 14px 0; padding: 12px 14px; background: var(--surface); border-radius: var(--r-card); border: var(--pic-bd, none); }
body.shop .pdesc h3 { margin: 0 0 4px; font-size: 1rem; }
body.shop .pdesc p { margin: 0; white-space: pre-line; color: var(--ink); line-height: 1.9; }

/* ===== المبيعات ===== */
.sales-tabs { margin-bottom: 4px; }
.custom-range { margin: 4px 0 10px; font-size: .9rem; }
.custom-range summary { cursor: pointer; color: var(--brand); font-weight: 500; padding: 4px 0; }
.range-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 8px; }
.range-form label { display: flex; flex-direction: column; gap: 3px; font-size: .84rem; color: var(--muted); }
.basis { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .88rem; }
.basis a { padding: 4px 14px; border-radius: 999px; background: #fff; color: var(--plum); box-shadow: inset 0 0 0 1.5px var(--line); }
.basis a.on { background: var(--brand-soft); color: var(--brand-dark); box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kpis.two { grid-template-columns: 1fr 1fr; margin-bottom: 0; }
.kpi { background: #fff; border-radius: 20px; padding: 14px 16px; box-shadow: var(--lift); min-width: 0; }
.kpi .k { color: var(--muted); font-size: .84rem; }
.kpi .v { font-size: 1.3rem; font-weight: 600; margin: 2px 0 4px; overflow-wrap: anywhere; }
.delta { font-size: .78rem; font-weight: 500; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--err); } .delta.flat { color: var(--muted); }
.card h3 { margin: 0 0 10px; font-size: 1.05rem; }
.chart-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.chart { position: relative; width: 100%; direction: ltr; }
.chart svg { display: block; max-width: 100%; }
.chart .tip, .card .tip { position: absolute; background: var(--plum); color: #fff; padding: 4px 10px; border-radius: 10px; font-size: .78rem; white-space: nowrap; pointer-events: none; z-index: 2; direction: rtl; }
.card { position: relative; }
.bar-row { margin: 10px 0; }
.bar-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; margin-bottom: 4px; }
.bar-top .num { color: var(--muted); white-space: nowrap; font-size: .84rem; }
.bar { height: 8px; background: var(--brand-tint); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
table.sum { width: 100%; border-collapse: collapse; }
table.sum td { padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.sum td:last-child { text-align: left; font-weight: 500; }
table.sum tr.tot td { font-weight: 700; border-bottom: 0; }
.fs-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.fs-plain:disabled { opacity: .45; pointer-events: none; }
.theme-opt input:disabled ~ .theme-card { opacity: .5; }
.plan-card .row.between { align-items: center; }

/* ===== بنرات المتجر ===== */
.banners { position: relative; margin: 14px 0 4px; }
.b-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-card, 18px); }
.b-track::-webkit-scrollbar { display: none; }
.b-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 12 / 5; display: block; overflow: hidden; border-radius: var(--r-card, 18px); background: var(--line, #eee); }
.b-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.b-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
.b-dots i { width: 7px; height: 7px; border-radius: 99px; background: var(--line, #ddd); cursor: pointer; transition: width .2s; }
.b-dots i.on { width: 20px; background: var(--brand); }
@media (prefers-reduced-motion: reduce) { .b-dots i { transition: none; } }
/* لوحة البنرات */
.size-guide { background: var(--brand-tint); border-radius: 18px; padding: 14px; }
.size-box { position: relative; aspect-ratio: 12 / 5; border: 2px dashed var(--brand); border-radius: 12px; display: grid; place-items: center; background: #fff; max-width: 480px; margin: 8px 0; }
.size-box b { font-size: 1.15rem; }
.size-box .safe { position: absolute; inset: 14% 12%; border: 1.5px solid color-mix(in srgb, var(--brand) 45%, transparent); border-radius: 8px; display: grid; place-items: center; font-size: .78rem; color: var(--muted); text-align: center; }
.b-item { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.b-item img { width: 150px; aspect-ratio: 12 / 5; object-fit: cover; border-radius: 10px; display: block; background: var(--line); }
.b-item.off img { opacity: .4; }
.b-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
@media (max-width: 480px) { .b-item { grid-template-columns: 1fr; } .b-item img { width: 100%; } }

/* ---------- تحسينات التصميم (v14) ---------- */
.side nav a .ico { display: grid; place-items: center; width: 22px; height: 22px; }
.side nav a .ico svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.hero-card { background: linear-gradient(140deg, #7a2350 0%, #4a1636 100%); color: #fff; border-radius: 26px; padding: 18px 20px 14px; margin-bottom: 14px; position: relative; overflow: hidden; max-width: 560px; }
.hero-card::after { content: ''; position: absolute; width: 190px; height: 190px; border-radius: 50%; background: rgba(255,255,255,.07); inset-inline-end: -60px; top: -80px; }
.hero-card small { opacity: .8; display: block; } .hero-card .big { font-size: 1.9rem; font-weight: 600; line-height: 1.4; position: relative; }
.hero-card svg { display: block; width: 100%; height: 50px; margin-top: 6px; position: relative; }
.hero-card .hl { display: flex; justify-content: space-between; font-size: .8rem; opacity: .85; position: relative; }
.alert-new { display: flex; align-items: center; gap: 10px; background: #fff7dc; border: 1px solid #f0dc9a; border-radius: 18px; padding: 11px 14px; margin-bottom: 14px; color: #5c4300; font-weight: 500; max-width: 560px; }
.alert-new i { width: 9px; height: 9px; border-radius: 50%; background: #e0a100; flex: none; box-shadow: 0 0 0 4px rgba(224,161,0,.25); }
.olist { display: grid; gap: 10px; }
@media (min-width: 1100px) { .olist { grid-template-columns: 1fr 1fr; } }
.ocard { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 20px; padding: 12px 14px; color: var(--ink); box-shadow: var(--lift); transition: transform .15s; }
.ocard:hover { transform: translateY(-2px); } .ocard:active { transform: scale(.99); }
.card .ocard { box-shadow: none; background: var(--brand-tint); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 600; flex: none; }
.oc-main { flex: 1; min-width: 0; display: block; } .oc-main b { display: block; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .oc-main small { color: var(--muted); display: block; font-size: .8rem; }
.oc-end { text-align: end; display: grid; gap: 2px; justify-items: end; } .oc-end b { font-size: .95rem; white-space: nowrap; }
.tl2 { display: grid; gap: 0; }
.tl2 .st { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; position: relative; color: var(--muted); }
.tl2 .st b { font-weight: 400; }
.tl2 .st:not(:last-child)::before { content: ''; position: absolute; top: 22px; bottom: 0; inset-inline-start: 10px; width: 2px; background: var(--line); }
.tl2 .st.on { color: var(--ink); } .tl2 .st.on b { font-weight: 600; } .tl2 .st.on:not(:last-child)::before { background: var(--brand); }
.tl2 .st u { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); background: #fff; flex: none; display: grid; place-items: center; text-decoration: none; }
.tl2 .st.on u { background: var(--brand); border-color: var(--brand); color: #fff; }
.tl2 .st.cur u { box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 22%, transparent); }
.tl2 svg { width: 12px; height: 12px; }
.stat { transition: transform .15s; }
@media (prefers-reduced-motion: reduce) { .ocard, .stat { transition: none; } }
