/**
 * Ahlmall footer — professional layout, unified dark surface (day + night).
 */

.ahlmall-footer.footer_shopwise {
    --ahlm-footer-bg: #25282c;
    --ahlm-footer-surface: transparent;
    --ahlm-footer-heading: #ffffff;
    --ahlm-footer-text: rgba(255, 255, 255, 0.82);
    --ahlm-footer-muted: rgba(255, 255, 255, 0.58);
    --ahlm-footer-border: rgba(255, 255, 255, 0.1);
    --ahlm-footer-accent: var(--color-1st, #fd6a00);
    --ahlm-footer-link-hover: #ffb366;
    --ahlm-footer-bottom-bg: rgba(0, 0, 0, 0.22);
    width: 100%;
    overflow: hidden;
    background-color: var(--ahlm-footer-bg) !important;
    color: var(--ahlm-footer-text);
}

html.ahlmall-dark-mode .ahlmall-footer.footer_shopwise {
    --ahlm-footer-bg: #1a1c1e;
    --ahlm-footer-heading: #f5f6f7;
    --ahlm-footer-text: rgba(255, 255, 255, 0.78);
    --ahlm-footer-muted: rgba(255, 255, 255, 0.52);
    --ahlm-footer-border: rgba(255, 255, 255, 0.08);
    --ahlm-footer-bottom-bg: rgba(0, 0, 0, 0.32);
}

/* Override legacy Shopwise footer spacing */
.ahlmall-footer.footer_shopwise .footer_top,
footer.ahlmall-footer .footer_top {
    padding: 2.75rem 0 2rem !important;
    border-top: 1px solid var(--ahlm-footer-border);
    background: var(--ahlm-footer-bg) !important;
}

.ahlmall-footer .footer_main_row {
    margin-left: -14px;
    margin-right: -14px;
    row-gap: 1.75rem;
}

.ahlmall-footer .footer_main_row > [class*='col-'] {
    padding-left: 14px;
    padding-right: 14px;
    margin-bottom: 0 !important;
}

@media (min-width: 1200px) {
    .ahlmall-footer .footer_main_row {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .ahlmall-footer .footer_main_row > [class*='col-'] {
        display: flex;
        flex-direction: column;
    }
}

.ahlmall-footer .footer_top .widget,
footer.ahlmall-footer .widget {
    margin-bottom: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    height: auto !important;
}

.ahlmall-footer .widget_title,
.ahlmall-footer h6.widget_title {
    color: var(--ahlm-footer-heading) !important;
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    text-transform: none !important;
    margin: 0 0 0.85rem !important;
    padding: 0 0 0.5rem !important;
    border: none !important;
    border-bottom: 2px solid var(--ahlm-footer-accent) !important;
    display: inline-block;
    line-height: 1.35;
}

.ahlmall-footer .footer_brand_block .footer_logo {
    margin-bottom: 0.75rem;
}

.ahlmall-footer .footer_brand_block .footer_logo a {
    display: block;
    line-height: 0;
}

.ahlmall-footer .footer_brand_block .footer_logo .ahlmall-footer-logo,
.ahlmall-footer .footer_brand_block .footer_logo img {
    width: min(100%, 190px) !important;
    max-width: 190px !important;
    height: auto !important;
    max-height: none !important;
    display: block !important;
    filter: brightness(1.02);
}

.ahlmall-footer .footer_about p {
    margin-bottom: 0;
    line-height: 1.65;
    font-size: 0.875rem;
    color: var(--ahlm-footer-text) !important;
}

.ahlmall-footer .footer_social_strip {
    margin-top: 1rem !important;
    padding-top: 0;
    border-top: none !important;
}

.ahlmall-footer .footer_social_strip .social_icons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.ahlmall-footer .footer_social_strip .social_icons li {
    padding: 0;
    margin: 0;
}

.ahlmall-footer .footer_social_strip .social_icons li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 15px;
    color: #fff !important;
    line-height: 1;
    box-shadow: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ahlmall-footer .footer_social_strip .social_icons li a:hover {
    transform: translateY(-2px);
    opacity: 0.9;
    color: #fff !important;
}

.ahlmall-footer .footer_social_strip .social_icons li a.sc_facebook { background-color: #3b5998 !important; }
.ahlmall-footer .footer_social_strip .social_icons li a.sc_twitter { background-color: #1da1f2 !important; }
.ahlmall-footer .footer_social_strip .social_icons li a.sc_youtube { background-color: #c4302b !important; }
.ahlmall-footer .footer_social_strip .social_icons li a.sc_instagram {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045) !important;
}
.ahlmall-footer .footer_social_strip .social_icons li a.sc_whatsapp {
    background: linear-gradient(145deg, #34e077 0%, #25d366 100%) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}
.ahlmall-footer .footer_social_strip .social_icons li a.sc_whatsapp i {
    font-size: 18px;
    line-height: 1;
    color: #fff !important;
}
.ahlmall-footer .footer_social_strip .social_icons li a.sc_whatsapp:hover {
    background: linear-gradient(145deg, #2ecc71 0%, #1fa855 100%) !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
    color: #fff !important;
}
.ahlmall-footer .footer_social_strip .social_icons.social_white li a.sc_whatsapp:hover,
.ahlmall-footer .footer_social_strip .social_icons.social_white li a.sc_whatsapp:hover i {
    color: #fff !important;
}

.ahlmall-footer .widget_links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ahlmall-footer .widget_links li {
    margin-bottom: 0.3rem;
    padding-bottom: 0 !important;
}

.ahlmall-footer .widget_links li a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.22rem 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--ahlm-footer-text) !important;
    text-decoration: none;
    transition: color 0.2s ease, padding-inline-start 0.2s ease;
}

.ahlmall-footer .widget_links li a:hover,
.ahlmall-footer .widget_links li a:focus-visible {
    color: var(--ahlm-footer-link-hover) !important;
    padding-inline-start: 3px;
    outline: none;
}

.ahlmall-footer .widget_links li a span {
    color: inherit !important;
}

.ahlmall-footer .ahlmall-footer-link-icon {
    display: none !important;
}

.ahlmall-footer .footer_contact_widget .contact_info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ahlmall-footer .footer_contact_widget .contact_info > li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0.65rem;
}

.ahlmall-footer .footer_contact_widget .contact_info > li:last-child {
    margin-bottom: 0;
}

.ahlmall-footer .footer_contact_widget .contact_info i {
    flex-shrink: 0;
    width: 1.1rem;
    margin: 0.12rem 0 0 !important;
    font-size: 0.95rem;
    color: var(--ahlm-footer-accent) !important;
    border: none !important;
    float: none !important;
}

.ahlmall-footer .footer_contact_widget .contact_info p,
.ahlmall-footer .footer_contact_widget .contact_info a {
    margin: 0 !important;
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--ahlm-footer-text) !important;
    overflow: visible !important;
    max-width: none !important;
    display: block;
    float: none !important;
}

.ahlmall-footer .footer_contact_widget .contact_info a:hover {
    color: var(--ahlm-footer-link-hover) !important;
}

.ahlmall-footer .bottom_footer {
    padding: 0.9rem 0 !important;
    background: var(--ahlm-footer-bottom-bg) !important;
    border-top: 1px solid var(--ahlm-footer-border) !important;
}

.ahlmall-footer .bottom_footer p,
.ahlmall-footer .bottom_footer a {
    color: var(--ahlm-footer-muted) !important;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.ahlmall-footer .bottom_footer a:hover {
    color: var(--ahlm-footer-link-hover) !important;
}

.ahlmall-footer .footer_payment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ahlmall-footer .footer_payment li img {
    opacity: 0.92;
    border-radius: 4px;
    height: auto;
    background: #fff;
    padding: 2px 4px;
}

@media (max-width: 767px) {
    .ahlmall-footer .footer_top {
        padding: 2rem 0 1.5rem !important;
    }

    .ahlmall-footer .footer_top .widget,
    .ahlmall-footer .widget_title {
        text-align: center;
    }

    .ahlmall-footer .widget_title {
        display: block;
    }

    .ahlmall-footer .footer_social_strip .social_icons {
        justify-content: center;
    }

    .ahlmall-footer .footer_contact_widget .contact_info > li {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
    }

    .ahlmall-footer .bottom_footer p,
    .ahlmall-footer .bottom_footer .footer_payment {
        text-align: center !important;
    }

    .ahlmall-footer .footer_payment {
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .ahlmall-footer .footer_main_row > [class*='col-'] {
        margin-bottom: 1.25rem !important;
    }

    .ahlmall-footer .footer_main_row > [class*='col-']:last-child {
        margin-bottom: 0 !important;
    }
}

/* Scroll-up — لا يتداخل مع الشات */
.ahlmall-footer ~ .scrollup,
body .scrollup {
    z-index: 99980 !important;
}

html[dir='rtl'] body .scrollup {
    right: 18px !important;
    left: auto !important;
    bottom: 22px !important;
}

html:not([dir='rtl']) body .scrollup {
    right: 18px !important;
    bottom: 88px !important;
}
