/* ============================================================================
   متجر طيف — واجهة العملاء
   ============================================================================
   الهوية مأخوذة من الموقع المرجعي marianuha.com: خلفية وردية فاتحة جدًا،
   لمسات وردية، نصوص بلون عنّابي داكن، وخط Noto Kufi Arabic. التخطيط RTL.
   ============================================================================ */

:root {
    --pink-50: #fdf4f3;   /* خلفية الصفحة */
    --pink-100: #f9e9ec;
    --pink-200: #f6dde2;
    --pink: #f08bb0;      /* اللون الأساسي */
    --pink-dark: #e46a97;
    /* لون الشاشة الفعّالة في القائمة، ولون التحويم قبل الضغط —
       منفصلان عن --pink-dark ليُضبط كلّ منهما من شاشة هوية الموقع */
    --active-link: #e46a97;
    --hover: #e46a97;
    --hover-text: #ffffff;
    --ink: #521b25;       /* عنّابي داكن للنصوص والعناوين */
    --ink-soft: #8a6b72;
    --line: #efdfe3;
    --white: #ffffff;
    --ok: #2fae60;
    --danger: #e11a2c;
    --gold: #ffcf57;

    --radius: 16px;
    --radius-sm: 10px;
    /* استدارة العناصر التفاعلية (أزرار، حقول، شرائح). القوالب الحادّة في
       شاشة «تصاميم الموقع» تخفضها؛ الدوائر تستعمل 50% فلا تتأثر. */
    --btn-radius: 999px;
    --shadow: 0 6px 24px rgba(82, 27, 37, 0.07);
    --shadow-hover: 0 14px 34px rgba(82, 27, 37, 0.13);
    /* متغيّرات تحقنها شاشة «هوية الموقع»؛ القيم هنا هي الافتراضية */
    --btn-primary-text: #ffffff;
    --btn-secondary-text: #521b25;
    --heading: #521b25;
    --header-bg: #ffffff;
    --footer-bg: #521b25;
    --shop-font: "Noto Kufi Arabic", "Tajawal", "Tahoma", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

/* عمود مرن بارتفاع الشاشة كحدّ أدنى: المحتوى يتمدّد فيلتصق الفوتر
   بالقاع في الصفحات القصيرة بدل أن يطفو تاركًا فراغًا تحته. */
body.shop {
    margin: 0;
    background: var(--pink-50);
    color: var(--ink);
    font-family: var(--shop-font);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.shop > main {
    flex: 1 0 auto;
}

body.shop > header,
body.shop > .shop-footer {
    flex: none;
}

body.shop img { max-width: 100%; display: block; }
body.shop a { color: inherit; text-decoration: none; }
body.shop button { font-family: inherit; cursor: pointer; }

.shop-container { width: min(1240px, 100% - 32px); margin-inline: auto; }

/* ------------------------------ شريط الإعلان ------------------------------ */

/* -------------------------------- الهيدر -------------------------------- */
.shop-header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}

.shop-header-row {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 12px 0;
}

.shop-logo { display: flex; align-items: center; gap: 10px; flex: none; }
.shop-logo img { height: 46px; width: auto; border-radius: 50%; }
.shop-logo-name { font-weight: 800; font-size: 1.05rem; }

.shop-search { flex: 1; position: relative; min-width: 0; }
.shop-search input {
    width: 100%;
    border: 1px solid var(--line);
    background: var(--pink-50);
    border-radius: var(--btn-radius);
    /* حشو منطقي لا فيزيائي: الزر يجلس عند inset-inline-start، فيجب أن
       يتّسع الجانب نفسه في الاتجاهين وإلا غطّى الزرُّ النصَّ في LTR. */
    padding-block: 11px;
    padding-inline: 46px 18px;
    font-family: inherit;
    font-size: .9rem;
    color: var(--ink);
}
.shop-search input:focus { outline: none; border-color: var(--pink); }
.shop-search button {
    position: absolute;
    inset-inline-start: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: var(--ink);
    color: #fff;
    width: 34px; height: 34px;
    border-radius: 50%;
    display: grid; place-items: center;
}
.shop-search svg { width: 16px; height: 16px; }

.shop-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.shop-icon-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: grid; place-items: center;
    color: var(--ink);
    position: relative;
    transition: background .18s ease;
}
.shop-icon-btn:hover { background: var(--pink-100); }
.shop-icon-btn svg { width: 20px; height: 20px; }
.shop-badge {
    position: absolute; top: 2px; inset-inline-start: 2px;
    background: var(--pink); color: #fff;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: var(--btn-radius);
    font-size: .68rem; font-weight: 700;
    display: grid; place-items: center;
}

/* -------------------------------- التنقّل ------------------------------- */
.shop-nav { border-top: 1px solid var(--line); background: var(--white); }
.shop-nav ul {
    list-style: none; margin: 0; padding: 0;
    display: flex; gap: 22px;
    overflow-x: auto;
    scrollbar-width: none;
}
.shop-nav ul::-webkit-scrollbar { display: none; }
.shop-nav a {
    display: block;
    padding: 13px 0;
    font-size: .88rem;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}
.shop-nav a:hover {
    color: var(--hover);
    border-bottom-color: var(--hover);
}
.shop-nav a.is-active {
    color: var(--active-link);
    border-bottom-color: var(--active-link);
}

/* --------------------------------- البطل -------------------------------- */
.shop-hero {
    margin: 22px 0;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--pink-100), var(--pink-200));
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    min-height: 320px;
}
.shop-hero-text { padding: 40px; }
.shop-hero h1 { font-size: 2.1rem; font-weight: 800; margin: 0 0 12px; line-height: 1.35; }
.shop-hero p { margin: 0 0 22px; color: var(--ink-soft); font-size: 1rem; }
.shop-hero-media { height: 100%; }
.shop-hero-media img { height: 100%; width: 100%; object-fit: cover; }

/* -------------------------------- الأزرار ------------------------------- */
.btn-shop {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--ink); color: #fff;
    border: none; border-radius: var(--btn-radius);
    padding: 12px 26px;
    font-weight: 700; font-size: .92rem;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-shop:hover { transform: translateY(-1px); box-shadow: var(--shadow-hover); color: var(--hover-text); }
.btn-shop--pink { background: var(--pink); color: var(--btn-primary-text); }
.btn-shop--pink:hover { background: var(--hover); color: var(--hover-text); }
.btn-shop--ghost { background: var(--pink-100); color: var(--btn-secondary-text); border: 1px solid var(--line); }
/* كان يستعمل --pink-200 وهو لون ثابت غير مربوط بالإعدادات،
   فيظلّ ورديًا مهما غيّر صاحب المتجر ألوان هوية الموقع. */
.btn-shop--ghost:hover { background: var(--hover); color: var(--hover-text); border-color: var(--hover); }
.btn-shop--block { width: 100%; justify-content: center; }
.btn-shop:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-shop svg { width: 17px; height: 17px; }

/* ------------------------------ عنوان القسم ----------------------------- */
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px; margin: 38px 0 18px;
}
.section-head h2 { font-size: 1.35rem; font-weight: 800; margin: 0; color: var(--heading); }
.section-head a { color: var(--pink-dark); font-size: .86rem; font-weight: 700; }

/* ------------------------------- التصنيفات ------------------------------ */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
}
.cat-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.cat-card-img { aspect-ratio: 1; background: var(--pink-50); }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-card-name { padding: 12px 10px; font-weight: 700; font-size: .88rem; }

/* -------------------------------- المنتجات ------------------------------ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 18px;
}
.product-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform .18s ease, box-shadow .18s ease;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.product-card-media { position: relative; aspect-ratio: 1; background: var(--pink-50); }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; }
.product-tag {
    position: absolute; top: 10px; inset-inline-start: 10px;
    background: var(--pink); color: #fff;
    font-size: .7rem; font-weight: 700;
    padding: 4px 10px; border-radius: var(--btn-radius);
}
.product-tag--out { background: var(--ink-soft); }
.product-card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card-name {
    font-weight: 700; font-size: .92rem; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 2.8em;
}
.product-card-price { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.price-now { font-weight: 800; font-size: 1.02rem; }
.price-was { color: var(--ink-soft); text-decoration: line-through; font-size: .8rem; }

/* ------------------------ تخطيطات القوالب الجاهزة ------------------------
   محاور الشكل التي تفصل قالبًا عن آخر، مضبوطة من
   /admin/business-settings/site-designs وموصولة بسمات على <body>.
   الافتراضي (framed / square / normal) هو ما كان عليه المتجر قبل الشاشة. */

.product-card-go,
.product-card-cta { display: none; }

/* زرّ يطفو على ركن الصورة */
.product-card-go {
    position: absolute; bottom: 10px; inset-inline-end: 10px;
    width: 34px; height: 34px;
    place-items: center;
    background: var(--pink); color: var(--btn-primary-text);
    border-radius: var(--btn-radius);
    transition: background .18s ease;
}
.product-card-go svg { width: 16px; height: 16px; }
.product-card:hover .product-card-go { background: var(--hover); color: var(--hover-text); }

/* نداء عمل عريض أسفل البطاقة */
.product-card-cta {
    justify-content: center;
    margin-top: 12px;
    padding: 9px 14px;
    background: var(--pink); color: var(--btn-primary-text);
    border-radius: var(--btn-radius);
    font-weight: 700; font-size: .82rem;
    text-align: center;
    transition: background .18s ease;
}
.product-card:hover .product-card-cta { background: var(--hover); color: var(--hover-text); }

/* ---- بطاقة بزرّ ---- */
body.shop[data-card="cta"] .product-card-cta { display: flex; }

