@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@500;600;700;800&family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&display=swap');

/* =========================================================================
   Zolgstore — تصميم المتجر (v3 «هادئ»)
   نفس الهوية (أسود + برتقالي) لكن بخلفيات فاتحة، طباعة مريحة، وتركيز على المنتجات.
   ========================================================================= */
:root {
  --brand: #ff5b1f;
  --brand-2: #ff7a45;
  --brand-ink: #c2410c;
  --brand-soft: #fff1ea;
  --brand-ring: rgba(255, 91, 31, .25);
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f1efe9;
  --surface-3: #e9e6de;
  --ink: #141416;
  --ink-2: #3b3b42;
  --muted: #6f6f78;
  --faint: #a2a2aa;
  --line: #e6e3db;
  --ok: #12804a; --ok-soft: #e6f5ec;
  --bad: #d4372b; --bad-soft: #fdecea;
  --r-sm: 10px; --r: 14px; --r-lg: 20px; --r-xl: 28px;
  --sh-1: 0 1px 2px rgba(20,20,22,.04), 0 4px 14px rgba(20,20,22,.05);
  --sh-2: 0 14px 40px rgba(20,20,22,.12);
  --ease: cubic-bezier(.22,1,.36,1);
  --f-head: 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --f-body: 'IBM Plex Sans Arabic', 'Alexandria', system-ui, sans-serif;
  --header-h: 68px;
  --tabbar-h: 0px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #0f0f11;
  --surface: #17171a;
  --surface-2: #1d1d21;
  --surface-3: #26262b;
  --ink: #f2f0ea;
  --ink-2: #d6d3cc;
  --muted: #a3a3ab;
  --faint: #6f6f78;
  --line: #2a2a30;
  --brand-ink: #ff8a5b;
  --brand-soft: rgba(255, 91, 31, .12);
  --ok: #3ccf7f; --ok-soft: rgba(60,207,127,.12);
  --bad: #ff6b60; --bad-soft: rgba(255,107,96,.12);
  --sh-1: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
  --sh-2: 0 18px 50px rgba(0,0,0,.55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.zolg-maintenance-pending body { visibility: hidden; }
body { margin: 0; font-family: var(--f-body); font-size: 15.5px; line-height: 1.7; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; padding-bottom: var(--tabbar-h); }
::selection { background: var(--brand); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; line-height: 1.3; letter-spacing: -.01em; font-weight: 700; }
p { margin: 0; }
.container { width: min(1240px, 100% - 40px); margin-inline: auto; }
.hidden, [hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--brand-ring); outline-offset: 2px; border-radius: 8px; }
.num, [dir="ltr"] { unicode-bidi: isolate; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px;
  background: var(--ink); color: var(--bg); border: 1px solid transparent; font-weight: 700; font-size: .92rem; cursor: pointer;
  transition: transform .15s, background .2s, border-color .2s, color .2s, box-shadow .2s; white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--ink-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-ink); }
