/* =========================================
   ALAALI — CLEAN CUSTOM CSS
   ========================================= */


/* =========================================
   1. Main Content
   ========================================= */

#main-content {
    background-color: #E8E8E8 !important;
}

main {
    margin-bottom: 0 !important;
    padding-bottom: 20px !important;
}

main > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

footer {
    margin-top: 0 !important;
}


/* =========================================
   2. ALAALI Benefits Banner
   ========================================= */

footer::before {
    content: "";
    display: block;

    width: calc(100% - 40px);
    max-width: 1400px;

    aspect-ratio: 2048 / 230;

    margin: 5px auto;
    border-radius: 6px;

    background-image: url("https://cdn.files.salla.network/other/1534602561/b2ea3724-2aae-471f-bb1b-01e202d74545-original.webp");
    background-size: 100% auto;
    background-position: center;
    background-repeat: no-repeat;
}


/* =========================================
   3. Footer
   ========================================= */

/* إخفاء شارات الثقة */
footer salla-trust-badges,
footer .s-trust-badges-wrapper {
    display: none !important;
}

/* إخفاء عمود الروابط المهمة */
footer[data-testid="store-footer"]
.store-footer__inner
.grid > div:nth-child(2) {
    display: none !important;
}

/* تواصل معنا — اليسار */
footer[data-testid="store-footer"]
.store-footer__inner
.grid > div:nth-child(1) {
    grid-column: 1 / 3 !important;
}

/* ALAALI — اليمين */
footer[data-testid="store-footer"]
.store-footer__inner
.grid > div:nth-child(3) {
    grid-column: 5 / 7 !important;
}

/* تقليل ارتفاع الفوتر */
footer[data-testid="store-footer"] .store-footer__inner {
    min-height: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

footer[data-testid="store-footer"] .store-footer__inner .grid {
    row-gap: 0 !important;
    align-items: center !important;
}

footer[data-testid="store-footer"]
.store-footer__inner
.grid > div {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}


/* =========================================
   4. Top Black Bar
   ========================================= */

/* إظهار جميع الروابط التي تولدها سلة في الشريط العلوي */
.s-menu-topnav-list {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
}

.s-menu-topnav-list > a {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    max-width: none !important;
    overflow: visible !important;
    white-space: nowrap !important;
}


/* =========================================
   5. Header Cleanup
   ========================================= */

/* إخفاء البريد الإلكتروني من الرأس */
header salla-contacts {
    display: none !important;
}


/* =========================================
   6. Header Logo
   ========================================= */

header [data-testid="store-header-logo"] {
    width: auto !important;
    max-width: none !important;
}

header [data-testid="store-header-logo"] img {
    width: auto !important;
    height: 65px !important;
    max-height: 65px !important;
    object-fit: contain !important;
}


/* =========================================
   7. Mobile
   ========================================= */

@media (max-width: 768px) {

    footer::before {
        width: calc(100% - 20px);
        margin: 10px auto 8px;
    }

    footer[data-testid="store-footer"] .store-footer__inner {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
}