/* ---- بطاقة عارية: لا إطار ولا خلفية، الصورة وحدها ثم النصّ تحتها ---- */
body.shop[data-card="bare"] .product-card {
    background: transparent; border-color: transparent; border-radius: 0;
}
body.shop[data-card="bare"] .product-card-media {
    border-radius: var(--radius-sm); overflow: hidden;
}
body.shop[data-card="bare"] .product-card-body { padding: 12px 2px 0; }
body.shop[data-card="bare"] .product-card:hover { transform: none; box-shadow: none; }
body.shop[data-card="bare"] .product-card:hover .product-card-name { color: var(--hover); }

/* ---- صورة معلّقة: الصورة مستديرة من أعلى، والنصّ في صندوق تحتها ---- */
body.shop[data-card="capped"] .product-card {
    background: transparent; border-color: transparent; overflow: visible;
}
body.shop[data-card="capped"] .product-card-media {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0; overflow: hidden;
}
body.shop[data-card="capped"] .product-card-body {
    background: var(--white);
    border: 1px solid var(--line); border-top: 0;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
body.shop[data-card="capped"] .product-card-go { display: grid; }

/* ---- نسبة الصورة ---- */
body.shop[data-media="tall"] .product-card-media { aspect-ratio: 3 / 4; }
body.shop[data-media="wide"] .product-card-media { aspect-ratio: 4 / 3; }

/* ---- كثافة الشبكة: لا تُطبَّق على الهاتف حيث للشاشة رأي أقوى ---- */
@media (min-width: 561px) {
    body.shop[data-columns="wide"] .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px;
    }
    body.shop[data-columns="dense"] .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 14px;
    }
    body.shop[data-columns="wide"] .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    body.shop[data-columns="dense"] .cat-grid {
        grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    }
}

/* ------------------------------ شريط الفلاتر ---------------------------- */
.toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; flex-wrap: wrap;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 20px;
}
.toolbar select {
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    padding: 9px 16px;
    font-family: inherit; font-size: .86rem;
    background: var(--white); color: var(--ink);
}
.toolbar select:focus { outline: none; border-color: var(--pink); }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    border: 1px solid var(--line);
    background: var(--white);
    border-radius: var(--btn-radius);
    padding: 7px 16px;
    font-size: .84rem; font-weight: 600;
}
.chip:hover, .chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ------------------------------ صفحة المنتج ----------------------------- */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin: 26px 0; }
.gallery-main {
    background: var(--white); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden; aspect-ratio: 1;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb {
    width: 74px; height: 74px; border-radius: var(--radius-sm);
    overflow: hidden; border: 2px solid var(--line); background: #fff;
    padding: 0; flex: none;
}
.gallery-thumb.is-active { border-color: var(--pink); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.product-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 10px; line-height: 1.4; }
.product-price { font-size: 1.5rem; font-weight: 800; margin-bottom: 14px; }
.product-desc { color: var(--ink-soft); margin-bottom: 22px; }
.option-group { margin-bottom: 18px; }
.option-label { font-weight: 700; font-size: .9rem; margin-bottom: 8px; display: block; }
.option-values { display: flex; gap: 8px; flex-wrap: wrap; }
.option-values input { position: absolute; opacity: 0; pointer-events: none; }
.option-values label {
    border: 1px solid var(--line); background: var(--white);
    border-radius: var(--btn-radius); padding: 8px 18px;
    font-size: .85rem; font-weight: 600; cursor: pointer;
    transition: all .15s ease;
}
.option-values input:checked + label { background: var(--ink); color: #fff; border-color: var(--ink); }

.qty-row { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.qty-box { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--btn-radius); overflow: hidden; background: #fff; }
.qty-box button { border: none; background: none; width: 40px; height: 42px; font-size: 1.15rem; color: var(--ink); }
.qty-box input { width: 52px; border: none; text-align: center; font-family: inherit; font-weight: 700; font-size: .95rem; color: var(--ink); }
.qty-box input:focus { outline: none; }

.meta-list { border-top: 1px solid var(--line); padding-top: 16px; font-size: .88rem; }
.meta-list div { display: flex; gap: 10px; padding: 5px 0; color: var(--ink-soft); }
.meta-list strong { color: var(--ink); font-weight: 700; min-width: 110px; }

/* ------------------------- تبويبات صفحة المنتج -------------------------- */
.product-tabs-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.product-tabs-btn {
    border: none; background: none; font-family: inherit; font-size: .92rem; font-weight: 700;
    color: var(--ink-soft); padding: 10px 4px; margin-inline-end: 22px; cursor: pointer;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.product-tabs-btn.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.product-tabs-pane { display: none; }
.product-tabs-pane.is-active { display: block; }
.spec-list { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.spec-list li {
    display: flex; justify-content: space-between; gap: 14px; padding: 9px 0;
    border-bottom: 1px solid var(--line); color: var(--ink-soft);
}
.spec-list li:last-child { border-bottom: none; }
.spec-list li b { color: var(--ink); font-weight: 700; text-align: end; }

/* --------------------------------- السلّة ------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1.7fr 1fr; gap: 26px; margin: 26px 0; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h3 { margin: 0 0 16px; font-size: 1.05rem; font-weight: 800; }

.cart-line { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.cart-line-img { width: 86px; height: 86px; border-radius: var(--radius-sm); overflow: hidden; background: var(--pink-50); flex: none; }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-body { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: .93rem; margin-bottom: 4px; }
.cart-line-variant { font-size: .8rem; color: var(--ink-soft); margin-bottom: 8px; }
.cart-line-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-danger { color: var(--danger); font-size: .82rem; background: none; border: none; padding: 0; font-weight: 600; }

.totals { font-size: .92rem; }
.totals div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; }
.totals .grand { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; font-weight: 800; }

.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row input {
    flex: 1; min-width: 0;
    border: 1px solid var(--line); border-radius: var(--btn-radius);
    padding: 10px 16px; font-family: inherit; font-size: .86rem; color: var(--ink);
}
.coupon-row input:focus { outline: none; border-color: var(--pink); }

/* -------------------------------- النماذج ------------------------------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: .87rem; margin-bottom: 7px; }
.field input, .field textarea, .field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 11px 15px;
    font-family: inherit; font-size: .92rem;
    background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--pink); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.radio-card { display: block; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 10px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--pink); background: var(--pink-50); }
.radio-card input { margin-inline-end: 8px; accent-color: var(--pink); }
.radio-card small { display: block; color: var(--ink-soft); margin-top: 4px; }

/* ------------------------------- التنبيهات ------------------------------ */
.alert-shop { border-radius: var(--radius-sm); padding: 12px 16px; margin: 16px 0; font-size: .89rem; font-weight: 600; }
.alert-ok { background: rgba(47,174,96,.12); color: #1d6d3c; }
.alert-err { background: rgba(225,26,44,.1); color: #8f0d19; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty-state h3 { color: var(--ink); margin: 0 0 8px; }

/* -------------------------------- الفوتر -------------------------------- */
/* ------------------------- مميزات متجرنا ------------------------- */
.store-features { padding: 46px 0 10px; }

.store-features-head { margin-bottom: 26px; }

.store-features-head h2 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: var(--heading);
}

/* علامة اقتباس صغيرة تحت العنوان، فوق خطّ فاصل باهت */
.store-features-head {
    border-bottom: 1px solid var(--line);
    padding-bottom: 14px;
    position: relative;
}

.store-features-mark {
    display: inline-block;
    width: 22px; height: 10px;
    background:
        linear-gradient(var(--pink), var(--pink)) 0 0 / 8px 10px no-repeat,
        linear-gradient(var(--pink), var(--pink)) 14px 0 / 8px 10px no-repeat;
    border-radius: 2px;
    opacity: .85;
}

.store-features-grid {
    display: grid;
    /* ثلاثة أعمدة على الشاشات الواسعة؛ auto-fit وحده يعطي أربعة
       فيترك صفًّا أخيرًا ناقصًا */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

@media (min-width: 900px) {
    .store-features-grid { grid-template-columns: repeat(3, 1fr); }
}

.feature-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px 20px 24px;
    text-align: center;
}

/* الرقم الكبير الباهت خلف البطاقة — زخرفة لا يقرأها قارئ الشاشة */
.feature-card-number {
    position: absolute;
    inset-inline-start: 14px;
    bottom: -18px;
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    /* شفافية منخفضة لا لون ثابت: يبقى الرقم زخرفة خافتة مهما
       كانت ألوان المتجر، ولا يزاحم قراءة الوصف فوقه. */
    color: var(--heading);
    opacity: .08;
    pointer-events: none;
    user-select: none;
}

.feature-card-icon {
    color: var(--pink);
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
}

.feature-card h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 1rem;
    color: var(--heading);
}

.feature-card p {
    position: relative;
    margin: 0;
    font-size: .84rem;
    line-height: 1.9;
    color: var(--ink-soft);
}

/* ---------------------- الموجة فوق التذييل ---------------------- */
.footer-wave {
    /* ملاصقة للتذييل: هامش سفلي سالب بقدر بكسل يمنع الشعرة البيضاء
       التي تظهر بين الـ SVG والتذييل عند بعض نسب التكبير. */
    margin-top: 50px;
    margin-bottom: -1px;
    line-height: 0;
}

.footer-wave-svg {
    display: block;
    width: 100%;
    height: 90px;
}

/* طبقات الموجة تأخذ لون التذييل، والشفافية في الترميز تصنع العمق */
.footer-wave-layers use { fill: var(--footer-bg); }

/* كل طبقة تنزلق بسرعة مختلفة فينشأ اختلاف منظري (‏parallax‏) */
.footer-wave-layers use:nth-child(1) { animation: footer-wave-move 7s cubic-bezier(.55,.5,.45,.5) infinite; }
.footer-wave-layers use:nth-child(2) { animation: footer-wave-move 10s cubic-bezier(.55,.5,.45,.5) infinite; }
.footer-wave-layers use:nth-child(3) { animation: footer-wave-move 13s cubic-bezier(.55,.5,.45,.5) infinite; }
.footer-wave-layers use:nth-child(4) { animation: footer-wave-move 20s cubic-bezier(.55,.5,.45,.5) infinite; }

@keyframes footer-wave-move {
    from { transform: translate3d(-90px, 0, 0); }
    to   { transform: translate3d(85px, 0, 0); }
}

/* من يطلب تقليل الحركة يرى موجة ساكنة */
@media (prefers-reduced-motion: reduce) {
    .footer-wave-layers use { animation: none; }
}

/* التذييل يلي الموجة مباشرة، فلا هامش علوي له */
.footer-wave + .shop-footer { margin-top: 0; }

@media (max-width: 640px) {
    .footer-wave-svg { height: 56px; }
    .footer-wave { margin-top: 34px; }
    .store-features { padding-top: 30px; }
    .feature-card-number { font-size: 4rem; }
}

.shop-footer { background: var(--footer-bg); color: rgba(255,255,255,.78); margin-top: 60px; padding: 46px 0 22px; }
.shop-footer h4 { color: #fff; font-size: .98rem; margin: 0 0 14px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.shop-footer ul { list-style: none; margin: 0; padding: 0; }
.shop-footer li { padding: 5px 0; font-size: .87rem; }
.shop-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 30px; padding-top: 18px; font-size: .8rem; text-align: center; }

/* ------------------------------- الترقيم -------------------------------- */
.pagination-shop { display: flex; justify-content: center; gap: 6px; margin: 32px 0; flex-wrap: wrap; }
.pagination-shop a, .pagination-shop span {
    min-width: 40px; height: 40px; padding: 0 12px;
    border-radius: var(--btn-radius); border: 1px solid var(--line); background: #fff;
    display: grid; place-items: center; font-size: .86rem; font-weight: 600;
}
.pagination-shop .active span, .pagination-shop a:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination-shop .disabled span { opacity: .4; }

/* -------------------------------- الجوال -------------------------------- */
@media (max-width: 900px) {
    .shop-hero { grid-template-columns: 1fr; }
    .shop-hero-media { display: none; }
    .shop-hero-text { padding: 28px 22px; }
    .shop-hero h1 { font-size: 1.5rem; }
    .product-page { grid-template-columns: 1fr; gap: 24px; }
    .cart-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
    .shop-search { order: 3; flex-basis: 100%; }
    .shop-header-row { flex-wrap: wrap; }
}

@media (max-width: 560px) {
    .field-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
}

/* ==========================================================================
   رمز الدرهم الإماراتي
   --------------------------------------------------------------------------
   الـ SVG لا يحمل width/height، فبدون هذه القواعد يصيّره المتصفح بمقاس
   العنصر المستبدَل الافتراضي (300px) بدل ارتفاع النص.
   وفقًا لدليل العلامة: الرمز يسبق الرقم، وارتفاعه = ارتفاع النص،
   وبينهما فراغ ثابت، ولا يُجمع الرمز مع كلمة AED إطلاقًا.
   ========================================================================== */
.currency-symbol {
    width: 0.82em;
    height: 0.82em;
    display: inline-block;
    vertical-align: -0.06em;
    flex: none;
}

.currency-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28em;
    direction: ltr;
    unicode-bidi: isolate;
    white-space: nowrap;
}

.currency-amount .currency-symbol {
    align-self: center;
}

.currency-value {
    font-variant-numeric: tabular-nums;
}

/* السعر المشطوب: الرمز يرث اللون الباهت ودرجة الشفافية نفسها */
.price-old .currency-symbol,
.price-old .currency-value {
    color: inherit;
}

/* مبدّل اللغة في الرأس: يعرض اسم اللغة كاملًا، فيأخذ شكل قرص ممدود
   بدل الزر الدائري حتى تتسع الكلمة دون قصّ. */
.shop-lang {
    width: auto;
    min-width: 0;
    padding: 0 14px;
    border-radius: var(--btn-radius);
}

.shop-lang span {
    font-weight: 700;
    font-size: .82rem;
    line-height: 1;
    white-space: nowrap;
}

/* ==========================================================================
   شريط البانرات أسفل القائمة الرئيسية
   بانر رئيسي عريض بشرائح متعاقبة + بانر فرعي مربّع بجانبه.
   ========================================================================== */
.banner-strip {
    display: grid;
    grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 16px;
    margin: 18px 0 30px;
}

/* ------------------------------ الرئيسي ------------------------------ */
.banner-main {
    position: relative;
    border-radius: var(--radius-lg, 18px);
    overflow: hidden;
    background: var(--surface-2, #f3f0ec);
    aspect-ratio: 5 / 2;
}

.banner-slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    text-decoration: none;
}

.banner-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.banner-slide img,
.banner-side-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* طبقة تعتيم متدرّجة من جهة النص لضمان تباين العنوان فوق أي صورة */
.banner-slide::after,
.banner-side-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, 0) 78%);
}

[dir="ltr"] .banner-slide::after,
[dir="ltr"] .banner-side-item::after {
    background: linear-gradient(to right, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .34) 45%, rgba(0, 0, 0, 0) 78%);
}

