/*
=================================================================
  ✅ 1. MOBILE HEADER & HORIZONTAL SCROLLING (For screens < 992px)
=================================================================
*/
@media (max-width: 991.98px) {

    /* --- Base Layout & Logo Centering --- */
    .header-mobile .container {
        position: relative;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-mobile .logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
    }

    /* --- Icon Visibility & Arrangement --- */
    .header-mobile .header-tool-icon {
        display: none !important;
    }

    .header-tools-mobile {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .header-mobile .header-tools__item {
        display: block !important;
    }

    .header-mobile .theme-switcher {
        display: inline-flex !important;
    }

    /* --- Styling for User Actions inside the Slide-out Panel --- */
    .mobile-nav-panel .panel-footer {
        border-top: 1px solid #e0e0e0;
        padding: 1rem 1.5rem;
        margin-top: auto;
    }

    .panel-user-actions .btn {
        text-transform: uppercase;
        font-weight: 600;
        width: 100%;
    }

    .panel-footer .social-links {
        justify-content: center;
        gap: 1.5rem;
    }

    [data-theme="dark"] .mobile-nav-panel .panel-footer {
        border-top-color: var(--dm-border);
    }

    /* --- Horizontal Scrolling for Sections --- */
    .swiper.markets-swiper,
    .swiper.products-swiper {
        margin-left: -15px;
        margin-right: -15px;
        padding: 0 15px 10px 15px;
        cursor: grab;
    }

    .markets-swiper .swiper-slide,
    .products-swiper .swiper-slide {
        width: 70%;
        max-width: 300px;
        height: auto;
    }

    @media (min-width: 576px) {

        .markets-swiper .swiper-slide,
        .products-swiper .swiper-slide {
            width: 50%;
        }
    }

    @media (min-width: 768px) {

        .markets-swiper .swiper-slide,
        .products-swiper .swiper-slide {
            width: 40%;
        }
    }

    .swiper-scrollbar {
        background: rgba(0, 0, 0, 0.1);
        position: relative;
        bottom: -10px;
        left: 15px;
        width: calc(100% - 30px);
        height: 4px;
        margin-top: 20px;
    }

    .swiper-scrollbar-drag {
        background: var(--wm-red, #A52A2A);
        border-radius: 2px;
    }
}

/*
=================================================================
  ✅ 2. MOBILE FOOTER CENTERING FIX (النسخة النهائية والمؤكدة)
=================================================================
*/
@media (max-width: 767.98px) {

    .footer .footer-column {
        text-align: center !important;
    }

    .footer-column.footer-store-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* هذه القاعدة ستعمل الآن بسبب الإصلاح في الخطوة 3 */
    }


    .footer-column.footer-store-info .logo {
        width: auto;
        /* يلغي أي عرض 100% موروث */
        display: inline-block;
        /* يجعله يتصرف بشكل جيد داخل flex */
    }


    .footer .social-links {
        justify-content: center !important;
    }


    .footer-bottom .container {
        flex-direction: column !important;
        gap: 0.5rem !important;
        text-align: center !important;
    }
}