html[data-theme="dark"] .btn-primary:hover { background: var(--brand-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { background: var(--surface); border-color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-small { height: 38px; padding: 0 14px; font-size: .84rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 1rem; border-radius: 14px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: transparent; border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; position: relative; transition: border-color .2s, background .2s; }
.icon-btn:hover { border-color: var(--ink); background: var(--surface); }
.icon-btn .count { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.icon-btn .count:empty, .icon-btn .count[data-zero] { display: none; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(150%) blur(14px); -webkit-backdrop-filter: saturate(150%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { height: var(--header-h); display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 10px; flex: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .85rem; overflow: hidden; flex: none; }
.logo-mark img { width: 100%; height: 100%; object-fit: cover; }
.logo-text { display: grid; line-height: 1.05; }
.logo-text b { font-family: var(--f-head); font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.logo-text small { font-size: .58rem; letter-spacing: .2em; color: var(--muted); font-weight: 600; margin-top: 3px; }
.main-nav { display: flex; gap: 2px; }
.main-nav a { padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--ink-2); transition: background .2s, color .2s; }
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a.active { color: var(--brand-ink); background: var(--brand-soft); }
.header-search { flex: 1; max-width: 460px; position: relative; margin-inline-start: auto; }
.header-search input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 44px 0 14px; padding-inline-start: 42px; outline: none; transition: border-color .2s, box-shadow .2s; }
.header-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.header-search i { position: absolute; inset-inline-start: 15px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.header-search + .header-actions { margin-inline-start: 0; }

/* ---------- Mobile tab bar ---------- */
.mobile-tabbar { display: none; }
@media (max-width: 860px) {
  :root { --header-h: 60px; --tabbar-h: 64px; }
  .main-nav, .header-search { display: none; }
  .header-actions { margin-inline-start: auto; }
  .mobile-tabbar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; bottom: 0; inset-inline: 0; z-index: 60; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px)); padding-bottom: env(safe-area-inset-bottom, 0px); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .mobile-tabbar a, .mobile-tabbar button { display: grid; justify-items: center; align-content: center; gap: 3px; font-size: .68rem; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; position: relative; }
  .mobile-tabbar i { font-size: 1.12rem; }
  .mobile-tabbar .active { color: var(--brand-ink); }
  .mobile-tabbar .count { position: absolute; top: 8px; inset-inline-start: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .62rem; display: grid; place-items: center; }
  .mobile-tabbar .count[data-zero] { display: none; }
  .hide-mobile { display: none !important; }
  .hide-desktop-search { display: inline-grid !important; }
}
/* الزر العائم القديم للسلة: نستعمل زر الرأس/الشريط بدلاً منه */
.zolg-cart-trigger { display: none !important; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-sm { padding: 32px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }
.section-head p { color: var(--muted); margin-top: 4px; font-size: .92rem; }
.link-more { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; color: var(--brand-ink); font-size: .92rem; }
.link-more:hover { text-decoration: underline; }
.kicker { flex-wrap: wrap; max-width: 100%; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .8rem; font-weight: 700; }
.kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }

/* ---------- Home hero ---------- */
.home-hero { padding: 36px 0 24px; }
.hero-grid > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: center; }
.hero-copy h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.2; margin: 16px 0 14px; font-weight: 800; letter-spacing: -.02em; }
.hero-copy h1 em { font-style: normal; color: var(--brand); }
.hero-copy > p { color: var(--muted); font-size: 1.05rem; max-width: 520px; }
.hero-search { margin-top: 24px; display: flex; gap: 8px; max-width: 540px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-1); }
.hero-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; padding: 0 12px; height: 46px; }
.hero-search .btn { height: 46px; }
.hero-trust { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.hero-trust span { display: inline-flex; gap: 8px; align-items: center; }
.hero-trust i { color: var(--brand); }
.hero-visual { position: relative; aspect-ratio: 1.08; border-radius: var(--r-xl); overflow: hidden; background: radial-gradient(120% 90% at 20% 10%, #ffe2d3, transparent 60%), linear-gradient(160deg, #fff3ec, #f3eee6); border: 1px solid var(--line); }
html[data-theme="dark"] .hero-visual { background: radial-gradient(120% 90% at 20% 10%, rgba(255,91,31,.28), transparent 60%), linear-gradient(160deg, #1c1714, #141416); }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.hero-badge { position: absolute; bottom: 18px; inset-inline-start: 18px; display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: var(--sh-1); font-size: .84rem; }
.hero-badge i { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand); color: #fff; }
.hero-badge b { display: block; font-family: var(--f-head); }
.hero-badge small { color: var(--muted); }

/* ---------- Category rail ---------- */
.cat-rail { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; scroll-snap-type: x proximity; }
.cat-rail::-webkit-scrollbar { display: none; }
.cat-tile { flex: none; display: grid; justify-items: center; gap: 8px; width: 104px; padding: 14px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; font-size: .8rem; font-weight: 600; color: var(--ink-2); scroll-snap-align: start; transition: border-color .2s, transform .2s var(--ease); }
.cat-tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.cat-tile i { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.1rem; }

/* ---------- Product grid & cards ---------- */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-item { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; transition: box-shadow .25s, transform .25s var(--ease), border-color .2s; }
.product-item:hover { box-shadow: var(--sh-2); transform: translateY(-3px); border-color: transparent; }
.product-image { position: relative; display: block; aspect-ratio: 1; background: var(--surface-2); overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-item:hover .product-image img { transform: scale(1.04); }
.product-image img.is-fallback { object-fit: contain; padding: 18%; opacity: .6; }
.product-stock-badge { position: absolute; top: 10px; inset-inline-end: 10px; padding: 3px 9px; border-radius: 999px; font-size: .7rem; font-weight: 700; background: color-mix(in srgb, var(--surface) 90%, transparent); color: var(--ok); backdrop-filter: blur(6px); }
.product-stock-badge:not(.is-out):not(.digital-badge) { display: none; }
.product-stock-badge.is-out { color: var(--bad); }
.product-stock-badge.digital-badge { color: var(--ink-2); }
.product-sale-badge { position: absolute; top: 10px; inset-inline-start: 10px; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 800; background: var(--brand); color: #fff; direction: ltr; }
.product-item .product-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-category { font-size: .72rem; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-item .product-info h3 { font-family: var(--f-body); font-size: .92rem; font-weight: 600; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.product-item .product-info h3 a:hover { color: var(--brand-ink); }
.product-card-description, .related-product-description { display: none; }
.product-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.sale-price { font-family: var(--f-head); font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.product-price.has-discount .sale-price { color: var(--brand-ink); }
.product-old-price { font-size: .8rem; color: var(--faint); text-decoration: line-through; }
.product-card-discount { display: none; }
.product-card-actions { display: flex; gap: 8px; margin-top: 8px; }
.product-card-actions > a.btn { display: none; }
.product-card-actions .btn-cart-add { flex: 1; height: 40px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); }
.product-card-actions .btn-cart-add:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.product-card-actions .btn-cart-add.is-out-of-stock { background: transparent; color: var(--faint); }
.product-item.is-out-of-stock .product-image img { filter: grayscale(.6); opacity: .75; }
#relatedProducts .product-info > a.btn { display: none; }

.catalog-load-state, .empty-state { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 54px 20px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--r-lg); }
.catalog-load-state strong { color: var(--ink); font-family: var(--f-head); }
.catalog-load-spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--brand); animation: zspin .8s linear infinite; margin-bottom: 6px; }
@keyframes zspin { to { transform: rotate(360deg); } }
.catalog-load-state.is-error i { font-size: 1.4rem; color: var(--bad); }
.skeleton-card { border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: zsk 1.2s infinite; aspect-ratio: .74; }
@keyframes zsk { to { background-position: -200% 0; } }

/* ---------- Shop ---------- */
.page-head { padding: 26px 0 8px; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .82rem; color: var(--muted); flex-wrap: wrap; }
.crumbs a:hover { color: var(--brand-ink); }
.crumbs i { font-size: .6rem; opacity: .6; }
.page-head h1 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 8px; }
.page-head p { color: var(--muted); margin-top: 4px; }
.shop-toolbar { position: sticky; top: var(--header-h); z-index: 30; background: var(--bg); padding: 12px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.shop-controls { display: flex; gap: 10px; align-items: center; }
.field-search { position: relative; flex: 1; }
.field-search i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.field-search input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding-inline: 40px 14px; outline: none; }
.field-search input:focus, .select:focus, .input:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.select { height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; padding-inline-end: 34px; outline: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 16px 50%, 11px 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
[dir="rtl"] .select { background-position: 16px 50%, 11px 50%; padding-inline-start: 14px; padding-inline-end: 14px; padding-left: 34px; }
.category-chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; scrollbar-width: none; }
.category-chips::-webkit-scrollbar { display: none; }
.category-chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .84rem; color: var(--ink-2); cursor: pointer; transition: all .2s; }
.category-chip:hover { border-color: var(--ink); }
.category-chip.active { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.shop-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: .84rem; margin: 2px 0 14px; }
.pagination { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin: 30px 0 10px; }
.pagination button { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.pagination button:hover:not(:disabled) { border-color: var(--ink); }
.pagination button.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.pagination-gap { align-self: center; color: var(--faint); padding: 0 4px; }
.seo-crawl-links { margin-top: 40px; }
.seo-crawl-links summary { cursor: pointer; color: var(--muted); font-size: .84rem; font-weight: 600; }
.seo-crawl-links h2 { font-size: .95rem; margin: 14px 0 6px; }
.seo-crawl-links p { color: var(--muted); font-size: .84rem; }
.seo-crawl-links ul { columns: 3 260px; padding: 0; margin: 12px 0 0; list-style: none; font-size: .8rem; }
.seo-crawl-links li { break-inside: avoid; padding: 3px 0; color: var(--muted); }
.seo-crawl-links a:hover { color: var(--brand-ink); }

/* ---------- Product details ---------- */
.pd { padding: 14px 0 40px; }
.pd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 40px; align-items: start; margin-top: 16px; }
.pd-gallery { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 12px; }
.main-image { aspect-ratio: 1; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; }
.main-image img { width: 100%; height: 100%; object-fit: contain; }
.thumbnails { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumbnails img { width: 74px; height: 74px; flex: none; border-radius: 12px; object-fit: cover; border: 2px solid transparent; background: var(--surface-2); cursor: pointer; transition: border-color .2s, opacity .2s; opacity: .8; }
.thumbnails img:hover, .thumbnails img.is-active { border-color: var(--brand); opacity: 1; }
.pd-info { display: grid; gap: 18px; }
.pd-cat { display: inline-flex; padding: 4px 12px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: .78rem; font-weight: 600; justify-self: start; }
.pd-info h1 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); line-height: 1.4; font-weight: 700; }
.pd-price { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.pd-price .current-price { font-family: var(--f-head); font-size: 1.9rem; font-weight: 800; color: var(--ink); }
.pd-price .old-price { font-size: 1.05rem; color: var(--faint); text-decoration: line-through; }
.pd-price .discount { padding: 3px 10px; border-radius: 999px; background: var(--brand); color: #fff; font-size: .8rem; font-weight: 700; }
.pd-stock { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; color: var(--ok); }
.pd-stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pd-stock .stock.out-of-stock { color: var(--bad); }
.pd-stock:has(.out-of-stock) { color: var(--bad); }
.pd-perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pd-perks div { display: grid; gap: 4px; justify-items: center; text-align: center; padding: 12px 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.pd-perks i { color: var(--brand); font-size: 1.05rem; }
.pd-perks b { color: var(--ink); font-size: .82rem; }
.order-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 14px; }
.order-card h3 { font-size: 1rem; display: flex; align-items: center; gap: 8px; }
.order-card h3 i { color: var(--brand); }
.order-row { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.quantity-control { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; height: 44px; justify-self: start; }
.quantity-control button { width: 44px; height: 100%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 1.1rem; }
.quantity-control button:hover { background: var(--surface-3); }
.quantity-control input { width: 54px; height: 100%; border: 0; text-align: center; background: var(--surface); outline: none; -moz-appearance: textfield; font-weight: 700; }
.quantity-control input::-webkit-outer-spin-button, .quantity-control input::-webkit-inner-spin-button { -webkit-appearance: none; }
.input, .textarea, .order-card select { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.textarea { height: auto; min-height: 80px; padding: 10px 14px; resize: vertical; }
.order-card select { appearance: none; cursor: pointer; }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.delivery-option { position: relative; cursor: pointer; }
.delivery-option input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-option > span { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s, background .2s; font-size: .86rem; }
.delivery-option > span i { color: var(--muted); }
.delivery-option small { display: block; color: var(--muted); font-size: .72rem; }
.delivery-option input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.delivery-option input:checked + span i { color: var(--brand-ink); }
.delivery-option input:focus-visible + span { box-shadow: 0 0 0 4px var(--brand-ring); }
.shipping-summary { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; }
.shipping-summary div { display: flex; justify-content: space-between; gap: 10px; }
.shipping-summary span { color: var(--muted); }
.shipping-summary .summary-total { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 2px; font-weight: 700; }
.shipping-summary .summary-total strong { font-family: var(--f-head); font-size: 1.05rem; }
.product-form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stock-order-notice { padding: 10px 12px; border-radius: 12px; background: var(--bad-soft); color: var(--bad); font-size: .86rem; font-weight: 600; }
.pd-more { display: grid; gap: 10px; }
.pd-more summary { cursor: pointer; font-weight: 600; font-size: .86rem; color: var(--ink-2); list-style: none; display: flex; gap: 8px; align-items: center; }
.pd-more summary::-webkit-details-marker { display: none; }
.pd-more summary::after { content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-inline-start: auto; color: var(--faint); transition: transform .2s; }
.pd-more details[open] summary::after { transform: rotate(180deg); }
.pd-more details { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.pd-more details > *:not(summary) { margin-top: 10px; }
.service-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-btn { display: inline-flex; gap: 8px; align-items: center; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .84rem; cursor: pointer; color: var(--ink-2); }
.chip-btn:hover { border-color: var(--ink); color: var(--ink); }
.share-product-status, .product-utility-status { font-size: .8rem; color: var(--ok); width: 100%; min-height: 1em; }
.product-utility-status.is-error { color: var(--bad); }
.pd-desc { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.pd-desc h2 { font-size: 1.15rem; margin-bottom: 12px; }
.pd-desc .description { white-space: pre-line; color: var(--ink-2); line-height: 1.95; max-width: 78ch; }
.pd-sticky { display: none; }
.admin-detail-edit-wrap { margin: 4px 0; }
.admin-quick-edit { background: var(--surface-2) !important; color: var(--ink) !important; border: 1px dashed var(--brand) !important; }

/* ---------- Cart drawer (generated by main.js) ---------- */
.zolg-cart-drawer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.zolg-cart-drawer.is-open { pointer-events: auto; }
.cart-backdrop { position: absolute; inset: 0; background: rgba(15,15,17,.45); opacity: 0; transition: opacity .25s; backdrop-filter: blur(2px); }
.zolg-cart-drawer.is-open .cart-backdrop { opacity: 1; }
.cart-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(460px, 100vw); background: var(--bg); box-shadow: var(--sh-2); transform: translateX(-102%); transition: transform .35s var(--ease); display: flex; flex-direction: column; overflow-y: auto; }
.zolg-cart-drawer.is-open .cart-panel { transform: none; }
.cart-header { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.cart-header .eyebrow { display: none; }
.cart-header h2 { font-size: 1.1rem; display: flex; gap: 10px; align-items: center; }
.cart-header h2 i { color: var(--brand); }
.cart-close { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.cart-items { padding: 14px 20px 4px; display: grid; gap: 10px; }
.cart-empty { display: grid; justify-items: center; gap: 8px; padding: 34px 10px; text-align: center; color: var(--muted); }
.cart-empty i { font-size: 2rem; color: var(--brand); }
.cart-empty h3 { color: var(--ink); }
.cart-item { display: flex; gap: 12px; padding: 10px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.cart-item img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2); flex: none; }
.cart-item-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cart-item-info h4 { font-family: var(--f-body); font-size: .86rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-info > span { font-size: .74rem; color: var(--muted); }
.cart-item-info > strong { font-family: var(--f-head); font-size: .95rem; }
.cart-item-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cart-item-actions button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.cart-item-actions b { min-width: 22px; text-align: center; }
.cart-item-actions .remove-item { width: auto; padding: 0 10px; margin-inline-start: auto; color: var(--bad); background: transparent; border-color: transparent; font-size: .78rem; }
.cart-item.is-price-unavailable { border-color: var(--bad); }
.cart-price-unavailable { color: var(--bad); font-style: normal; }
.cart-checkout { padding: 14px 20px 24px; display: grid; gap: 10px; }
.cart-checkout h3 { font-size: .98rem; margin-top: 4px; }
#cartCheckoutForm { display: grid; gap: 10px; }
#cartCheckoutForm input:not([type="radio"]):not([type="checkbox"]), #cartCheckoutForm select, #cartCheckoutForm textarea { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); padding: 0 14px; outline: none; }
#cartCheckoutForm textarea { height: auto; min-height: 64px; padding: 10px 14px; resize: vertical; }
#cartCheckoutForm input:focus, #cartCheckoutForm select:focus, #cartCheckoutForm textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.checkout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-options.compact span { justify-content: center; }
.cart-shipping-notice { font-size: .84rem; color: var(--muted); padding: 8px 12px; border-radius: 10px; background: var(--surface-2); }
.cart-total-line { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-weight: 700; }
.cart-total-line strong { font-family: var(--f-head); font-size: 1.3rem; }
.policy-consent { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .84rem; }
.policy-consent input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.policy-consent small { display: block; color: var(--muted); font-size: .74rem; }
.policy-link-line { font-size: .8rem; }
.policy-link-line a { color: var(--brand-ink); text-decoration: underline; }
#cartCheckoutBtn { height: 52px; background: var(--brand); color: #fff; font-size: 1rem; }
#cartCheckoutBtn:hover:not(:disabled) { background: var(--brand-ink); }

/* ---------- Cards / misc pages ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.perks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.perk { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.perk i { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.05rem; }
.perk b { display: block; font-family: var(--f-head); font-size: .95rem; }
.perk span { color: var(--muted); font-size: .84rem; }
.help-card { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); }
.help-card h2 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
.help-card p { color: var(--muted); margin-top: 6px; }
.help-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.form-grid { display: grid; gap: 14px; }
.form-group { display: grid; gap: 6px; }
.form-group label { font-weight: 600; font-size: .86rem; color: var(--ink-2); }
.form-group input, .form-group select, .form-group textarea { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); padding: 0 14px; outline: none; }
.form-group textarea { height: auto; padding: 10px 14px; min-height: 120px; resize: vertical; }
.form-group select, .order-card select { appearance: none; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: 18px 50%, 13px 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-left: 36px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); background: var(--surface); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 24px; align-items: start; }
.contact-methods { display: grid; gap: 10px; }
.contact-method { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.contact-method i { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); flex: none; }
.contact-method h3 { font-size: .9rem; }
.contact-method p { color: var(--muted); font-size: .88rem; }
.policy-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; align-items: start; }
.policy-highlight { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 10px; justify-items: start; padding: 22px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.policy-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 1.2rem; }
.policy-highlight strong { font-family: var(--f-head); font-size: 1.15rem; }
.policy-highlight p { color: var(--muted); font-size: .88rem; }
.policy-content { display: grid; gap: 16px; }
.policy-card { padding: 26px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 12px; justify-items: start; }
.policy-card .eyebrow { font-size: .72rem; letter-spacing: .14em; color: var(--brand-ink); font-weight: 700; }
.policy-card h2 { font-size: 1.2rem; }
.policy-card p { color: var(--ink-2); line-height: 1.9; }
.policy-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .86rem; color: var(--ink-2); }
.policy-note i { color: var(--brand); margin-top: 4px; }
.error-wrap { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 40px 0; }
.error-code { font-family: var(--f-head); font-size: clamp(4rem, 12vw, 7rem); font-weight: 800; line-height: 1; color: var(--brand); letter-spacing: -.04em; }
.error-wrap h1 { font-size: 1.4rem; margin-top: 10px; }
.error-wrap p { color: var(--muted); margin: 8px auto 20px; max-width: 420px; }
.error-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.error-search { margin: 20px auto 0; max-width: 440px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 40px; background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-grid h4 { font-size: .92rem; margin-bottom: 12px; }
.footer-grid p, .footer-grid li { color: var(--muted); font-size: .88rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a:hover { color: var(--brand-ink); }
.footer-grid li i { color: var(--faint); width: 18px; }
.social-links { display: flex; gap: 8px; margin-top: 14px; }
.social-links a { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--ink-2); }
.social-links a:hover { border-color: var(--brand); color: var(--brand-ink); }
.footer-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--faint); font-size: .8rem; }
.pay-note { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Maintenance screen (site-enhancements.js) ---------- */
.zolg-maintenance-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); color: var(--ink); font-family: var(--f-body); }
.zolg-maintenance-orbit { display: none; }
.zolg-maintenance-card { width: min(100%, 520px); text-align: center; padding: 44px 28px; border-radius: var(--r-xl); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.zolg-maintenance-mark { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-ink); font-size: 1.4rem; }
.zolg-maintenance-kicker { font-size: .72rem; letter-spacing: .18em; color: var(--brand-ink); font-weight: 700; margin-bottom: 10px; }
.zolg-maintenance-card h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
.zolg-maintenance-lead { color: var(--muted); margin-top: 10px; }
.zolg-maintenance-rule { display: block; width: 50px; height: 2px; background: var(--line); margin: 20px auto 14px; }
.zolg-maintenance-en { color: var(--faint); font-size: .84rem; }
.zolg-maintenance-contact { display: inline-flex; gap: 8px; align-items: center; margin-top: 22px; padding: 12px 20px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 700; }
.zolg-maintenance-note { color: var(--faint); font-size: .78rem; margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perks-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .container { width: min(1240px, 100% - 28px); }
  .section { padding: 36px 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .hero-visual { aspect-ratio: 1.5; order: -1; }
  .hero-copy h1 { margin-top: 12px; }
  .home-hero { padding-top: 16px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-info { padding: 10px 10px 12px; }
  .product-item .product-info h3 { font-size: .84rem; }
  .sale-price { font-size: .98rem; }
  .product-card-actions .btn-cart-add { height: 36px; font-size: .78rem; padding: 0 8px; }
  .pd-grid { grid-template-columns: 1fr; gap: 18px; }
  .pd-gallery { position: static; }
  .main-image { border-radius: var(--r-lg); }
  .thumbnails img { width: 62px; height: 62px; }
  .pd-sticky { display: flex; position: fixed; bottom: var(--tabbar-h); inset-inline: 0; z-index: 55; gap: 10px; align-items: center; padding: 10px 14px; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(0,0,0,.06); transform: translateY(120%); transition: transform .3s var(--ease); }
  .pd-sticky.is-on { transform: none; }
  .pd-sticky b { font-family: var(--f-head); font-size: 1.05rem; display: block; }
  .pd-sticky small { color: var(--muted); font-size: .72rem; display: block; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .pd-sticky .btn { margin-inline-start: auto; height: 44px; }
  .contact-grid, .policy-layout { grid-template-columns: 1fr; }
  .policy-highlight { position: static; }
  .shop-controls .select { width: 132px; flex: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .cart-panel { width: 100vw; }
}
@media (max-width: 420px) {
  .pd-perks { grid-template-columns: 1fr 1fr 1fr; }
  .pd-perks div { padding: 10px 4px; }
  .product-form-actions { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .logo-text small { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* =========================================================================
   v4 — منتجات رقمية، خطوات الطلب، أسئلة، تتبع الطلب، نافذة النجاح
   ========================================================================= */
.digital-badge { background: #1e1b4b !important; color: #fff !important; }
.digital-badge i { color: #fbbf24; }
.category-chip.is-digital { border-color: var(--brand); color: var(--brand-ink); }
.category-chip.is-digital.active { background: var(--brand); color: #fff; }
.cat-tile.is-digital i { background: #1e1b4b; color: #fbbf24; }
.digital-note, .cart-digital-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: linear-gradient(135deg, #1e1b4b, #312e81); color: #eef; }
.digital-note > i, .cart-digital-note > i { color: #fbbf24; font-size: 1.1rem; margin-top: 3px; }
.digital-note b { display: block; font-family: var(--f-head); }
.digital-note span, .cart-digital-note span { font-size: .85rem; opacity: .92; line-height: 1.6; }
.cart-digital-note { margin: 0 0 10px; }
.digital-band { padding: clamp(18px, 3vw, 30px); border-radius: var(--r-xl); background: linear-gradient(135deg, #17153a, #2b2770); color: #fff; }
.digital-band .section-head p, .digital-band .link-more { color: #d6d4ff; }
.digital-band h2 { color: #fff; }
.kicker.light { background: rgba(255,255,255,.12); color: #fde68a; margin-bottom: 8px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; counter-reset: s; }
.steps li { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.step-n { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-family: var(--f-head); font-weight: 800; }
.steps b { display: block; font-family: var(--f-head); }
.steps span:not(.step-n) { color: var(--muted); font-size: .86rem; }

.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 18px; transition: border-color .2s; }
.faq details[open] { border-color: var(--brand); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 0; font-family: var(--f-head); font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.3rem; line-height: 1; color: var(--brand-ink); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 16px; color: var(--muted); }
.faq details a { color: var(--brand-ink); text-decoration: underline; }

.recent-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 180px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.recent-card { scroll-snap-align: start; display: grid; gap: 6px; padding: 10px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.recent-card img { aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); width: 100%; }
.recent-card span { font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recent-card b { color: var(--brand-ink); font-family: var(--f-head); font-size: .9rem; }

.success-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; }
.success-modal.is-on { opacity: 1; }
.success-backdrop { position: absolute; inset: 0; background: rgba(10,10,12,.55); backdrop-filter: blur(3px); }
.success-card { position: relative; width: min(440px, 100%); background: var(--surface); border-radius: var(--r-xl); padding: 28px 24px; text-align: center; box-shadow: var(--sh-2); transform: translateY(12px) scale(.98); transition: transform .3s var(--ease); }
.success-modal.is-on .success-card { transform: none; }
.success-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); font-size: 1.6rem; }
.success-card h2 { font-size: 1.3rem; }
.success-card > p { color: var(--muted); margin-top: 8px; }
.success-ref { margin: 18px 0 8px; display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: center; padding: 12px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line); }
.success-ref span { color: var(--muted); font-size: .85rem; }
.success-ref b { font-family: ui-monospace, monospace; font-size: 1.05rem; letter-spacing: .04em; }
.success-total { font-size: .92rem; }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

.track-layout { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.track-form { display: grid; gap: 14px; }
.track-hint { font-size: .84rem; color: var(--muted); }
.track-hint a { color: var(--brand-ink); text-decoration: underline; }
.track-msg { display: flex; gap: 10px; align-items: center; padding: 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); }
.track-msg.is-error { background: var(--bad-soft); border-color: transparent; color: var(--bad); }
.track-msg a { text-decoration: underline; }
.track-card { display: grid; gap: 18px; }
.track-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.track-head span { color: var(--muted); font-size: .82rem; display: block; }
.track-head b { font-family: ui-monospace, monospace; font-size: 1.1rem; }
.track-badge { padding: 6px 12px; border-radius: 999px; background: var(--ok-soft); color: var(--ok) !important; font-weight: 700; font-size: .85rem !important; }
.track-badge.is-off { background: var(--bad-soft); color: var(--bad) !important; }
.track-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.track-steps li { display: grid; justify-items: center; gap: 6px; text-align: center; font-size: .8rem; color: var(--faint); position: relative; }
.track-steps li i { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--line); }
.track-steps li.done { color: var(--ink); }
.track-steps li.done i { background: var(--brand); border-color: var(--brand); color: #fff; }
.track-steps li.now i { box-shadow: 0 0 0 5px var(--brand-ring); }
.track-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.track-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.track-foot { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .88rem; }
.track-foot b { color: var(--ink); font-family: var(--f-head); }
.track-mine { display: grid; gap: 8px; }
.track-mine h3 { font-size: 1rem; margin-bottom: 4px; }
.track-mine-row { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; text-align: start; }
.track-mine-row:hover { border-color: var(--brand); }
.track-mine-row span { color: var(--muted); font-size: .82rem; }

.to-top { position: fixed; inset-inline-start: 18px; bottom: calc(var(--tabbar-h) + 18px); z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); cursor: pointer; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
body.is-digital-product .pd-sticky small::before { content: '⚡ '; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
  .track-layout { grid-template-columns: 1fr; }
  .to-top { bottom: calc(var(--tabbar-h) + 84px); }
}
.digital-band .product-item { color: var(--ink); }
.digital-band .products-grid { margin-top: 6px; }


/* ===== شريط الصور المصغّرة: أسهم تحريك + منع تجاوز عمود المعرض فوق الوصف ===== */
.pd-gallery, .product-gallery { min-width: 0; max-width: 100%; }
.thumbs-wrap { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; margin-top: 12px; }
.thumbs-wrap .thumbnails { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scroll-behavior: smooth; scroll-snap-type: x proximity; overscroll-behavior-x: contain; scrollbar-width: none; margin-top: 0; padding: 3px 2px; }
.thumbs-wrap .thumbnails::-webkit-scrollbar { display: none; }
.thumbs-wrap .thumbnails img { scroll-snap-align: center; }
.thumbs-nav { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line, #e7e4dc); background: var(--surface, #fff); color: var(--ink, #17171a); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); transition: opacity .2s, transform .15s, border-color .2s; }
.thumbs-nav:hover:not(:disabled) { border-color: var(--brand, #ff5b1f); color: var(--brand, #ff5b1f); }
.thumbs-nav:active:not(:disabled) { transform: scale(.94); }
.thumbs-nav:disabled { opacity: .35; cursor: default; box-shadow: none; }
.thumbs-nav[hidden] { display: none; }
.thumbs-nav i { font-size: .8rem; }