.banner-copy {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 14px;
    padding: 0 clamp(18px, 4vw, 42px);
    max-width: 62%;
    color: #fff;
}

.banner-copy h2 {
    margin: 0;
    font-size: clamp(1.15rem, 2.6vw, 2rem);
    font-weight: 800;
    line-height: 1.28;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.banner-copy h3 {
    margin: 0;
    font-size: clamp(.95rem, 2.4vw, 1.2rem);
    font-weight: 800;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* داخل رابط البانر لا نضع <button>، فالـ span يأخذ شكل الزر فقط */
.banner-copy .btn-shop {
    pointer-events: none;
}

.banner-side-item .banner-copy {
    gap: 8px;
    max-width: 78%;
}

.banner-side-item .banner-copy span {
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid currentColor;
    padding-bottom: 2px;
}

/* ------------------------- مؤشّرات الشرائح ------------------------- */
.banner-dots {
    position: absolute;
    z-index: 3;
    inset-block-end: 14px;
    inset-inline-end: 16px;
    display: flex;
    gap: 7px;
}

.banner-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: background .25s, width .25s;
}

.banner-dots button.is-active {
    width: 22px;
    border-radius: 5px;
    background: #fff;
}

.banner-counter {
    position: absolute;
    z-index: 3;
    inset-block-start: 14px;
    inset-inline-end: 16px;
    font-size: .72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, .38);
    border-radius: var(--btn-radius);
    padding: 3px 10px;
    letter-spacing: .04em;
}

/* -------------------------------- الفرعي -------------------------------- */
/* العمود الجانبي يقسم ارتفاع الشريط بالتساوي بين بطاقاته. */
.banner-side {
    display: grid;
    gap: 16px;
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
}

