/* ============================================================
   KARAM — ملف CSS خاص بهذا التمبلت فقط
   يُحمّل هذا الملف فقط مع تمبلت "كرم"، فأي تعديل هنا لا يؤثر
   على باقي التمبلتات. (لعزل إضافي يمكنك تصدير القاعدة بـ
   body.tpl-karam ... لكنه ليس ضرورياً لأن الملف خاص بالتمبلت.)
   هنا كل تحكّم الهيدر والفوتر لتمبلت كرم.
   ============================================================ */

/* ==========================================================
   الهيدر (HEADER)
   ========================================================== */
.km-header .container, .km-delivery .container, .km-announce .container { width:100%; max-width:100%; }
.km-header { position:sticky; top:0; z-index:500; }
.km-header__row { position:relative; direction:ltr; display:flex; align-items:center; justify-content:space-between; gap:10px; min-height:56px; background:var(--brand,#8a1538); padding:12px 0; }
.km-brand { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); z-index:1; }
.km-brand img { max-width:150px; }
.km-header__side { display:flex; align-items:center; gap:20px; flex:0 0 auto; z-index:2; }
.km-header__side--start { justify-content:flex-start; }
.km-header__side--end { justify-content:flex-end; }
.km-hicon, .km-hlang { display:inline-flex; align-items:center; gap:7px; color:#f6e3c8; font-size:14px; font-weight:700; }
.km-hicon i { font-size:22px; }
.km-hicon:hover, .km-hlang:hover { color:#fff; }
.km-hcart { position:relative; }
.km-cart-count { position:absolute; top:-8px; inset-inline-start:12px; min-width:17px; height:17px; padding:0 4px; border-radius:9px; background:#fff; color:var(--brand,#8a1538); font-size:10px; font-weight:800; display:flex; align-items:center; justify-content:center; line-height:1; }
.km-cart-count[data-count="0"], .km-cart-count:empty { display:none; }
.km-brand { text-align:center; }
.km-brand img { max-height:66px; width:auto; object-fit:contain; margin:auto; }

/* شريط التوصيل */
.km-delivery { background:color-mix(in srgb, var(--brand,#8a1538) 82%, #000); }
.km-delivery .container { display:flex; align-items:center; justify-content:center; gap:16px; padding:10px 0; }
.km-delivery__loc { color:#e9d3ba; font-size:13px; }
.km-delivery__loc i { color:#f6e3c8; }
.km-delivery__btn { background:#f6e3c8; color:var(--brand,#8a1538); font-weight:800; font-size:13px; padding:6px 22px; border-radius:6px; }

/* شريط الإعلان */
.km-announce { background:var(--page-bg,#fbf3e2); border-bottom:1px solid color-mix(in srgb, var(--brand,#8a1538) 18%, transparent); }
.km-announce .container { text-align:center; padding:9px 0; }
.km-announce span { color:var(--brand,#8a1538); font-size:13.5px; font-weight:700; }

/* ==========================================================
   الفوتر (FOOTER)
   ========================================================== */
.km-footer { flex-shrink:0; }
.km-footer { background:var(--brand,#8a1538); color:#f0dcc0; padding:34px 0 26px; text-align:center; margin-top:24px; }
.km-footer__social { display:flex; gap:14px; justify-content:center; margin-bottom:22px; }
.km-footer__social a { width:38px; height:38px; border-radius:50%; background:rgba(255,255,255,.12); display:flex; align-items:center; justify-content:center; color:#fff; font-size:19px; }
.km-footer__social a:hover { background:#fff; color:var(--brand,#8a1538); }
.km-footer__apps { display:flex; flex-direction:column; gap:10px; align-items:center; margin-bottom:20px; }
.km-app { display:inline-flex; align-items:center; gap:10px; background:#111; color:#fff; padding:8px 18px; border-radius:8px; min-width:180px; }
.km-app i { font-size:26px; } .km-app span { display:flex; flex-direction:column; line-height:1.1; font-weight:700; font-size:15px; text-align:start; } .km-app small { font-size:9px; font-weight:400; opacity:.85; }
.km-footer__copy { font-size:13px; color:#e9d3ba; margin-bottom:18px; }
.km-footer__pay { display:flex; gap:12px; justify-content:center; align-items:center; font-size:30px; color:#fff; }
.km-pay { background:#fff; color:#111; font-size:13px; font-weight:800; padding:5px 9px; border-radius:5px; display:inline-flex; align-items:center; gap:2px; }
.km-pay--knet { color:#d6002a; } .km-pay--apay i { font-size:16px; }

/* ==========================================================
   الموبايل — هيدر وفوتر
   ========================================================== */
@media (max-width:991px){
    .km-brand img { max-height:52px; }
    .km-header__side { gap:14px; }
    footer.km-footer { display:block !important; padding:26px 0 22px; margin-top:20px; }
    .km-footer__apps { flex-direction:row; flex-wrap:wrap; justify-content:center; gap:10px; }
    .km-app { min-width:150px; padding:7px 14px; }
    .km-app span { font-size:13px; } .km-app i { font-size:22px; }
    .km-footer__social a { width:34px; height:34px; font-size:17px; }
    .km-footer__pay { font-size:26px; flex-wrap:wrap; }
    .km-footer__copy { font-size:12px; }
}
@media (max-width:575px){
    .km-header__row { gap:6px; padding:10px 0; }
    .km-brand img { max-height:40px; max-width:108px; }
    .km-hicon i { font-size:20px; }
    .km-hlang { font-size:12px; }
    .km-cart-count { inset-inline-start:11px; }
    .km-header__side { gap:8px; }
    .km-delivery .container { gap:10px; }
    .km-delivery__loc { font-size:11.5px; }
    .km-delivery__btn { padding:5px 16px; font-size:12px; }
    .km-announce span { font-size:11px; }
    .km-announce .container { padding:7px 10px; }
}

/* KARAM — keep Go Top button above mobile bottom navigation */
@media (max-width: 767.98px) {
    .tpl-karam .km-gotop {
        position: fixed !important;
        right: 16px !important;
        bottom: 82px !important;

        width: 44px !important;
        height: 44px !important;

        display: grid !important;
        place-items: center !important;

        z-index: 9999 !important;
    }

    [dir="rtl"] .tpl-karam .km-gotop {
        right: auto !important;
        left: 16px !important;
    }
}
