/*
 * @almadah-clean-room — كُتب من الصفر من وصف السلوك، لا نسخًا من كود المورّد (10/11/2026)
 *
 * تنسيق القالب العام الجديد (resources/views/almadah/layout): الهيدر وشريط الفئات وقائمة «الكل» والسلة المصغّرة
 * والقائمة الجانبية وشريط المدينة والفوتر وشريط الجوال السفلي والتنبيهات والنوافذ المشتركة.
 *
 * القواعد (قرار المالك 25/10/2026 — almadah-clean.css):
 *   - التركوازي (--c-brand · --c-brand-2 · --c-brand-3) في الهيدر والفوتر وحدهما.
 *   - لون فعل واحد أصفر (--c-yellow) وبرتقالي للبحث (--c-orange). لا ألوان hex جديدة خارج المتغيرات أدناه.
 *   - كل محدد يبدأ بـ.am- فلا يمسّ محتوى الصفحات، ويُحمَّل آخر ملف في <head>.
 *   - خصائص منطقية (inline-start/end) فتعمل العربية والإنجليزية بلا قواعد مكررة.
 */

:root {
    --am-brand: var(--c-brand, #0f3b3b);
    --am-brand-2: var(--c-brand-2, #175252);
    --am-brand-3: var(--c-brand-3, #0a2b2b);
    --am-city: #24605f;
    --am-yellow: var(--c-yellow, #ffd814);
    --am-yellow-h: var(--c-yellow-h, #f7ca00);
    --am-orange: var(--c-orange, #ffa41c);
    --am-orange-h: var(--c-orange-h, #fa8900);
    --am-ink: var(--c-ink, #0f1111);
    --am-ink-2: var(--c-ink-2, #565959);
    --am-line: var(--c-line, #d5d9d9);
    --am-line-soft: var(--c-line-soft, #e7e7e7);
    --am-band: var(--c-band, #f7f7f7);
    --am-hover: var(--c-hover, #f7fafa);
    --am-link: var(--c-link, #0b5cad);
    --am-link-h: var(--c-link-h, #c7511f);
    --am-sale: var(--c-sale, #cc0c39);
    --am-on-dark: #ccd9d9;
    --am-r: var(--r-box, 8px);
    --am-pill: var(--r-btn, 999px);
    --am-bnav-h: 60px;
}

html, body { overflow-x: clip; }
body.am-body { background: #fff; color: var(--am-ink); }
body.am-locked { overflow: hidden; }
.am-shell { display: flex; flex-direction: column; min-height: 100vh; background: #fff; }
.am-main { flex: 1 0 auto; min-width: 0; }
.am-wrapx { max-width: 1170px; margin-inline: auto; padding-inline: 15px; }
.am-body [hidden] { display: none !important; }

/* ═════════════════════════════ أزرار ومدخلات مشتركة ═════════════════════════════ */

.am-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 38px; padding: 7px 18px; border-radius: var(--am-pill); border: 1px solid transparent;
    font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none !important;
    transition: background-color .15s ease, border-color .15s ease;
}
.am-btn--block { display: flex; width: 100%; }
.am-btn--action { background: var(--am-yellow); border-color: var(--c-yellow-bd, #fcd200); color: var(--am-ink) !important; }
.am-btn--action:hover { background: var(--am-yellow-h); }
.am-btn--brand { background: var(--am-brand); color: #fff !important; }
.am-btn--brand:hover { background: var(--am-brand-2); }
.am-btn--ghost { background: #fff; border-color: var(--am-line); color: var(--am-ink) !important; }
.am-btn--ghost:hover { background: var(--am-hover); }
.am-btn--danger { background: var(--am-sale); color: #fff !important; }
.am-input, .am-select {
    display: block; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--am-line); border-radius: var(--am-r);
    background: #fff; color: var(--am-ink); font-size: 14px;
}
.am-input:focus, .am-select:focus { outline: none; border-color: #007185; box-shadow: 0 0 0 3px rgba(0, 113, 133, .15); }
.am-linkbtn { background: none; border: 0; padding: 0; color: var(--am-link); font-size: 13px; font-style: italic; cursor: pointer; }
.am-spinner {
    display: inline-block; width: 34px; height: 34px; border-radius: 50%;
    border: 3px solid var(--am-line-soft); border-top-color: var(--am-brand); animation: am-spin .8s linear infinite;
}
.am-spinner--sm { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }
@keyframes am-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .am-spinner { animation-duration: 2.4s; } }

/* ═════════════════════════════ الهيدر ═════════════════════════════ */

.am-header { position: relative; z-index: 1030; color: #fff; }
.am-header--sticky { position: sticky; top: 0; }
.am-header a { color: #fff; text-decoration: none; }
.am-header button { font: inherit; }

.am-topbar { position: relative; height: 40px; overflow: hidden; }
.am-topbar__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.am-topbar__text { position: relative; display: flex; align-items: center; justify-content: center; gap: 24px; height: 100%; font-size: 13px; font-weight: 600; }
.am-topbar__close { position: absolute; inset-block: 0; inset-inline-end: 8px; background: none; border: 0; color: #fff; cursor: pointer; }
@media (min-width: 992px) { .am-topbar { height: 60px; } }

.am-hd { background: var(--am-brand); padding: 6px 0; }
.am-hd__row { display: flex; align-items: center; gap: 4px; padding-inline: 16px; }

/* كل عنصر في الشريط الأول: إطار أبيض رفيع عند التحويم (توقيع أمازون) */
.am-hd__hit {
    display: flex; align-items: center; gap: 4px; flex-shrink: 0; padding: 6px 8px; border: 1px solid transparent; border-radius: 2px;
    background: transparent; color: #fff; line-height: 1.2; white-space: nowrap; cursor: pointer;
}
.am-hd__hit:hover, .am-hd__hit:focus-visible { border-color: #fff; outline: none; }
.am-hd__two { display: flex; flex-direction: column; text-align: start; }
.am-hd__two small { font-size: 12px; color: var(--am-on-dark); }
.am-hd__two b { font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }

.am-hd__burger { display: none; background: none; border: 0; color: #fff; padding: 4px 6px; cursor: pointer; }
.am-hd__logo { padding: 4px 6px; }
.am-hd__logo img { display: block; height: 36px; width: auto; object-fit: contain; }
.am-hd__loc svg { align-self: flex-end; margin-bottom: 2px; }

/* البحث: [الكل ▾][ الحقل ][🔍] بحلقة برتقالية عند التركيز */
.am-search { position: relative; display: flex; flex: 1 1 auto; min-width: 0; height: 40px; margin: 0 8px; border-radius: 4px; }
.am-search:focus-within { box-shadow: 0 0 0 3px var(--am-orange); }
.am-search__scope {
    flex: 0 0 auto; max-width: 160px; min-width: 56px; field-sizing: content; height: 100%; padding: 0 8px; border: 0;
    border-inline-end: 1px solid #cdcdcd; border-start-start-radius: 4px; border-end-start-radius: 4px;
    background: #e6e6e6; color: #555; font-size: 12px; cursor: pointer; outline: none;
}
.am-search__scope:hover { background: #d4d4d4; color: var(--am-ink); }
.am-search__input {
    flex: 1 1 auto; min-width: 0; width: 100%; height: 100%; padding: 0 12px; border: 0; border-radius: 0;
    background: #fff; color: var(--am-ink); font-size: 15px; outline: none;
}
.am-search__go {
    flex: 0 0 45px; height: 100%; display: flex; align-items: center; justify-content: center; padding: 0; border: 0;
    background: var(--am-orange); color: var(--am-ink); cursor: pointer; border-start-end-radius: 4px; border-end-end-radius: 4px;
}
.am-search__go:hover { background: var(--am-orange-h); }

/* اقتراحات البحث */
.am-suggest {
    position: absolute; top: calc(100% + 6px); inset-inline: 0; z-index: 1060; max-height: 70vh; overflow-y: auto;
    background: #fff; color: var(--am-ink); border: 1px solid var(--am-line); border-radius: var(--am-r);
    box-shadow: 0 8px 24px rgba(15, 17, 17, .18); padding: 4px 0 6px; text-align: start;
}
.am-suggest__h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px 3px; font-size: 11px; font-weight: 800; color: var(--am-ink-2); }
.am-suggest__clear { background: none; border: 0; padding: 0; font-size: 11px; font-weight: 700; color: var(--am-link); cursor: pointer; }
.am-suggest__clear:hover { text-decoration: underline; }
.am-suggest__g + .am-suggest__g { border-top: 1px solid var(--am-line-soft); margin-top: 4px; padding-top: 2px; }
.am-header .am-suggest__item { display: flex; align-items: center; gap: 10px; padding: 7px 14px; color: var(--am-ink); }
.am-header .am-suggest__item:hover, .am-header .am-suggest__item[aria-selected="true"] { background: var(--am-band); color: var(--am-brand); }
.am-suggest__item img, .am-suggest__ph { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 8px; object-fit: cover; background: var(--am-band); }
.am-suggest__item--text .am-suggest__ph { width: 18px; height: 18px; flex-basis: 18px; background: transparent; }
.am-suggest__ph { position: relative; }
.am-suggest__ph::before {
    content: ""; position: absolute; inset: 0; margin: auto; width: 12px; height: 12px; border: 2px solid #9ca3af; border-radius: 50%;
}
.am-suggest__ph--recent::before { border-radius: 50%; border-style: dotted; }
.am-suggest__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-suggest__t b { font-weight: 800; }
.am-suggest__s { flex-shrink: 0; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--am-ink-2); }
.am-suggest__g--products .am-suggest__s { color: var(--am-brand); font-weight: 800; }
.am-header .am-suggest__all { justify-content: center; font-weight: 700; color: var(--am-brand); border-top: 1px solid var(--am-line-soft); margin-top: 4px; padding-top: 10px; }
.am-suggest__none { padding: 12px 14px; color: var(--am-ink-2); text-align: center; }

/* القوائم المنبثقة البيضاء (اللغة · الحساب · السلة) */
.am-hd__lang, .am-hd__acct, .am-cart { position: relative; flex-shrink: 0; }
.am-hd__langbtn img { margin-inline-end: 2px; }
.am-pop, .am-acct, .am-cart__panel {
    position: absolute; top: calc(100% + 2px); inset-inline-end: 0; z-index: 1050;
    background: #fff; color: var(--am-ink); border: 1px solid var(--am-line); border-radius: var(--am-r);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .14); text-align: start;
}
.am-pop { min-width: 160px; padding: 6px 0; }
.am-pop__item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 14px; border: 0; background: none; color: var(--am-ink); font-size: 13px; cursor: pointer; text-align: start; }
.am-pop__item:hover, .am-pop__item.is-on { background: var(--am-band); }

/* «الحساب والقوائم»: تحويم أو تركيز (CSS وحده) */
.am-acct { display: none; min-width: 240px; padding: 12px 0; }
.am-acct::before { content: ""; position: absolute; inset-inline: 0; top: -8px; height: 8px; }
.am-hd__acct:hover .am-acct, .am-hd__acct:focus-within .am-acct { display: block; }
.am-header .am-acct a { display: block; padding: 7px 16px; color: var(--am-ink); font-size: 13px; }
.am-header .am-acct a:hover { background: var(--am-band); color: var(--am-link-h); text-decoration: underline; }
.am-acct__head { padding: 4px 16px 8px; font-size: 15px; font-weight: 700; }
.am-acct hr { margin: 8px 0; border: 0; border-top: 1px solid var(--am-line-soft); }
.am-header .am-acct .am-acct__cta {
    margin: 0 16px; padding: 7px 0; text-align: center; border-radius: var(--am-r); border: 1px solid var(--c-yellow-bd, #fcd200);
    background: var(--am-yellow); color: var(--am-ink); text-decoration: none;
}
.am-header .am-acct .am-acct__cta:hover { background: var(--am-yellow-h); color: var(--am-ink); text-decoration: none; }
.am-acct__new { margin: 8px 0 0; text-align: center; font-size: 12px; }
.am-header .am-acct .am-acct__new a { display: inline; padding: 0; color: var(--am-link); }

/* العربة: العدد البرتقالي فوق الأيقونة ثم الكلمة */
.am-cart__btn { position: relative; align-items: flex-end; }
.am-cart__icon { position: relative; display: block; width: 38px; height: 30px; }
.am-cart__icon svg { position: absolute; bottom: 0; inset-inline-start: 0; }
.am-cart__count {
    position: absolute; top: -4px; inset-inline-start: 11px; width: 20px; text-align: center;
    font-size: 15px; font-weight: 700; line-height: 1; color: var(--am-orange);
}
.am-cart__label { font-size: 14px; font-weight: 700; padding-bottom: 1px; }
.am-cart__panel { width: 340px; max-width: calc(100vw - 24px); padding: 0; }

.am-mini { padding: 4px 0 16px; }
.am-mini__head { margin: 16px 20px 6px; padding-bottom: 8px; border-bottom: 1px solid var(--am-line-soft); font-size: 16px; font-weight: 700; }
.am-mini__list { list-style: none; margin: 0; padding: 0 6px; max-height: 340px; overflow-y: auto; }
.am-mini__item { display: flex; align-items: center; gap: 6px; padding: 8px 10px; }
.am-header .am-mini__link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; color: var(--am-ink); }
.am-mini__link img { width: 56px; height: 56px; object-fit: contain; flex-shrink: 0; border-radius: 6px; background: var(--am-band); }
.am-mini__txt { display: flex; flex-direction: column; min-width: 0; }
.am-mini__name { font-size: 13px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-mini__meta { font-size: 13px; color: var(--am-ink-2); }
.am-mini__rm { background: none; border: 0; padding: 6px; color: var(--am-ink-2); cursor: pointer; border-radius: 50%; }
.am-mini__rm:hover { background: var(--am-band); color: var(--am-sale); }
.am-mini__sum { display: flex; justify-content: space-between; align-items: center; margin: 4px 20px 12px; padding-top: 10px; border-top: 1px solid var(--am-line-soft); }
.am-mini__sum span { font-size: 14px; color: var(--am-ink-2); }
.am-mini__sum b { font-size: 16px; }
.am-mini .am-btn { width: auto; margin: 0 20px; }
.am-mini__empty { padding: 20px; text-align: center; color: var(--am-ink-2); }
.am-mini__empty p { margin: 8px 0 0; font-weight: 700; color: var(--am-ink); }
.am-mini__wait { padding: 30px; text-align: center; }

/* الشريط الثاني: الأقسام */
.am-sub { background: var(--am-brand-2); }
.am-sub__row { display: flex; align-items: center; gap: 2px; padding-inline: 16px; overflow-x: auto; scrollbar-width: none; }
.am-sub__row::-webkit-scrollbar { height: 0; }
.am-header .am-sub__link {
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 6px 9px; border: 1px solid transparent; border-radius: 2px;
    font-size: 14px; white-space: nowrap;
}
.am-header .am-sub__link:hover, .am-header .am-sub__link.is-on { border-color: #fff; }
.am-sub__all { font-weight: 700; }

/* قائمة «الكل» */
.am-mega {
    position: absolute; inset-inline: 0; top: 100%; z-index: 1040; background: #fff; color: var(--am-ink);
    border-top: 1px solid var(--am-line-soft); box-shadow: 0 14px 28px rgba(15, 17, 17, .18);
}
.am-mega__inner { max-width: 1400px; margin-inline: auto; }
.am-mega__loading { padding: 40px; text-align: center; color: var(--am-ink-2); }
.am-mega__cols { display: flex; min-height: 360px; max-height: min(70vh, 620px); }
.am-mega__roots { list-style: none; margin: 0; padding: 8px 0; flex: 0 0 260px; overflow-y: auto; border-inline-end: 1px solid var(--am-line-soft); background: var(--am-band); }
.am-header .am-mega__root {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 18px; color: var(--am-ink); font-size: 14px;
}
.am-header .am-mega__root:hover, .am-header .am-mega__root.is-on { background: #fff; font-weight: 700; color: var(--am-ink); }
[dir="ltr"] .am-mega__chev, html:not([dir="rtl"]) .am-mega__chev { transform: scaleX(-1); }
.am-mega__panes { flex: 1; min-width: 0; overflow-y: auto; padding: 18px 24px; }
.am-header .am-mega__title { display: inline-flex; align-items: baseline; gap: 10px; margin-bottom: 14px; color: var(--am-ink); font-size: 18px; font-weight: 700; }
.am-mega__title span { font-size: 13px; font-weight: 600; color: var(--am-link); }
.am-mega__groups { columns: 3 200px; column-gap: 28px; }
.am-mega__group { break-inside: avoid; margin-bottom: 18px; }
.am-header .am-mega__head { display: block; margin-bottom: 6px; color: var(--am-ink); font-size: 14px; font-weight: 700; }
.am-mega__group ul { list-style: none; margin: 0; padding: 0; }
.am-header .am-mega__group li a { display: block; padding: 3px 0; color: var(--am-ink-2); font-size: 13px; }
.am-header .am-mega__head:hover, .am-header .am-mega__group li a:hover { color: var(--am-link-h); text-decoration: underline; }
.am-header .am-mega__more { color: var(--am-link) !important; }
.am-header .am-mega__all { display: block; padding: 12px 24px; border-top: 1px solid var(--am-line-soft); color: var(--am-link); font-weight: 700; font-size: 14px; }

/* ── الجوال ── */
@media (max-width: 1199.98px) {
    .am-hd__burger { display: block; }
    .am-cart__label { display: none; }
    .am-mega { display: none !important; }
}
@media (max-width: 991.98px) {
    .am-hd__lang, .am-hd__acct, .am-hd__orders { display: none; }
}
@media (max-width: 767.98px) {
    .am-hd__row { flex-wrap: wrap; row-gap: 6px; padding-inline: 12px; }
    .am-hd__logo { margin-inline-end: auto; }
    .am-hd__logo img { height: 30px; }
    .am-hd__loc { display: none; }
    .am-search { order: 10; flex: 1 0 100%; height: 42px; margin: 0 0 4px; }
    .am-search__scope { display: none; }
    .am-search__input { border-start-start-radius: 4px; border-end-start-radius: 4px; font-size: 14px; }
    .am-sub__row { padding-inline: 10px; }
}
@media (max-width: 575.98px) {
    .am-suggest { position: fixed; inset-inline: 8px; top: var(--am-sg-top, 110px); max-height: calc(100vh - var(--am-sg-top, 110px) - 12px); }
}

/* ═════════════════════════════ القائمة الجانبية ولوحة الحساب ═════════════════════════════ */

.am-drawer { position: fixed; inset: 0; z-index: 1045; visibility: hidden; pointer-events: none; }
.am-drawer.is-open { visibility: visible; pointer-events: auto; }
.am-drawer__veil { position: absolute; inset: 0; background: rgba(15, 17, 17, .55); opacity: 0; transition: opacity .2s ease; }
.am-drawer.is-open .am-drawer__veil { opacity: 1; }
.am-drawer__panel {
    position: absolute; top: 0; bottom: 0; inset-inline-start: 0; width: 320px; max-width: 86vw; background: #fff; color: var(--am-ink);
    display: flex; flex-direction: column; transform: translateX(100%); transition: transform .22s ease;
}
[dir="ltr"] .am-drawer__panel, html:not([dir="rtl"]) .am-drawer__panel { transform: translateX(-100%); }
.am-drawer__panel--end { inset-inline-start: auto; inset-inline-end: 0; transform: translateX(-100%); overflow-y: auto; }
[dir="ltr"] .am-drawer__panel--end, html:not([dir="rtl"]) .am-drawer__panel--end { transform: translateX(100%); }
.am-drawer.is-open .am-drawer__panel { transform: none; }
@media (prefers-reduced-motion: reduce) { .am-drawer__panel, .am-drawer__veil { transition: none; } }
.am-drawer__head { flex: 0 0 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: var(--am-brand); color: #fff; font-size: 16px; font-weight: 700; }
.am-drawer__head button { background: none; border: 0; color: #fff; cursor: pointer; padding: 4px; }
.am-drawer__auth { flex: 0 0 auto; display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--am-line-soft); }
.am-drawer__auth .am-btn { flex: 1; }
.am-drawer__me { display: flex; align-items: center; gap: 10px; color: var(--am-ink); font-weight: 700; font-size: 14px; text-decoration: none; min-width: 0; }
.am-drawer__me span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-drawer__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: 24px; }
.am-drawer__link { display: block; padding: 11px 16px; border-bottom: 1px solid var(--am-line-soft); color: var(--am-ink); font-size: 14px; text-decoration: none; }
.am-drawer__link:hover { background: var(--am-band); color: var(--am-ink); text-decoration: none; }
.am-drawer__link--strong { font-weight: 700; }
.am-drawer__link--out { color: var(--am-sale); }
.am-drawer__langs { padding: 14px 16px; border-bottom: 1px solid var(--am-line-soft); }
.am-drawer__label { margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.am-drawer__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.am-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--am-line); border-radius: 6px; background: #fff; color: var(--am-ink); font-size: 13px; cursor: pointer; }
.am-chip.is-on { border-color: var(--am-brand); color: var(--am-brand); font-weight: 700; }
.am-drawer--account .alm-user-sidenav-wrap { display: block; position: relative; flex: 1 1 auto; height: 100%; max-width: none; border: 0; border-radius: 0; }

/* ═════════════════════════════ «التوصيل إلى» للجوال ونافذة المدينة ═════════════════════════════ */

.am-citybar { display: none; background: var(--am-city); color: #fff; padding-inline: 12px; }
.am-citybar__btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 8px; margin-inline-start: -8px; border: 0; border-radius: 2px; background: transparent; color: #fff; line-height: 1; cursor: pointer; font-size: 13px; }
.am-citybar__btn:hover { background: rgba(255, 255, 255, .1); }
.am-citybar__label { color: #e2eded; }
@media (max-width: 767.98px) { .am-citybar { display: block; } }

.am-citymodal__box, .am-modal__box { border-radius: 12px !important; overflow: hidden; }
.am-citymodal__head, .am-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--am-line-soft); }
.am-citymodal__head h2, .am-modal__head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--am-ink); }
.am-citymodal__head button { background: none; border: 0; color: var(--am-ink-2); cursor: pointer; padding: 4px; }
.am-citymodal__body { padding: 16px 20px; }
.am-citymodal__body p { margin: 0 0 10px; font-size: 12px; color: var(--am-ink-2); }
.am-citymodal__foot, .am-modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--am-line-soft); }
.am-modal__foot form { margin: 0; }

/* ═════════════════════════════ النوافذ المشتركة ═════════════════════════════ */

.am-modal__box { position: relative; }
.am-modal__x {
    position: absolute; top: 12px; inset-inline-end: 12px; z-index: 2; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
    border: 0; border-radius: 50%; background: #ededf2; color: var(--am-ink-2); cursor: pointer;
}
.am-modal__x:hover { background: var(--am-line-soft); color: var(--am-ink); }
.am-modal__x--inline { position: static; flex-shrink: 0; }
.am-modal__loading { padding: 24px; text-align: center; }
.am-modal__wait { padding: 40px; text-align: center; }
.am-modal__wait--err { color: var(--am-sale); }
.am-modal__body { padding: 16px 20px; }
.am-modal__head--center { flex-direction: column; text-align: center; }
.am-modal__head--center p { margin: 4px 0 0; color: var(--am-ink-2); font-weight: 600; }
.am-warn { color: #c45500 !important; }
.am-danger-note { color: var(--am-sale); font-weight: 700; font-style: italic; }
.am-warnlist { margin: 0; padding-inline-start: 18px; }
.am-warnlist li { margin-bottom: 8px; padding: 8px 10px; background: #fff8e6; border-inline-start: 3px solid var(--am-sale); list-style: none; font-weight: 600; }

.am-login { padding-bottom: 18px; }
.am-login__form { padding: 16px 20px 6px; }
.am-login__field { margin-bottom: 10px; }
.am-login__field .iti { width: 100%; }
.am-login__form .am-linkbtn { display: block; margin: 0 0 10px auto; }
.am-login__row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; font-size: 13px; }
.am-login__row a { color: var(--am-link); }
.am-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--am-ink-2); cursor: pointer; }
.am-login__code { width: auto !important; margin: 4px 20px 0; }
.am-login__new { margin: 14px 20px 0; text-align: center; font-size: 13px; color: var(--am-ink-2); }
.am-login__new a { color: var(--am-link); font-weight: 600; }
.am-login__or { display: flex; align-items: center; gap: 10px; margin: 16px 20px 12px; font-size: 12px; color: var(--am-ink-2); }
.am-login__or::before, .am-login__or::after { content: ""; flex: 1; border-top: 1px solid var(--am-line-soft); }
.am-login__social { display: flex; justify-content: center; gap: 12px; }
.am-login__soc { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--am-line); color: var(--am-ink) !important; font-size: 18px; text-decoration: none !important; }
.am-login__soc:hover { background: var(--am-band); }

/* اللوحة الجانبية لاختيار الخيارات: ثابتة خارج الشاشة يمينًا وتدخل بـ.active (العرض والإزاحة من صنف الصفحة $offcanvas_class) */
.am-offcanvas { position: fixed; top: 0; bottom: 0; height: 100vh; z-index: 1045; padding: 20px 0; background: #fff; overflow: hidden; }
.am-offcanvas-veil { position: fixed; top: 0; left: 0; width: 100%; height: 100%; }
.am-offcanvas__loading { height: 100%; display: flex; align-items: center; justify-content: center; }
.am-offcanvas__error { padding: 24px; color: var(--am-sale); }

.am-video { display: none; position: fixed; inset: 0; z-index: 1060; background: rgba(0, 0, 0, .85); align-items: center; justify-content: center; }
.am-video.active { display: flex; }
.am-video__box { position: relative; width: min(92vw, 960px); aspect-ratio: 16 / 9; }
.am-video__box video { width: 100%; height: 100%; background: #000; }
.am-video__x { position: absolute; top: -44px; inset-inline-end: 0; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: var(--am-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* ═════════════════════════════ الفوتر ═════════════════════════════ */

.am-recent { padding: 18px 0 8px; border-top: 1px solid var(--am-line-soft); background: var(--am-band); }
.am-recent__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; color: var(--am-ink); }
.am-recent__track { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.am-recent__item { flex: 0 0 150px; display: flex; flex-direction: column; gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--am-line-soft); border-radius: var(--am-r); color: var(--am-ink) !important; text-decoration: none !important; scroll-snap-align: start; }
.am-recent__item img { width: 100%; height: 132px; object-fit: contain; }
.am-recent__name { font-size: 12px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.am-recent__price { font-size: 13px; font-weight: 700; }
.am-recent__price del { margin-inline-start: 4px; font-weight: 400; color: var(--am-ink-2); font-size: 11px; }

.am-ft { background: var(--am-brand); color: #fff; margin-top: auto; }
.am-ft a { color: #fff; opacity: .9; text-decoration: none; }
.am-ft a:hover { opacity: 1; text-decoration: underline; color: #fff; }
.am-ft__news { padding: 40px 0 16px; text-align: center; }
.am-ft__news .am-wrapx { padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.am-ft__news h2 { margin: 0; font-size: 22px; font-weight: 700; color: #fff; }
.am-ft__news p { margin: 4px 0 14px; font-size: 14px; font-weight: 500; }
.am-ft__newsform { display: flex; gap: 12px; max-width: 540px; margin: 0 auto 8px; }
.am-ft__newsform input { flex: 2; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid #fff; border-radius: var(--am-r); background: #fff; color: var(--am-ink); font-size: 14px; }
.am-ft__newsform input::placeholder { color: #6f7373; }
.am-ft__newsform .am-btn { flex: 1; }

.am-ft__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 24px; padding-top: 24px; padding-bottom: 32px; }
.am-ft__head { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; background: none; color: #b9cccc; font-size: 14px; font-weight: 500; text-align: start; cursor: default; }
.am-ft__col--about .am-ft__head { display: none; }
.am-ft__links { list-style: none; margin: 0; padding: 0; }
.am-ft__links li { margin-bottom: 9px; font-size: 13px; }
.am-ft__logo { display: inline-block; opacity: 1 !important; }
.am-ft__logo img { height: 45px; width: auto; }
.am-ft__about { margin-top: 10px; font-size: 13px; opacity: .92; }
.am-ft__contact { margin: 0; font-size: 13px; }
.am-ft__contact dt { font-weight: 400; color: #b9cccc; margin-bottom: 2px; }
.am-ft__contact dd { margin: 0 0 12px; }
.am-ft__sub { margin: 14px 0 10px; font-size: 14px; color: #b9cccc; }
.am-ft__apps { display: flex; flex-wrap: wrap; gap: 12px; }
.am-ft__apps a { opacity: 1; }
.am-ft__apps img { display: block; width: auto; }

.am-social { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 24px 0 0; padding: 0; }
.am-social__a {
    width: 38px; height: 38px; display: flex !important; align-items: center; justify-content: center; border-radius: 50%;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .35); color: #fff !important; font-size: 18px; opacity: 1 !important;
}
.am-social__a:hover { background: rgba(255, 255, 255, .18); text-decoration: none !important; }

.am-ft__base { background: var(--am-brand-3); border-top: 1px solid rgba(255, 255, 255, .1); }
.am-ft__baserow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 22px; padding-bottom: 22px; }
.am-ft__copy { font-size: 14px; }
.am-ft__pay { flex-shrink: 1; min-width: 0; }

.am-only-narrow { display: none; }
@media (max-width: 991.98px) {
    .am-only-wide { display: none !important; }
    .am-only-narrow { display: block; }
    .am-ft__grid { display: block; padding-top: 0; padding-bottom: 8px; padding-inline: 0; }
    .am-ft__col { border-bottom: 1px solid rgba(255, 255, 255, .14); }
    .am-ft__head, .am-ft__col--about .am-ft__head {
        display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 18px 15px; color: #fff; font-size: 14px; cursor: pointer;
    }
    .am-ft__head::after { content: "+"; font-size: 20px; font-weight: 700; line-height: 1; }
    .am-ft__col.is-open .am-ft__head::after { content: "\2212"; }
    .am-ft__body { display: none; padding: 0 15px 16px; }
    .am-ft__col.is-open .am-ft__body { display: block; }
    .am-social { margin-top: 0; }
    .am-ft__baserow { flex-direction: column-reverse; text-align: center; }
}

/* ═════════════════════════════ شريط الجوال السفلي ═════════════════════════════ */

.am-bnav {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 1030; display: none; align-items: stretch; width: 100%; max-width: 100vw;
    background: #fff; border-top: 1px solid var(--am-line-soft); box-shadow: 0 -6px 18px rgba(0, 0, 0, .07);
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.am-bnav__item {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    padding: 10px 2px 8px; border: 0; background: none; color: var(--am-ink-2) !important; font-size: 10px; font-weight: 600; text-decoration: none !important; cursor: pointer;
}
.am-bnav__item > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.am-bnav__item.is-on { color: var(--am-brand) !important; }
.am-bnav__ico { position: relative; display: inline-flex; }
.am-bnav__dot { position: absolute; top: -2px; inset-inline-end: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--am-sale); }
.am-bnav__avatar { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
@media (max-width: 1199.98px) {
    .am-bnav { display: flex; }
    .am-shell { padding-bottom: var(--am-bnav-h); }
}
@media (min-width: 576px) and (max-width: 1199.98px) {
    .am-bnav { inset-inline: 8px; bottom: 8px; width: auto; border: 1px solid var(--am-line-soft); border-radius: 12px; }
}

/* ═════════════════════════════ التنبيهات العائمة والنوافذ الترويجية ═════════════════════════════ */

.am-alerts { position: fixed; z-index: 1035; display: flex; flex-direction: column; gap: 12px; max-width: 340px; padding: 0; }
.am-alerts--bottom-left { left: 30px; bottom: 30px; }
.am-alerts--bottom-right { right: 30px; bottom: 30px; }
.am-alerts--top-left { left: 30px; top: 30px; }
.am-alerts--top-right { right: 30px; top: 30px; }
.am-alert {
    position: relative; background: #fff; border: 1px solid var(--am-line); border-radius: var(--am-r);
    box-shadow: 0 4px 16px rgba(15, 17, 17, .15); padding: 12px 14px; transition: opacity .35s ease, transform .35s ease;
}
.am-alert.is-leaving { opacity: 0; transform: translateY(8px); }
.am-alert__text { margin-bottom: 10px; font-size: 13px; color: var(--am-ink); }
.am-alert__text p { margin: 0; }
.am-alert .am-btn { min-height: 32px; padding: 6px 12px; font-size: 13px; }
.am-alert--promo { padding: 0; overflow: hidden; }
.am-alert__promo { display: block; color: inherit; text-decoration: none; }
.am-alert__promo img { display: block; width: 100%; }
.am-alert__promo--row { display: flex; }
.am-alert__promo--row img { width: 120px; height: 140px; object-fit: cover; }
.am-alert--promo .am-alert__text { display: block; padding: 14px; margin: 0; }
.am-alert__x { position: absolute; top: 6px; inset-inline-end: 6px; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--am-ink); cursor: pointer; }
@media (max-width: 1199.98px) {
    /* فوق شريط الجوال السفلي لا تحته */
    .am-alerts { left: 12px; right: auto; bottom: calc(var(--am-bnav-h) + 16px); top: auto; max-width: calc(100vw - 96px); }
}

.am-popups { position: fixed; inset: 0; z-index: 1055; display: flex; align-items: center; justify-content: center; }
.am-popups__veil { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); }
.am-popup { position: relative; width: min(92vw, 420px); background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, .3); }
.am-popup__x { position: absolute; top: 10px; inset-inline-end: 10px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .9); cursor: pointer; }
.am-popup__img { display: block; width: 100%; max-height: 260px; object-fit: cover; }
.am-popup__body { padding: 18px 20px; text-align: center; }
.am-popup__body h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.am-popup__body p { margin: 0 0 14px; color: var(--am-ink-2); font-size: 15px; }
.am-popup__form input { margin-bottom: 10px; width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--am-line); border-radius: var(--am-r); }
.am-popup__time { height: 4px; background: var(--am-line-soft); }
.am-popup__time i { display: block; height: 100%; width: 0; background: var(--am-brand); }

@media print {
    .am-header, .am-citybar, .am-ft, .am-bnav, .am-alerts, .am-popups, #almadah-ai-footer { display: none !important; }
}