.banner-side-item {
    position: relative;
    display: block;
    min-height: 0;
    border-radius: var(--radius-lg, 18px);
    overflow: hidden;
    text-decoration: none;
    background: var(--surface-2, #f3f0ec);
}

/* ------------------------------- استجابة ------------------------------- */
@media (max-width: 900px) {
    .banner-strip {
        grid-template-columns: 1fr;
    }

    .banner-side {
        grid-template-columns: repeat(2, 1fr);
    }

    .banner-side-item {
        aspect-ratio: 3 / 2;
        min-height: 120px;
    }
}

@media (max-width: 560px) {
    .banner-main {
        aspect-ratio: 16 / 10;
    }

    .banner-copy {
        max-width: 82%;
    }
}

/* ==========================================================================
   مؤثّرات زيادة/نقصان الكمية
   --------------------------------------------------------------------------
   منقولة عن Aaron Iker (codepen.io/aaroniker/pen/eqmWvQ): الرقم الجديد يُضاف
   فوق الحالي أو تحته ثم ينزلق المسار 100% في 0.3s linear، مع ارتداد
   36% scaleY(.9) على الصندوق. بلا jQuery وبلا فيزياء canvas — المتجر
   يتعمّد ألّا يحمّل مكتبات ثقيلة.
   ========================================================================== */
.qty-roll {
    width: 52px;
    height: 42px;
    position: relative;
    overflow: hidden;
    text-align: center;
    font-weight: 700;
    font-size: .95rem;
    color: var(--ink);
    user-select: none;
}

.qty-roll-track {
    display: block;
    position: relative;
}

.qty-roll-track span {
    display: block;
    width: 100%;
    height: 42px;
    line-height: 42px;
}

/* النسخة القادمة تُركن خارج الإطار: أعلاه عند النقصان، أسفله عند الزيادة */
.qty-roll-track span.before {
    position: absolute;
    inset-inline-start: 0;
    bottom: 100%;
}

.qty-roll-track span.after {
    position: absolute;
    inset-inline-start: 0;
    top: 100%;
}

.qty-roll.moveUp .qty-roll-track {
    animation: qtyMoveUp .3s linear forwards;
}

.qty-roll.moveDown .qty-roll-track {
    animation: qtyMoveDown .3s linear forwards;
}

@keyframes qtyMoveUp {
    100% { transform: translateY(-100%); }
}

@keyframes qtyMoveDown {
    100% { transform: translateY(100%); }
}

/* ارتداد الصندوق كما في البِن الأصلي */
.qty-box.bounce {
    animation: qtyBounce .3s linear;
}

@keyframes qtyBounce {
    36% { transform: scaleY(.9); }
}

/* استجابة الزرّ للضغط */
.qty-box button {
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .12s ease;
}

.qty-box button:hover:not(:disabled) {
    background: var(--pink-50);
}

.qty-box button:active:not(:disabled) {
    transform: scale(.86);
}

/* عند بلوغ الحد لا يتحرّك الرقم، فنوضّح ذلك بالزرّ */
.qty-box button:disabled {
    opacity: .32;
    cursor: not-allowed;
}

/* نفضة قصيرة عند محاولة تجاوز الحد */
.qty-box.at-limit {
    animation: qtyNudge .24s ease;
}

@keyframes qtyNudge {
    30% { transform: translateX(-3px); }
    70% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
    .qty-roll.moveUp .qty-roll-track,
    .qty-roll.moveDown .qty-roll-track,
    .qty-box.bounce,
    .qty-box.at-limit {
        animation: none;
    }

    .qty-box button:active:not(:disabled) {
        transform: none;
    }
}

/* أيقونة حقيبة التسوّق: خطوطها أرفع من أيقونات الرأس المحدَّدة،
   فنكبّرها قليلًا ليتساوى ثقلها البصري معها. */
.shop-icon-btn .icon-bag {
    width: 23px;
    height: 23px;
}

/* ==========================================================================
   حقيبة التسوّق ثلاثية الأبعاد في ملقّم الكمية
   --------------------------------------------------------------------------
   منقولة عن Aaron Iker — codepen.io/aaroniker/pen/eqmWvQ، بالهندسة
   والتحويلات والتوقيتات نفسها (perspective 64px، clip-path للفتحة،
   ‏transition .5s/.7s ease، ارتداد 36% scaleY(.9)).
   الفارق الوحيد: مقبض الحقيبة في البِن يُرسم على canvas بمحرّك فيزياء
   verlet يعمل بـ setInterval كل 30ms بلا توقّف — استبدلناه بمقبض CSS
   ينحني مع الارتداد، لأن تشغيل حلقة فيزياء دائمة في صفحة منتج هدر خالص.
   ========================================================================== */
.shopping-bag {
    --stroke: var(--ink);
    --stroke-light: var(--ink-soft);
    --bag-bg: #fff;
    --bag-inner: var(--pink-100);
    position: relative;
    zoom: 1.7;
    flex: none;
    margin: 0 6px;
}

.shopping-bag .bag {
    perspective: 64px;
    position: relative;
    transform-origin: 50% 100%;
}

.shopping-bag .bag .front,
.shopping-bag .bag .back,
.shopping-bag .bag .inner {
    --x: 0;
    --y: 0;
    --z: 0;
    --r: 24deg;
    --s: 1;
    --sx: 1;
    width: 32px;
    position: relative;
    backface-visibility: hidden;
    transition: transform .5s ease, clip-path .7s ease;
    transform-origin: 50% 100%;
    border-radius: 2px;
    transform: translate3d(var(--x), var(--y), var(--z))
               rotateX(var(--r)) scaleY(var(--s)) scaleX(var(--sx));
}

.shopping-bag .bag .front,
.shopping-bag .bag .back {
    background: var(--bag-bg);
    border: 2px solid var(--stroke);
}

.shopping-bag .bag .front {
    --z: 1px;
    z-index: 3;
    height: 32px;
}

/* الخط الأفقي أسفل واجهة الحقيبة */
.shopping-bag .bag .front:before {
    content: "";
    position: absolute;
    height: 2px;
    border-radius: 1px;
    bottom: 4px;
    left: 5px;
    right: 5px;
    background: var(--stroke-light);
}

.shopping-bag .bag .back,
.shopping-bag .bag .inner {
    position: absolute;
    top: 0;
}

.shopping-bag .bag .back {
    --r: 0deg;
    --y: 4px;
    --sx: .73;
    --s: .8;
    --z: -20px;
    height: 10px;
    left: 0;
}

/* فتحة الحقيبة: تنقلب للخلف وتضيق حوافها عند الفتح */
.shopping-bag .bag .inner {
    --x: -50%;
    --y: -105%;
    --r: -130deg;
    --offset: 10px;
    height: 22px;
    left: 50%;
    background: var(--stroke);
    clip-path: polygon(6px 0, 26px 0, calc(32px - var(--offset)) 8px, 32px 22px, 0 22px, var(--offset) 8px);
}

.shopping-bag .bag .inner:before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bag-inner);
    clip-path: polygon(6px 0, 26px 0, calc(32px - var(--offset)) 8px, 32px 22px, 0 22px, var(--offset) 8px);
    transform: scale(.76);
    transition: clip-path .7s ease;
}

/* الحبل: بديل SVG عن حبل الفيزياء على canvas في البِن.
   مسار مقوّس بأطراف مدوّرة — الحدود وحدها تُنتج نتوءين رأسيين لأنها
   تحيط بصندوق لا بمنحنى. عند الفتح يتدلّى داخل الفوهة، وعند الإغلاق
   ينقلب مقبضًا منتصبًا فوق الحقيبة. */
.shopping-bag .handle {
    position: absolute;
    left: 50%;
    top: 0;
    z-index: 4;
    width: 20px;
    height: 12px;
    /* التوسيط فيزيائي لأن left فيزيائي: margin-inline-start في RTL هو
       margin-right فلا يوسّط. والإزاحة الرأسية لأن .front مُحوَّل ثلاثيًا،
       فحافّته المرئية أخفض من صندوق تخطيطه بنحو 10px. */
    margin-left: -10px;
    margin-top: 10px;
    overflow: visible;
    fill: none;
    stroke: var(--stroke);
    stroke-width: 2;
    stroke-linecap: round;
    transform-origin: 50% 0;
    transition: transform .5s ease;
}

.shopping-bag:not(.open) .handle {
    margin-top: 1px;
    transform: scaleY(-1);
    transform-origin: 50% 100%;
}

/* --------------------------- عدّاد الكمية --------------------------- */
.shopping-bag .count {
    --o: 0;
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: .5rem;
    text-align: center;
    font-weight: 700;
    border-radius: 50%;
    background: var(--pink);
    color: #fff;
    top: 100%;
    left: 50%;
    overflow: hidden;
    position: absolute;
    transform: translate(-50%, 8px);
    opacity: var(--o);
    transition: opacity .3s ease;
}

.shopping-bag .count div span {
    display: block;
    width: 18px;
    height: 18px;
    line-height: 18px;
}

.shopping-bag .count div span.before,
.shopping-bag .count div span.after {
    left: 0;
    position: absolute;
}

.shopping-bag .count div span.before { bottom: 100%; }
.shopping-bag .count div span.after  { top: 100%; }

.shopping-bag .count.moveUp div   { animation: bagMoveUp .3s linear forwards; }
.shopping-bag .count.moveDown div { animation: bagMoveDown .3s linear forwards; }

/* ------------------------------ الحالات ------------------------------ */
.shopping-bag:not(.open) .bag .inner { transition-delay: .01s; }

.shopping-bag.open .bag .front { --r: -20deg; --s: .65; }
.shopping-bag.open .bag .inner { --r: -64deg; --offset: 7px; }
.shopping-bag.open .bag .back  { --z: 8px; }
.shopping-bag.open .handle     { transform: translateY(1px) scaleY(1.2); }

.shopping-bag.open.bounce .bag { animation: bagBounce .3s linear; }
.shopping-bag.counted .count   { --o: 1; }

@keyframes bagBounce {
    36% { transform: scaleY(.9); }
}

@keyframes bagMoveUp {
    100% { transform: translateY(-100%); }
}

@keyframes bagMoveDown {
    100% { transform: translateY(100%); }
}

/* الصندوق الحاوي: العدّاد يقع تحت الحقيبة، فنرفع القصّ ونفسح له مكانًا.
   ‏.qty-box الأصلي يحمل overflow:hidden لتدوير أطراف الأزرار، وهو ما كان
   يقصّ العدّاد. */
.qty-box.qty-box--bag {
    overflow: visible;
    border-radius: 26px;
    padding: 12px 6px 42px;
    align-items: center;
}

.qty-box.qty-box--bag button {
    height: 34px;
    border-radius: 50%;
}

@media (prefers-reduced-motion: reduce) {
    .shopping-bag .bag .front,
    .shopping-bag .bag .back,
    .shopping-bag .bag .inner,
    .shopping-bag .bag .inner:before,
    .shopping-bag .handle {
        transition: none;
    }

    .shopping-bag.open.bounce .bag,
    .shopping-bag .count.moveUp div,
    .shopping-bag .count.moveDown div {
        animation: none;
    }
}

/* ==========================================================================
   شريط إيفورك الثابت أسفل الصفحة
   --------------------------------------------------------------------------
   يبقى مثبّتًا في أسفل النافذة فوق كل المحتوى، بخلفية بيضاء وشعار في
   المنتصف. الجسم يأخذ حشوًا سفليًا بمقدار ارتفاعه حتى لا يغطّي آخر
   الفوتر.
   ========================================================================== */
:root {
    --evorq-bar-h: 46px;
}

body.shop {
    padding-bottom: var(--evorq-bar-h);
}

.evorq-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 60;
    height: var(--evorq-bar-h);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-top: 1px solid var(--line);
    box-shadow: 0 -2px 12px rgba(82, 27, 37, .06);
}

.evorq-bar a {
    display: flex;
    align-items: center;
    line-height: 0;
    padding: 0 16px;
    max-width: 100%;
}

.evorq-bar img {
    height: 20px;
    width: auto;
    max-width: 100%;
    display: block;
}

@media (max-width: 560px) {
    :root { --evorq-bar-h: 40px; }

    .evorq-bar img { height: 15px; }
}

/* عند الطباعة لا معنى لشريط مثبّت */
@media print {
    .evorq-bar { display: none; }
    body.shop { padding-bottom: 0; }
}

/* شعار البوّابة داخل بطاقة طريقة الدفع */
.radio-card .pay-logo {
    height: 16px;
    width: auto;
    vertical-align: -3px;
    margin-inline-end: 8px;
    border-radius: 3px;
}

.alert-shop.alert-warn {
    background: #fff7e6;
    border: 1px solid #f0d9a8;
    color: #8a6410;
}

/* ==========================================================================
   بطاقات التصنيفات المميّزة — شبه مربّعة
   ========================================================================== */
.cat-grid--square .cat-card-img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cat-grid--square .cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-grid--square .cat-card-name {
    text-align: center;
    padding: 10px 8px 4px;
    font-size: .86rem;
    line-height: 1.35;
}

/* ==========================================================================
   عروض لفترة محدودة
   --------------------------------------------------------------------------
   لوحة العرض والمنتجات في صفّ واحد: اللوحة بعرض ثابت والمنتجات تتمدّد
   لتملأ ما تبقّى (auto-fit) مهما كان عددها، فلا يبقى فراغ ميّت.
   ========================================================================== */
/* القسم كلّه داخل صندوق واحد: لوحة العرض والمنتجات معًا */
.flash-sale {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    margin: 34px 0;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.flash-promo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    padding: 22px 20px;
    border-radius: var(--radius);
    background: linear-gradient(150deg, var(--ink) 0%, #7a2c3a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* وهج خفيف في الزاوية يكسر تسطّح الخلفية */
.flash-promo::after {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    top: -40px;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(240, 139, 176, .28);
}

.flash-promo h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    position: relative;
}

.flash-promo .flash-badge {
    display: inline-block;
    background: var(--gold);
    color: var(--ink);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 5px 11px;
    border-radius: var(--btn-radius);
    white-space: nowrap;
    position: relative;
}

.flash-link {
    position: relative;
    font-size: .82rem;
    font-weight: 700;
    color: #fff;
    border-bottom: 2px solid var(--pink);
    padding-bottom: 2px;
}

/* العدّاد: أقراص متساوية العرض بأرقام جدوليّة حتى لا تهتزّ مع الثواني */
.flash-timer {
    display: flex;
    gap: 7px;
    position: relative;

    /* **بلا `direction: ltr`**: كان يقلب ترتيب الخانات في العربية فتُقرأ
       من اليمين ثوانيَ ثمّ دقائقَ ثمّ ساعاتٍ ثمّ أيامًا — أي من الأصغر إلى
       الأكبر، عكس ما يقرؤه الناس.

       وُضع أصلًا لتبقى الأرقام غربيةً غير مقلوبة، وهو غير لازم: الأرقام
       داخل كل خانة نصٌّ قصير لا يُقلب، والاتجاه إنّما يرتّب الخانات.
       فيرثه الصفّ من الصفحة الآن: أيامٌ في اليمين وثوانٍ في اليسار عربيةً،
       والعكس إنجليزيةً — والأكبر أوّلًا في الحالين. */
}

.flash-timer div {
    min-width: 44px;
    text-align: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 11px;
    padding: 6px 5px 5px;
    backdrop-filter: blur(2px);
}

.flash-timer b {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.flash-timer span {
    display: block;
    font-size: .6rem;
    color: rgba(255, 255, 255, .8);
    margin-top: 2px;
}

/* ------------------------- الشريط المنزلق -------------------------
   المنتجات قد تكون كثيرة، فتُمرَّر أفقيًا. المسار نفسه هو ما ينزلق،
   والسهمان يطفوان فوق حافّتيه. --------------------------------------- */
.flash-slider {
    position: relative;
    min-width: 0;
    display: flex;
    align-items: center;
}

.flash-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 2px;
    width: 100%;
    cursor: grab;
}

.flash-track::-webkit-scrollbar {
    display: none;
}

.flash-track.is-dragging {
    cursor: grabbing;
    scroll-behavior: auto;
    scroll-snap-type: none;
    user-select: none;
}

/* grow:1 يجعل البطاقات تتمدّد لملء الصف حين تقلّ فلا يبقى فراغ،
   و shrink:0 مع أساس 196px يمنع انضغاطها حين تكثر فينزلق الشريط. */
.flash-track > * {
    flex: 1 0 196px;
    scroll-snap-align: start;
}

.slider-nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--white);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(82, 27, 37, .14);
    transition: opacity .2s ease, background .2s ease;
}

.slider-nav svg {
    width: 16px;
    height: 16px;
}

/* السهمان منطقيّان: «السابق» عند بداية القراءة و«التالي» عند نهايتها */
.slider-prev { inset-inline-start: -6px; }
.slider-next { inset-inline-end: -6px; }

/* في RTL تنعكس أيقونتا السهمين مع اتجاه القراءة */
[dir="rtl"] .slider-nav svg { transform: scaleX(-1); }

.slider-nav:hover:not(:disabled) { background: var(--pink-50); }

.slider-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 900px) {
    .flash-sale {
        grid-template-columns: 1fr;
    }

    .flash-promo {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
    }
}

@media (max-width: 560px) {
    .flash-timer div { min-width: 38px; }

    .flash-promo h2 { font-size: 1.1rem; }
}

/* شعار البوّابة داخل بطاقة طريقة الدفع */
.radio-card .pay-logo {
    height: 16px;
    width: auto;
    vertical-align: -3px;
    margin-inline-end: 8px;
    border-radius: 3px;
}

.alert-shop.alert-warn {
    background: #fff7e6;
    border: 1px solid #f0d9a8;
    color: #8a6410;
}

/* ==========================================================================
   بطاقات التصنيفات المميّزة — شبه مربّعة
   ========================================================================== */
.cat-grid--square .cat-card-img {
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.cat-grid--square .cat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cat-grid--square .cat-card-name {
    text-align: center;
    padding: 10px 8px 4px;
    font-size: .86rem;
    line-height: 1.35;
}


/* ترويسة قسم موسّطة بلا رابط جانبي */
.section-head--center {
    justify-content: center;
    text-align: center;
}

/* شبكة موسّطة: auto-fill يخلّف مسارات فارغة تزيح البطاقات جانبًا،
   و auto-fit مع justify-content يبقيها في المنتصف مهما كان عددها. */
.cat-grid--center {
    grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
    justify-content: center;
}

/* ترويسة صفحة العرض المحدود */
.flash-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin: 26px 0 22px;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: linear-gradient(150deg, var(--ink) 0%, #7a2c3a 100%);
    color: #fff;
}

.flash-page-head h2 {
    margin: 10px 0 2px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
}

.flash-page-head p {
    margin: 0;
    font-size: .85rem;
    color: rgba(255, 255, 255, .78);
}

/* ==========================================================================
   عناوين العميل
   ========================================================================== */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.address-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.address-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.address-card-head strong {
    font-size: 1rem;
    font-weight: 800;
}

.address-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: .82rem;
    font-weight: 700;
}

.address-actions a { color: var(--pink-dark); }
.address-actions form { display: inline; }

.address-line {
    font-size: .88rem;
    line-height: 1.7;
}

.address-line--muted { color: var(--ink-soft); }

.address-pin {
    display: inline-block;
    margin-top: 10px;
    font-size: .74rem;
    font-weight: 700;
    color: var(--ok);
    background: rgba(47, 174, 96, .1);
    border-radius: var(--btn-radius);
    padding: 3px 10px;
}

/* -------------------------------- النموذج ------------------------------- */
.address-form {
    max-width: 720px;
    margin: 20px 0;
}

.field-hint {
    display: block;
    margin-top: 4px;
    font-size: .74rem;
    color: var(--ink-soft);
}

/* تنبيه داخل النموذج: خارج نطاق التوصيل أو لا مناطق مضبوطة */
.form-note {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .82rem;
    line-height: 1.6;
}

.form-note--warn {
    background: #fff4e5;
    color: #8a5300;
    border-inline-start: 3px solid #f0a437;
}

.form-note--ok {
    background: #e9f7ef;
    color: #1c6b3f;
    border-inline-start: 3px solid #34a853;
}

.address-form input[readonly] {
    background: var(--pink-50);
    cursor: default;
}

.map-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.map-status {
    font-size: .8rem;
    color: var(--ink-soft);
}

.map-status.is-busy::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-inline-start: 6px;
    border: 2px solid var(--line);
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: mapSpin .7s linear infinite;
    vertical-align: -1px;
}

@keyframes mapSpin {
    to { transform: rotate(360deg); }
}

.address-map {
    height: 320px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    overflow: hidden;
    z-index: 0;
}

/* أسماء الأماكن على البلاطات لاتينية، فنعيدها لاتجاهها الطبيعي */
.address-map .leaflet-container {
    direction: ltr;
    font-family: inherit;
}

@media (max-width: 560px) {
    .address-map { height: 260px; }
}

/* الفوتر: عمود المعلومات أضيف فوق الثلاثة الأصلية، والأخير للنشرة —
   `minmax` تضمن له عرضًا يسع الحقل والزرّ لا كسرًا في منتصف الكلمة */
.footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr minmax(240px, 1.3fr); }

@media (max-width: 1000px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .footer-grid { grid-template-columns: 1fr; }
}

/* أيقونات التواصل الاجتماعي */
.social-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.social-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    transition: background .18s ease, transform .18s ease;
}

.social-btn:hover {
    background: var(--pink);
    transform: translateY(-2px);
}

.social-btn svg { width: 17px; height: 17px; }

.social-btn span { font-size: .85rem; font-weight: 800; }

/* محتوى الصفحات التعريفية محرَّر من اللوحة، فنضبط قراءته */
.page-content {
    max-width: 860px;
    line-height: 1.9;
    font-size: .94rem;
}

.page-content h1,
.page-content h2,
.page-content h3 { margin: 22px 0 10px; font-weight: 800; }

.page-content h1 { font-size: 1.3rem; }
.page-content h2 { font-size: 1.15rem; }
.page-content h3 { font-size: 1rem; }
.page-content p { margin: 0 0 12px; }
.page-content ul,
.page-content ol { padding-inline-start: 22px; margin: 0 0 12px; }
.page-content li { margin-bottom: 6px; }
.page-content img { border-radius: var(--radius-sm); margin: 12px 0; }
.page-content a { color: var(--pink-dark); text-decoration: underline; }

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.page-content th,
.page-content td {
    border: 1px solid var(--line);
    padding: 8px 10px;
    text-align: start;
}

/* الهاتف والبريد نصّان لاتينيان: dir=ltr على العنصر السطري وحده حتى
   يُقرآ من اليسار بينما يبقى السطر محاذيًا لاتجاه الصفحة كبقية البيانات. */
.footer-phone,
.footer-ltr {
    display: inline-block;
    unicode-bidi: isolate;
}

.footer-address {
    line-height: 1.7;
    opacity: .9;
}

/* ==========================================================================
   زر واتساب العائم
   يجلس فوق شريط إيفورك الثابت لا خلفه، ويتّسع عند المرور ليظهر نصّه.
   ========================================================================== */
/* التخصيص هنا يطابق body.shop a (0,1,1) وإلا ورث الزرّ لون النص
   العنّابي من تلك القاعدة فبدت الأيقونة داكنة على الأخضر. */
body.shop a.wa-float {
    position: fixed;
    z-index: 70;
    /* موضع فيزيائي لا منطقي: زر واتساب يُتوقَّع في أسفل اليمين دائمًا،
       و inset-inline-end كان يقلبه إلى اليسار في الواجهة العربية. */
    right: 18px;
    bottom: calc(var(--evorq-bar-h) + 16px);
    height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 15px;
    border-radius: var(--btn-radius);
    background: #25d366;
    color: #fff;
    box-shadow: 0 8px 26px rgba(37, 211, 102, .42);
    transition: transform .18s ease, box-shadow .18s ease;
    overflow: hidden;
}

.wa-float svg {
    width: 26px;
    height: 26px;
    flex: none;
}

/* النص مطوي افتراضيًا وينفتح عند المرور أو التركيز بلوحة المفاتيح */
.wa-float-label {
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    font-size: .86rem;
    font-weight: 700;
    transition: max-width .28s ease, opacity .2s ease;
}

.wa-float:hover,
.wa-float:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37, 211, 102, .5);
}

.wa-float:hover .wa-float-label,
.wa-float:focus-visible .wa-float-label {
    max-width: 220px;
    opacity: 1;
}

@media (max-width: 560px) {
    body.shop a.wa-float {
        right: 12px;
        height: 48px;
        padding: 0 12px;
    }

    .wa-float svg { width: 24px; height: 24px; }

    /* على الهاتف لا يوجد مرور بالمؤشّر، فالنص يبقى مطويًا */
    .wa-float-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .wa-float,
    .wa-float-label { transition: none; }
}

/* ==========================================================================
   أنماط الترويسة — تُختار من /admin/business-settings/site-identity
   ========================================================================== */

/* ------------------ الشعار في الوسط مع الاسم بلغتيه ------------------ */
.shop-header--centered_bilingual .shop-header-row {
    flex-direction: column;
    gap: 12px;
    padding: 14px 0;
}

.shop-header--centered_bilingual .shop-logo {
    order: -1;
    flex-direction: column;
    text-align: center;
    gap: 6px;
}

.shop-header--centered_bilingual .shop-search {
    width: min(560px, 100%);
    order: 1;
}

/* الأزرار (السلة واللغة والحساب) في الزاوية العليا اليسرى بدل أن تكون
   موسّطة تحت البحث. الموضع فيزيائي لا منطقي: المطلوب اليسار في اللغتين. */
.shop-header--centered_bilingual .shop-header-row {
    position: relative;
}

.shop-header--centered_bilingual .shop-actions {
    position: absolute;
    top: 0;
    left: 0;
    order: 0;
}

@media (max-width: 640px) {
    /* على الشاشات الضيّقة لا مكان للزاوية، فتعود الأزرار إلى التدفّق */
    .shop-header--centered_bilingual .shop-actions {
        position: static;
        order: 2;
    }
}

.shop-header--centered_bilingual .shop-nav ul {
    justify-content: center;
}

/* -------------------------- زرّ فتح الدرج -------------------------- */
.shop-burger {
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    background: none;
    color: var(--ink);
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.shop-burger:hover { background: var(--pink-50); }
.shop-burger svg { width: 22px; height: 22px; }

/* الدرج في كل المقاسات: شريط التنقّل الأفقي لا يظهر إطلاقًا */
.shop-header--sidebar_all .shop-nav { display: none; }

/* الدرج على الهاتف فقط: الشريط الأفقي يبقى على الشاشات الواسعة */
/* «الهاتف فقط» و«الموسّط»: الدرج تحت 900px والشريط الأفقي فوقها */
@media (min-width: 901px) {
    .shop-header--sidebar_mobile .shop-burger,
    .shop-header--centered_bilingual .shop-burger { display: none; }
}

@media (max-width: 900px) {
    .shop-header--sidebar_mobile .shop-nav,
    .shop-header--centered_bilingual .shop-nav { display: none; }
}

/* الدرج بحكم القالب لا بحكم نمط الترويسة: «انطلاقة» شريطُها الأفقيّ يبقى
   على الحاسوب ويصير درجًا على الهاتف. القاعدتان نفسهما وحدُّهما نفسه
   (‏900px‏) حتى لا يكون في المتجر حدّان لمعنى واحد. */
@media (min-width: 901px) {
    .shop-header--drawer-mobile .shop-burger { display: none; }
}

@media (max-width: 900px) {
    .shop-header--drawer-mobile .shop-nav { display: none; }
}

/* زرّ الدرج في النمط الموسّط يجلس في الزاوية العليا اليمنى */
.shop-header--centered_bilingual .shop-burger {
    position: absolute;
    top: 0;
    right: 0;
}

/* ---------------------------- الدرج نفسه ---------------------------- */
.shop-drawer {
    position: fixed;
    inset: 0;
    z-index: 90;
}

.shop-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 10, 15, .45);
    opacity: 0;
    transition: opacity .25s ease;
}

.shop-drawer.is-open .shop-drawer-backdrop { opacity: 1; }

.shop-drawer-panel {
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    width: min(300px, 84vw);
    background: var(--white);
    box-shadow: 0 0 40px rgba(82, 27, 37, .22);
    display: flex;
    flex-direction: column;
    /* يبدأ خارج الشاشة من جهة بداية القراءة */
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
}

[dir="rtl"] .shop-drawer-panel { transform: translateX(100%); }

.shop-drawer.is-open .shop-drawer-panel { transform: translateX(0); }

.shop-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    font-weight: 800;
}

.shop-drawer-close {
    border: 0;
    background: none;
    font-size: 1.7rem;
    line-height: 1;
    color: var(--ink-soft);
    padding: 0 4px;
}

.shop-drawer-panel ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.shop-drawer-panel li a {
    display: block;
    padding: 12px 18px;
    font-size: .92rem;
    font-weight: 600;
    border-inline-start: 3px solid transparent;
}

.shop-drawer-panel li a:hover {
    background: var(--pink-50);
    border-inline-start-color: var(--hover);
}

.shop-drawer-panel li a.is-active {
    background: var(--pink-50);
    border-inline-start-color: var(--active-link);
    color: var(--active-link);
}

/* -------------------- مجموعة تُفتح وتُغلَق -------------------- */

.shop-drawer-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 12px 18px;
    background: none;
    border: 0;
    border-inline-start: 3px solid transparent;
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    color: inherit;
    text-align: start;
    cursor: pointer;
}

.shop-drawer-toggle svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    opacity: .55;
    transition: transform .2s ease;
}

.shop-drawer-group.is-open .shop-drawer-toggle svg { transform: rotate(180deg); }

.shop-drawer-toggle:hover {
    background: var(--pink-50);
    border-inline-start-color: var(--hover);
}

/* المجموعة التي فيها الصفحة المعروضة تُعرف بلمحة */
.shop-drawer-group.is-current > .shop-drawer-toggle {
    color: var(--active-link);
    border-inline-start-color: var(--active-link);
    background: var(--pink-50);
}

/* الفروع تُطوى بالقالب لا بالسكربت: لا ومضة فتحٍ ثمّ طيّ عند أوّل رسم */
.shop-drawer-panel .shop-drawer-sub {
    display: none;
    padding: 0 0 6px;
    background: rgba(0, 0, 0, .015);
}

.shop-drawer-group.is-open > .shop-drawer-sub { display: block; }

.shop-drawer-panel .shop-drawer-sub li a {
    padding-block: 9px;
    padding-inline-start: 32px;
    font-size: .87rem;
    font-weight: 500;
}

@media (prefers-reduced-motion: reduce) {
    .shop-drawer-backdrop,
    .shop-drawer-panel { transition: none; }
    .shop-drawer-toggle svg { transition: none; }
}


/* -------------------------- الدخول بجوجل -------------------------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 14px;
    color: var(--ink-soft);
    font-size: .82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line);
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 18px;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    background: var(--white);
    font-weight: 700;
    font-size: .92rem;
    transition: background .18s ease, border-color .18s ease;
}

/* يتبع لون التحويم من هوية الموقع كبقيّة الأزرار */
body.shop a.btn-google { color: var(--ink); }
body.shop a.btn-google:hover { background: var(--hover); border-color: var(--hover); color: var(--hover-text); }


/* ---------------------- حقل الهاتف مع رمز الدولة ---------------------- */
/*
 * الصفّ كلّه dir="ltr" في الترميز: الأرقام تُقرأ يسارًا لليمين
 * حتّى داخل صفحة عربية، فلا نستعمل خصائص منطقية هنا.
 */
.phone-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.phone-row .phone-dial {
    flex: 0 0 148px;
    min-width: 0;
}

.phone-row .phone-local {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    letter-spacing: .5px;
}

@media (max-width: 420px) {
    .phone-row .phone-dial { flex-basis: 118px; }
}


/* ------------------------ مبدّل قناة رمز الدخول ------------------------ */
.otp-channel-switch {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.otp-channel-btn {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--btn-radius);
    background: var(--white);
    color: var(--ink-soft);
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
}

.otp-channel-btn.is-active {
    background: var(--pink-100);
    border-color: var(--pink);
    color: var(--btn-secondary-text);
}


/* --------------------------- شريط شعارات العلامات --------------------------- */
/* شريط العلامات: من حافة الصفحة إلى حافتها، بتمرير متّصل.

   **الخروج من عرض المحتوى**: القسم داخل `main.shop-container` المحدود بـ
   1240px، فيُوسَّع بهامشٍ سالب قدرُه نصف الفرق بين عرض الشاشة وعرض الحاوية.
   و`--sbw` عرض شريط التمرير الرأسيّ يقيسه سكربت صغير: بدونه يزيد `100vw`
   على العرض المتاح فيظهر شريط تمرير أفقيّ للصفحة كلّها. */
.brand-band {
    --band: calc(100vw - var(--sbw, 0px));
    width: var(--band);
    margin-inline: calc(50% - (var(--band) / 2));
    padding: 6px 0 10px;
}

.brand-viewport {
    overflow: hidden;
    width: 100%;
    /* تلاشٍ عند الطرفين: الشعار المقصوص عند الحافة يبدو عطلًا لا حركة */
    -webkit-mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
    mask-image: linear-gradient(to left, transparent, #000 6%, #000 94%, transparent);
}

.brand-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: brand-marquee 45s linear infinite;
}

.brand-group { display: flex; flex: 0 0 auto; }

/* التوقّف ليقرأ الزائر شعارًا لفت نظره، ويضغطه إن كان له رابط */
.brand-band:hover .brand-track { animation-play-state: paused; }

.brand-strip-item {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    /* الفاصل جزء من العنصر، فيبقى منتظمًا عند الالتفاف */
    padding-inline-end: 56px;
    opacity: .85;
    transition: opacity .18s ease;
}

.brand-strip-item:hover { opacity: 1; }

/* **بلا `grayscale`**: كان الشعار يُعرض رماديًّا حتى يمرّ عليه المؤشّر، فيبدو
   دائرةً باهتة لا علامة — ولا مؤشّر أصلًا على الجوّال. والمالك يرفع شعاره
   ليُرى. */
.brand-strip-item img {
    height: 72px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* الاتجاهان كشريط الإعلان: تبدأ الحركة من الصفر دائمًا. في RTL يقف المسار
   بحافته اليمنى عند يمين الشاشة، فأيّ إزاحة سالبة في البداية تدفعه كلّه
   خارجها فلا يظهر شعار حتى تتقدّم الحركة. */
@keyframes brand-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

[dir="rtl"] .brand-track { animation-name: brand-marquee-rtl; }

@keyframes brand-marquee-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

@media (max-width: 700px) {
    .brand-strip-item img { height: 56px; max-width: 160px; }
    .brand-strip-item { padding-inline-end: 36px; }
}

/* بلا حركة تكفي نسخة واحدة مرئية، فتتوسّط الشعارات ولا تُقصّ */
@media (prefers-reduced-motion: reduce) {
    .brand-track { animation: none; }
    .brand-viewport {
        -webkit-mask-image: none;
        mask-image: none;
        display: flex;
        justify-content: center;
    }
    .brand-group:not(:first-child) { display: none; }
}

/* ------------------------------- آراء العملاء ------------------------------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}
.testimonial-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.testimonial-stars { display: flex; gap: 2px; }
.testimonial-stars svg { width: 16px; height: 16px; color: var(--line); }
.testimonial-stars svg.is-filled { color: var(--gold); }
.testimonial-comment {
    margin: 0;
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.7;
    flex: 1;
}
.testimonial-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.testimonial-name { font-weight: 700; font-size: .86rem; color: var(--heading); }
.testimonial-product { font-size: .78rem; color: var(--pink-dark); font-weight: 600; }

/* ----------------------------- الأسئلة الشائعة ----------------------------- */
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; margin-inline: auto; }
.faq-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
}
.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-weight: 700;
    color: var(--heading);
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .18s ease; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p { margin: 10px 0 0; color: var(--ink-soft); font-size: .88rem; line-height: 1.7; }

/*
 * أصناف الأزرار تضبط display صراحة، وهي تتقدّم على display:none القادم
 * من ورقة المتصفّح للسمة hidden — فيظهر العنصر رغم إخفائه.
 */
[hidden] { display: none !important; }

/* ==========================================================================
   شريط الإعلان العلويّ
   وضعان: ساكن يتوسّط عرض المحتوى، ومُمرَّر يمتدّ من حافة الصفحة إلى حافتها.
   يبدأ hidden ويُظهره السكربت بعد قراءة التخزين المحلّي، فلا يومض لمن أغلقه.
   ========================================================================== */
.shop-announce {
    position: relative;
    /* لونه ولون نصّه من «هوية الموقع ← ألوان الموقع». وقبل أن يُضبط يرث لون
       العلامة كما كان، فلا يتغيّر شكل متجر قائم حتى يختار مالكه. */
    background: var(--announce-bg, var(--pink, #d94f8a));
    color: var(--announce-text, #fff);
    font-size: 14px;
    line-height: 1.5;
    /* الزرّ مطلق داخله، فيحتاج ارتفاعًا لا يعتمد على المحتوى وحده */
    min-height: 38px;
}

/* ------------------------------ الوضع الساكن ------------------------------ */
.shop-announce-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
    /* مكان الزرّ محجوز، فلا يركب النصّ الطويل تحته */
    padding-inline-end: 34px;
}

.shop-announce-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.shop-announce-text a,
.shop-announce-item {
    color: inherit;
    text-decoration: none;
}

.shop-announce-text a { text-decoration: underline; }

/* ------------------------------ زرّ الإغلاق ------------------------------ */
/* والوضع الساكن يحتاج المثل: نصٌّ يتوسّط قد يبلغ الزرّ على شاشة ضيّقة */
.shop-announce:not(.is-scrolling) .shop-container { padding-inline-end: 46px; }

.shop-announce-close {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 8px;
    transform: translateY(-50%);
    z-index: 2;
    background: none;
    border: 0;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: .75;
    padding: 0 6px;
}

.shop-announce-close:hover { opacity: 1; }

/* ------------------------------ الوضع المُمرَّر ------------------------------
   المسار نسختان متطابقتان من مجموعة واحدة، والحركة تنتهي عند 50% من عرضه
   فتعود إلى الصفر على نفس المشهد بلا قفزة. النافذة بعرض الصفحة كاملًا لا
   بعرض المحتوى، فالنصّ يمرّ من حافة إلى حافة.
   ------------------------------------------------------------------------ */
.shop-announce-viewport {
    overflow: hidden;
    /* **`auto` لا `100%`**: العرض الصريح يُبطل أثر الهامش — يبقى العنصر بعرض
       أبيه كاملًا ويُزيح الهامشُ الفائضَ بدل أن يضيّقه، فيمرّ النصّ تحت زرّ
       الإغلاق كما كان. وعنصر الكتلة يملأ أباه افتراضًا، والهوامش تقتطع منه. */
    width: auto;
    padding: 8px 0;

    /* **مكانٌ محجوز لزرّ الإغلاق**: الزرّ مطلق فوق الشريط، والمسار يمرّ تحته
       فيختفي خلف نصٍّ متحرّك — يراه الزائر ثمّ لا يراه، فلا يضغطه.

       و`margin` لا `padding`: الفيض يُقصّ عند حدّ الصندوق، فالحشو يبقى
       المسارَ ظاهرًا تحته. والهامش يضيّق النافذة نفسها فيُقصّ النصّ قبل
       الزرّ بمسافة. */
    margin-inline-end: 46px;
}

.shop-announce-track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: shop-announce-marquee 40s linear infinite;
}

.shop-announce-group {
    display: flex;
    flex: 0 0 auto;
}

.shop-announce-item {
    flex: 0 0 auto;
    white-space: nowrap;
    /* الفاصل بين التكرارات جزء من العنصر، فيبقى منتظمًا عند الالتفاف */
    padding-inline-end: 48px;
}

/* التوقّف عند المرور بالمؤشّر ليقرأ الزائر رسالة طويلة */
.shop-announce.is-scrolling:hover .shop-announce-track {
    animation-play-state: paused;
}

/* يسارًا في اللاتينية: النصّ يدخل من اليمين ويخرج يسارًا مع اتجاه القراءة */
@keyframes shop-announce-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* وفي العربية العكس: يدخل من اليسار ويخرج يمينًا مع اتجاه القراءة.
   تبدأ من الصفر لا من ‎-50%‎: في RTL يقف المسار بحافته اليمنى عند يمين
   الشاشة، فبدءُ الحركة من ‎-50%‎ يدفعه كلّه خارجها يسارًا فلا يظهر نصّ حتى
   تتقدّم الحركة — وهو التأخّر الذي ظهر عند أوّل فتح للصفحة. */
[dir="rtl"] .shop-announce-track {
    animation-name: shop-announce-marquee-rtl;
}

@keyframes shop-announce-marquee-rtl {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

@media (prefers-reduced-motion: reduce) {
    .shop-announce-track { animation: none; }
    /* بلا حركة تكفي نسخة واحدة مرئية، فتُقصّ النافذة على المشهد الأوّل */
    .shop-announce-viewport { text-align: center; }
}

/* ==========================================================================
   قسم بنرات بوضع «شريحة عريضة» و«صفّ بطاقات»
   الوضع الافتراضي (‏واجهة مركّبة‏) يستعمل .banner-strip أعلاه بلا تغيير.
   ========================================================================== */
.banner-strip--wide {
    grid-template-columns: minmax(0, 1fr);
}

.banner-strip--wide .banner-main {
    aspect-ratio: 3 / 1;
}

.banner-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 18px 0 30px;
}

.banner-row-item {
    position: relative;
    display: block;
    border-radius: var(--radius-lg, 18px);
    overflow: hidden;
    background: var(--surface-2, #f3f0ec);
    aspect-ratio: 16 / 9;
    text-decoration: none;
}

.banner-row-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 700px) {
    .banner-strip--wide .banner-main { aspect-ratio: 16 / 9; }
}

/* ==========================================================================
   صفحة المنتج: العناصر الموحَّدة بين منتج المتجر ومنتج المورّد
   كلّها تخفي نفسها حين لا بيانات لها، فالشكل واحد والمحتوى بقدر ما وُجد.
   ========================================================================== */
.product-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.product-brand {
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .02em;
    color: var(--brand, #d94f8a);
    text-transform: uppercase;
}

/* ------------------------------ الثقة ------------------------------ */
.product-trust {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 6px 0 12px;
    font-size: 13px;
    color: var(--muted, #6b6b6b);
}

.product-stars {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.product-stars svg {
    width: 15px;
    height: 15px;
    color: #d9d4cd;
}

.product-stars svg.is-filled { color: #f5a623; }

.product-stars b {
    margin-inline-start: 4px;
    color: var(--ink, #2b2b2b);
}

.product-sold::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    margin-inline-end: 8px;
    vertical-align: middle;
    opacity: .5;
}

/* نسبة الخصم بجانب السعر */
.price-was { margin-inline-start: 10px; }

.price-off {
    display: inline-block;
    margin-inline-start: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand, #d94f8a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    vertical-align: middle;
}

/* وصف مختصر يسبق الشراء */
.product-lead {
    margin: 0 0 16px;
    color: var(--muted, #5a5a5a);
    line-height: 1.7;
}

/* ------------------------------ الضمانات ------------------------------ */
.product-assurances {
    list-style: none;
    margin: 16px 0 0;
    padding: 14px;
    border: 1px solid var(--line, #e8e2da);
    border-radius: var(--radius, 12px);
    display: grid;
    gap: 12px;
}

.product-assurances li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}

.product-assurance-icon {
    flex: 0 0 auto;
    display: inline-flex;
    color: var(--brand, #d94f8a);
}

.product-assurances b { display: block; }

.product-assurances small {
    display: block;
    color: var(--muted, #6b6b6b);
    line-height: 1.5;
}

/* ------------------------------ الفيديو ------------------------------ */
.gallery-main { position: relative; }

.gallery-video {
    position: absolute;
    inset: 0;
    background: #000;
    border-radius: inherit;
    overflow: hidden;
}

.gallery-video iframe,
.gallery-video video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: contain;
    background: #000;
}

.gallery-thumb--video { position: relative; }

.gallery-thumb--video img { opacity: .55; }

.gallery-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.gallery-play svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}

/* ==========================================================================
   النشرة البريدية — عمود أخير في شبكة التذييل
   --------------------------------------------------------------------------
   يقع في طرف الصفّ: يسار الصفحة في العربية ويمينها في الإنجليزية — لأنّه
   آخر عناصر الشبكة، والشبكة تتبع `dir` من نفسها. لا صنف لغة ولا شرط.

   ومساره الطبيعيّ حين تُملأ أعمدة أكثر (‏صفحات التعريف‏): ينزل سطرًا كاملًا
   في طرف البداية بدل أن يُضغط. هبوط مقبول لا كسر.
   ========================================================================== */
.footer-newsletter { text-align: start; }

.footer-newsletter h4 { margin: 0 0 6px; }

.footer-newsletter p {
    margin: 0 0 14px;
    font-size: .85rem;
    opacity: .85;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1 1 210px;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border-radius: var(--btn-radius);
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font: inherit;
    font-size: .88rem;
}

.newsletter-input::placeholder { color: rgba(255, 255, 255, .55); }

.newsletter-input:focus {
    outline: none;
    border-color: var(--pink);
    background: rgba(255, 255, 255, .13);
}

.newsletter-btn {
    flex: 1 1 120px;
    height: 44px;
    padding: 0 26px;
    border: 0;
    border-radius: var(--btn-radius);
    background: var(--pink);
    color: var(--btn-primary-text);
    font: inherit;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
}

.newsletter-btn:hover {
    background: var(--hover);
    color: var(--hover-text);
}

/* على الجوال يملأ الحقلان العرض: زرّ بعرض نصّه لا يُضغط بإبهام */
@media (max-width: 560px) {
    .newsletter-input,
    .newsletter-btn { flex: 1 1 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────
   تقييمات الزبائن: نموذج الكتابة في صفحة الطلب، والعرض في صفحة المنتج.

   النجوم أزرارُ اختيار حقيقية لا جافاسكربت: تعمل بلا سكربت، ويقرؤها قارئ
   الشاشة، ويصلها التنقّل بلوحة المفاتيح. والترتيب معكوس هنا في CSS
   (`row-reverse`) لا في HTML، فتبقى القيمة الدلالية صحيحة — و`~` يلوّن ما
   بعد المختار في ترتيب المستند، وهو ما قبله بصريًّا.
   ───────────────────────────────────────────────────────────────────────── */

.review-stars {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.review-stars svg {
    width: 15px;
    height: 15px;
    color: #d9d4cd;
}

.review-stars svg.is-filled { color: #f5a623; }

.review-box {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--line, #e8e3dc);
    border-radius: 10px;
    background: #fcfbf9;
}

.review-box-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.review-box-note { font-size: 12px; color: #7a736a; }

.review-details > summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand, #8a6a3b);
}

.review-form { margin-top: 10px; }

.review-legend {
    font-size: 12px;
    color: #7a736a;
    margin-bottom: 4px;
}

/* الحقول المخفيّة تبقى في شجرة الوصول: `appearance:none` لا `display:none` */
.review-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 2px;
    border: 0;
    padding: 0;
    margin: 0 0 10px;
}

.review-rating input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.review-rating label {
    cursor: pointer;
    line-height: 0;
    padding: 2px;
}

.review-rating label svg {
    width: 26px;
    height: 26px;
    color: #d9d4cd;
    transition: color .12s;
}

/* المختار وما بعده في المستند = هو وما قبله بصريًّا بعد العكس */
.review-rating input:checked ~ label svg,
.review-rating label:hover svg,
.review-rating label:hover ~ label svg { color: #f5a623; }

/* حلقة تركيز ظاهرة: بلا حدٍّ مرئيّ يضيع مستعمل لوحة المفاتيح بين النجوم */
.review-rating input:focus-visible + label svg {
    outline: 2px solid var(--brand, #8a6a3b);
    outline-offset: 2px;
    border-radius: 3px;
}

.review-label {
    display: block;
    font-size: 12px;
    color: #7a736a;
    margin-bottom: 4px;
}

.review-optional { color: #a49c92; }

.review-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--line, #e8e3dc);
    border-radius: 8px;
    font: inherit;
    resize: vertical;
}

.review-submit { margin-top: 10px; }

/* ── العرض في صفحة المنتج ── */

.reviews-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-bottom: 18px;
}

.reviews-average {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.reviews-average strong { font-size: 32px; line-height: 1; }
.reviews-average small { color: #7a736a; font-size: 12px; }

.reviews-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 220px;
    min-width: 200px;
}

.reviews-bars li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #7a736a;
}

.reviews-bar-label { width: 12px; text-align: center; }
.reviews-bar-count { width: 28px; text-align: end; }

.reviews-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #eee9e2;
    overflow: hidden;
}

.reviews-bar i {
    display: block;
    height: 100%;
    background: #f5a623;
}

.reviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.review-item {
    padding-top: 14px;
    border-top: 1px solid var(--line, #e8e3dc);
}

.review-item:first-child { border-top: 0; padding-top: 0; }

.review-item-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.review-item-name { font-size: 13px; }

.review-verified {
    font-size: 11px;
    color: #2f7d4f;
    background: #eaf5ee;
    border-radius: 20px;
    padding: 2px 8px;
}

.review-item-date { font-size: 11px; color: #a49c92; }

.review-item-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    color: #4a443c;
    white-space: pre-line;
}

/* حالة الفراغ في تبويب التقييمات: تقول لماذا لا شيء هنا ومن يستطيع الكتابة —
   لا فراغٌ يُقرأ عطلًا. */
.reviews-empty {
    padding: 26px 4px;
    text-align: center;
}

.reviews-empty-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: #4a443c;
}

.reviews-empty-note {
    margin: 0;
    font-size: 13px;
    color: #a49c92;
}

/* ==========================================================================
   شاشة العلامات التجارية — لكلّ التصاميم
   ==========================================================================

   كان تنسيقها في `site1.css`، وذاك لا يُحمَّل إلا مع القالب المنقول،
   فكانت الشاشة تُفتح بالقالب المنشور بلا شبكة أصلاً — شعارٌ في كلّ سطر.
   والمسار `/brands` واحد في التصاميم كلّها، فتنسيقه مكانُه هنا. */

/* ==========================================================================
   شاشة العلامات التجارية
   ========================================================================== */

/* خمسة في السطر عددًا لا قياسًا: `auto-fill` يحشر ما تسعه الحاوية،
   فيختلف عدد الشعارات في السطر باختلاف عرض الشاشة — والمطلوب خمسة ثابتة.
   وينقُص العدد على الشاشات الضيقة وحدها، وإلا انضغط الشعار حتى لا يُقرأ. */
.brand-page-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

@media (max-width: 1024px) { .brand-page-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 780px)  { .brand-page-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px)  { .brand-page-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.brand-page-item {
    display: flex;
    flex-direction: column;
    background: #f5f6f7;
    border-radius: 6px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

/* العلامة بلا منتجات ولا رابط: تُعرض ولا تُضغط، وتُخفَّت قليلًا كي لا يحسبها
   الزائر زرًّا معطّلًا */
.brand-page-item.is-quiet { opacity: .65; cursor: default; }

.brand-page-logo {
    height: 110px;
    display: block;
    padding: 14px;
}

/* الأبعاد صريحة كما في الجدار: `max-*` وحدها تُبقي للصورة أبعادها فتُقصّ */
.brand-page-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.brand-page-meta {
    padding: 12px 10px;
    text-align: center;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.brand-page-meta b { font-size: .88rem; }
.brand-page-meta small { font-size: .74rem; color: var(--muted, #717f86); }

@media (hover: hover) {
    .brand-page-item img {
        filter: grayscale(1);
        opacity: .6;
        transition: filter .2s ease, opacity .2s ease;
    }

    .brand-page-item:not(.is-quiet):hover img { filter: grayscale(0); opacity: 1; }
}
