/* Fekra Premium Homepage Overrides */
/* All rules in this file are scoped to .route-common-home to prevent leaks to other pages */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

.route-common-home {
    font-family: 'Cairo', sans-serif !important;
}

.route-common-home h1, 
.route-common-home h2, 
.route-common-home h3, 
.route-common-home h4, 
.route-common-home h5, 
.route-common-home h6,
.route-common-home .module-title,
.route-common-home .main-menu,
.route-common-home .product-title,
.route-common-home .price {
    font-family: 'Cairo', sans-serif !important;
}

/* Typography Refinements */
.route-common-home .module-title {
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.route-common-home .product-title {
    font-weight: 600;
    line-height: 1.4;
}

/* ==========================================================================
   1. HERO SECTION & CAMPAIGN HIERARCHY
   ========================================================================== */

/* Main slider container */
.route-common-home .journal-slider {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.route-common-home .journal-slider:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Slider CTAs */
.route-common-home .tp-caption a.btn {
    font-family: 'Cairo', sans-serif !important;
    font-weight: 600;
    border-radius: 8px;
    padding: 12px 28px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.route-common-home .tp-caption a.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

/* Promo Banners Grid */
.route-common-home .banners-grid .banner-grid-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.route-common-home .banners-grid .banner-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   2. BRANDS CAROUSEL (manufacturers Module)
   ========================================================================== */

/* Align brand carousel styling */
.route-common-home .manufacturers-carousel {
    padding: 15px 0;
}

/* Brand logos */
.route-common-home .manufacturers-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border: 1px solid #f0f2f5;
    border-radius: 10px;
    height: 85px !important;
    padding: 10px;
    transition: all 0.3s ease;
}

.route-common-home .manufacturers-carousel .swiper-slide img {
    max-width: 100%;
    max-height: 50px;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.route-common-home .manufacturers-carousel .swiper-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    border-color: #0d52d6;
}

.route-common-home .manufacturers-carousel .swiper-slide:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   3. HEADER & SEARCH EXPERIENCE
   ========================================================================== */

.route-common-home .header-search .search-input:focus {
    outline: none !important;
}


.route-common-home .header-search .search-button:hover {
    background: #5c7712 !important;
}

.route-common-home .header-search .search-categories:hover {
    background: #5c7712 !important;
}


/* Dropdown arrow alignment */
.route-common-home .header-search .search-categories-button::after {
    color: #ffffff !important;
    margin-inline-start: 10px !important;
    font-size: 10px !important;
}

/* --- BORDER-RADIUS SYMMETRY FOR LTR --- */
html[dir="ltr"] .route-common-home .header-search .search-categories {
    border-radius: 6px 0 0 6px !important; /* Left rounded, accounts for 2px outer border */
}
html[dir="ltr"] .route-common-home .header-search .search-button {
    border-radius: 0 6px 6px 0 !important; /* Right rounded */
}

/* --- BORDER-RADIUS SYMMETRY FOR RTL --- */
html[dir="rtl"] .route-common-home .header-search .search-categories {
    border-radius: 0 6px 6px 0 !important; /* Right rounded */
}
html[dir="rtl"] .route-common-home .header-search .search-button {
    border-radius: 6px 0 0 6px !important; /* Left rounded */
}


.search-categories .j-dropdown ul li a:hover {
    color: #709117 !important;
    background: #f1f5f9 !important;
}

/* --- MOBILE SEARCH UX (HYBRID OPTION C) --- */
@media (max-width: 767px) {
    .route-common-home .header-search .search-categories {
        min-width: 44px !important;
        max-width: 44px !important;
        width: 44px !important;
    }
    .route-common-home .header-search .search-categories-button {
        font-size: 0 !important; /* Hide category text node */
        justify-content: center !important;
        padding: 0 !important;
    }
    .route-common-home .header-search .search-categories-button::after {
        margin-inline-start: 0 !important; /* Center the arrow icon */
        font-size: 12px !important;
    }
}

/* Align Cart & Header Spacing on Homepage */
.route-common-home .header-cart {
    transition: transform 0.2s ease;
}

.route-common-home .header-cart:hover {
    transform: scale(1.03);
}

/* ==========================================================================
   4. PREMIUM PRODUCT CARDS
   ========================================================================== */

/* Main Product Thumb Override */
.route-common-home .product-grid-item,
.route-common-home .product-layout {
    background: #ffffff !important;
    border: 1px solid #eef1f6 !important;
    border-radius: 12px !important;
    overflow: hidden;
    padding: 15px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
}

.route-common-home .product-grid-item:hover,
.route-common-home .product-layout:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07) !important;
    border-color: #0d52d6 !important;
}

/* Image scaling inside Product Cards */
.route-common-home .product-grid-item .image img,
.route-common-home .product-layout .image img {
    transition: transform 0.3s ease !important;
}

.route-common-home .product-grid-item:hover .image img,
.route-common-home .product-layout:hover .image img {
    transform: scale(1.05) !important;
}

/* Premium Product Labels (Special Discounts) */
.route-common-home .product-label strong {
    font-size: 11px !important;
    font-weight: 700 !important;
    border-radius: 4px !important;
    padding: 3px 8px !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    letter-spacing: 0.2px;
}

/* Green design for sale and savings labels */
.route-common-home .product-label-sale strong,
.route-common-home .product-label-special strong,
.route-common-home .product-label-discount strong {
    background-color: #10b981 !important; /* Emerald green like Noon/Jarir */
    color: #ffffff !important;
}

/* Enlarged price layout hierarchy */
.route-common-home .price-new {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a1e26 !important;
}

.route-common-home .price-old {
    font-size: 13px !important;
    color: #a0aec0 !important;
    margin-left: 5px !important;
}

/* ==========================================================================
   5. PREMIUM TABS DESIGN (nav-tabs)
   ========================================================================== */

.route-common-home .nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important; /* Hide scrollbar in Firefox */
    gap: 10px !important;
    border: 1px solid #f1f5f9 !important; /* Elegant subtle border */
    background: #ffffff !important; /* Clean white card style */
    padding: 10px 16px !important;
    border-radius: 12px !important; /* Matching premium product cards */
    margin: 0 0 25px 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
    list-style: none !important;
}

.route-common-home .nav-tabs::-webkit-scrollbar {
    display: none !important; /* Hide scrollbar in Chrome/Safari */
}

.route-common-home .nav-tabs > li {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    flex: 0 0 auto !important; /* Prevent tab shrinking on mobile horizontal scroll */
    float: none !important;
}

.route-common-home .nav-tabs > li > a {
    display: block !important;
    background: #f1f5f9 !important; /* Premium soft grey background for inactive tabs */
    color: #475569 !important; /* Premium slate grey text */
    border: none !important;
    border-radius: 30px !important; /* Pill shaped tabs */
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: none !important;
    white-space: nowrap !important;
}

/* Hover state for inactive tabs */
@media (hover: hover) {
    .route-common-home .nav-tabs > li > a:hover {
        background: #e2e8f0 !important;
        color: #0f172a !important;
        transform: translateY(-1px);
    }
}

/* Active tab style using the core Fekra green color */
.route-common-home .nav-tabs > li.active > a,
.route-common-home .nav-tabs > li.active > a:hover,
.route-common-home .nav-tabs > li.active > a:focus {
    color: #ffffff !important;
    background: #709117 !important; /* Fekra olive green */
    box-shadow: 0 4px 12px rgba(112, 145, 23, 0.35) !important; /* Soft glowing active shadow */
    border: none !important;
    transform: none !important;
}

/* ==========================================================================
   6. PREMIUM FLYOUT MENU & SIDEBAR ALIGNMENT (Categories & Best Sellers)
   ========================================================================== */

/* Remove any parent container background, borders, and shadows on left and right sidebars */
.route-common-home .grid-col-top-1-1,
.route-common-home .grid-col-top-1-1 > .grid-items,
.route-common-home .grid-col-top-1-1 .grid-item,
.route-common-home .grid-col-top-1-3,
.route-common-home .grid-col-top-1-3 > .grid-items,
.route-common-home .grid-col-top-1-3 .grid-item {
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

/* Universal Layout and Hover Styles (Mobile First) */
html.desktop-header-active div.global-wrapper div.flyout-menu-879,
html div.global-wrapper div.flyout-menu-879,
.route-common-home .flyout-menu-879 {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    background: #ffffff !important; /* Premium clean white background */
    border: 1px solid #eef1f6 !important;
    border-radius: 12px !important;
    overflow: visible !important; /* Set to visible to allow hover sub-menus to show */
    padding: 12px !important;
    box-shadow: none !important;
    width: 100% !important; /* Symmetrical column width */
    position: relative !important;
    z-index: 999 !important; /* Keep above middle slider */
}

/* Format the flyout tooltip sub-menus to look premium */
.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown {
    background: #ffffff !important;
    border: 1px solid #eef1f6 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    padding: 10px !important;
    min-width: 200px !important;
    box-sizing: border-box !important;
    z-index: 9999 !important;
}

.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown ul.j-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown ul.j-menu li.menu-item {
    height: auto !important;
    min-height: 0 !important;
    flex: 0 0 auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown ul.j-menu li.menu-item a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 14px !important;
    color: #475569 !important; /* Slate grey */
    font-weight: 500 !important;
    font-size: 13px !important;
    font-family: 'Cairo', sans-serif !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    box-sizing: border-box !important;
    width: 100% !important;
    text-decoration: none !important;
}

.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown ul.j-menu li.menu-item a:hover {
    background: #f1f5f9 !important;
    color: #709117 !important; /* Brand green */
}

/* Hide count badge zero inside dropdowns */
.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown .count-badge {
    display: none !important;
}

/* Force the UL menu container to take natural height */
html.desktop-header-active div.global-wrapper div.flyout-menu-879 > ul.j-menu,
html div.global-wrapper div.flyout-menu-879 > ul.j-menu,
.route-common-home .flyout-menu-879 > ul.j-menu,
.route-common-home .flyout-menu-879 > .j-menu {
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0 !important; /* Flush items for unified row heights */
    padding: 0 !important;
    margin: 0 !important;
}

/* Force LI items to occupy only their natural height */
html.desktop-header-active div.global-wrapper div.flyout-menu-879 > ul.j-menu > li,
html div.global-wrapper div.flyout-menu-879 > ul.j-menu > li,
.route-common-home .flyout-menu-879 > ul.j-menu > li,
.route-common-home .flyout-menu-879 > .j-menu > li,
.route-common-home .flyout-menu-879 > .j-menu > .menu-item {
    height: 48px !important; /* Unified row height */
    min-height: 48px !important;
    flex: 0 0 48px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Force links to take natural padding height and flex centering */
html.desktop-header-active div.global-wrapper div.flyout-menu-879 > ul.j-menu > li > a,
html div.global-wrapper div.flyout-menu-879 > ul.j-menu > li > a,
.route-common-home .flyout-menu-879 > ul.j-menu > li > a,
.route-common-home .flyout-menu-879 > .j-menu > li > a,
.route-common-home .flyout-menu-879 > .j-menu > .menu-item > a {
    height: 100% !important;
    min-height: 100% !important;
    padding: 0 14px !important; /* Generous spacing */
    border-radius: 8px !important;
    color: #334155 !important; /* Premium slate text */
    font-weight: 500 !important;
    font-size: 13px !important; /* Typography optimization */
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important; /* Perfect vertical centering */
    box-sizing: border-box !important;
}

/* Hover style for category items */
.route-common-home .flyout-menu-879 > .j-menu > .menu-item > a:hover {
    background: #f1f5f9 !important; /* Soft premium grey hover */
    color: #709117 !important; /* Link with brand olive color */
    transform: translateX(-3px) !important; /* Subtle slide effect */
}

/* RTL translation fix */
html[dir="rtl"] .route-common-home .flyout-menu-879 > .j-menu > .menu-item > a:hover {
    transform: translateX(3px) !important;
}

/* Style the icon image */
.route-common-home .flyout-menu-879 > .j-menu > .menu-item .menu-image {
    margin-inline-end: 10px !important; /* Refined spacing */
    margin-inline-start: 0px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s ease !important;
    flex-shrink: 0 !important;
}

/* Icon size optimization */
.route-common-home .flyout-menu-879 > .j-menu > .menu-item .menu-image img {
    width: 20px !important;
    height: 20px !important;
    object-fit: contain !important;
}

.route-common-home .flyout-menu-879 > .j-menu > .menu-item:hover .menu-image {
    transform: scale(1.1) !important; /* Scale up icon slightly on hover */
}

/* Flat List layout for products inside Best Sellers (Removes inner cards) */
.route-common-home .module-side_products-858 .product-layout,
.route-common-home .module-side_products-858 .side-product {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
}

.route-common-home .module-side_products-858 .product-layout {
    padding: 8px 0 !important;
    border-bottom: 1px solid #f1f5f9 !important; /* Subtle line between items */
}

.route-common-home .module-side_products-858 .product-layout:last-child {
    border-bottom: none !important; /* Remove line for last item */
}

/* ==========================================================
   FIX: DOUBLE FLYOUT PANEL VISUAL DUPLICATION
   Module: Flyout Menu 879
   Scope: Homepage only
   ========================================================== */

.route-common-home .flyout-menu-879 .dropdown-menu.j-dropdown > ul.j-menu {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

/* --- DESKTOP GRID ROW EQUAL HEIGHTS & SYMMETRY --- */
@media (min-width: 1200px) {
    /* Allow left (Best Sellers) and right (Categories) sidebar columns to stretch equally */
    .route-common-home .grid-col-top-1-1,
    .route-common-home .grid-col-top-1-3 {
        display: flex !important;
        flex-direction: column !important;
        align-self: stretch !important;
        height: auto !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .route-common-home .grid-col-top-1-1 > .grid-items,
    .route-common-home .grid-col-top-1-3 > .grid-items {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        flex-grow: 1 !important;
    }

    .route-common-home .grid-col-top-1-1 > .grid-items > .grid-item,
    .route-common-home .grid-col-top-1-3 > .grid-items > .grid-item {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        flex-grow: 1 !important;
        align-self: stretch !important;
    }

    /* Force Category Sidebar wrapper to stretch to full column height */
    html.desktop-header-active div.global-wrapper div.flyout-menu-879,
    html div.global-wrapper div.flyout-menu-879,
    .route-common-home .flyout-menu-879 {
        height: 100% !important;
        width: 100% !important;
        overflow: visible !important; /* Allow dropdowns to overflow */
        position: relative !important;
        z-index: 999 !important;
    }

    /* ── Best Sellers grid-item wrapper: remove Journal3 padding ──────────────
       Root cause: .grid-module-top-1-3-1 inherits padding: 32px from Journal3.
       That reduces the content-box to 516px (580 − 64px), so height: 100% on the
       module resolves to 516px while the right-column Categories card reaches 580px.
       Zeroing the padding here makes the Best Sellers card match exactly.         */
    .route-common-home .grid-col-top-1-3 > .grid-items > .grid-item {
        padding: 0 !important;
    }

    /* Force Best Sellers card to stretch to full column height and match styling */
    .route-common-home .module-side_products-858 {
        height: 100% !important;
        min-height: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        background: #ffffff !important;
        border: 1px solid #eef1f6 !important;
        border-radius: 12px !important;
        padding: 12px !important; /* Identical padding to Category Sidebar */
        box-shadow: none !important; /* Removed shadow */
    }

    /* ── العنوان ───────────────────────────────────────────────────── */
    .route-common-home .module-side_products-858 .module-title {
        margin-top: 0 !important;
        margin-bottom: 8px !important;
        padding: 0 0 8px 0 !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        border: none !important;
        border-bottom: 1px solid #eef1f6 !important;
        flex-shrink: 0 !important;
    }

    /* ── إصلاح السلسلة الكاملة: module-body → auto-grid-items → product-layout ─
       المشكلة: .module-body كان display:grid + flex-grow:0 → مش بيتمدد
       الحل: خلي كل عنصر في السلسلة يأخذ المساحة المتبقية                    */

    /* 1. module-body: حولناه لـ flex column ويتمدد */
    .route-common-home .module-side_products-858 .module-body,
    .route-common-home .module-side_products-858 .side-products-blocks {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
    }

    /* 2. side-products و auto-grid-items: يتمددوا ويقسموا المساحة */
    .route-common-home .module-side_products-858 .side-products {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
    }

    .route-common-home .module-side_products-858 .auto-grid-items {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 0 !important;
        min-height: 0 !important;
        gap: 0 !important;
    }

    /* 3. كل product-layout يأخذ حصة متساوية من المساحة */
    .route-common-home .module-side_products-858 .product-layout {
        flex: 1 1 0 !important;
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* 4. side-product: يملأ الـ product-layout ويتمركز عمودياً */
    .route-common-home .module-side_products-858 .side-product {
        flex: 1 1 0 !important;
        display: flex !important;
        align-items: center !important;
        min-height: 0 !important;
        gap: 10px !important;
    }

    /* فاصل خفيف بين المنتجات (ما عدا الأخير) */
    .route-common-home .module-side_products-858 .product-layout:not(:last-child) {
        border-bottom: 1px solid #f0f2f6 !important;
    }

    /* الصورة: حجم ثابت ومتناسق */
    .route-common-home .module-side_products-858 .side-product .image {
        flex-shrink: 0 !important;
        width: 52px !important;
        height: 52px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .route-common-home .module-side_products-858 .side-product .image img {
        width: 50px !important;
        height: 50px !important;
        object-fit: contain !important;
        border-radius: 6px !important;
    }

    /* Caption: يأخذ المساحة المتبقية */
    .route-common-home .module-side_products-858 .side-product .caption {
        flex: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 2px !important;
    }
    .route-common-home .module-side_products-858 .side-product .caption .name a {
        font-size: 12px !important;
        font-weight: 600 !important;
        color: #2d3748 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        display: block !important;
    }
    .route-common-home .module-side_products-858 .side-product .caption .price {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #2e7d32 !important;
    }
    /* إخفاء التقييم والأزرار عشان الـ layout يبقى نظيف */
    .route-common-home .module-side_products-858 .side-product .rating,
    .route-common-home .module-side_products-858 .side-product .button-group {
        display: none !important;
    }
}

/* ==========================================================================
   7. HERO SLIDER PAGINATION DOTS
   ========================================================================== */

/* Ensure parent containers have relative positioning so absolute alignment maps to the slider bounds */
.route-common-home .module-slider-1150,
.route-common-home .module-slider-1150 .slider-wrapper,
.route-common-home .module-slider-1150 .swiper-container {
    position: relative !important;
}

/* Align pagination wrapper to the bottom center of the slider */
.route-common-home .module-slider-1150 .swiper-pagination-wrapper {
    align-items: flex-end !important;
    padding-bottom: 20px !important;
}

/* Inactive Dots */
.route-common-home .module-slider-1150 .swiper-pagination-bullet {
    background: #C7CDD4 !important;
    opacity: 0.6 !important;
    width: 10px !important;
    height: 10px !important;
    margin: 0 !important; /* Managed by flex gap */
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Hover State */
.route-common-home .module-slider-1150 .swiper-pagination-bullet:hover {
    background: #5c7712 !important; /* Slightly darker green */
    opacity: 0.9 !important;
    transform: scale(1.1) !important;
}

/* Active Dot */
.route-common-home .module-slider-1150 .swiper-pagination-bullet.swiper-pagination-bullet-active {
    background: #709117 !important; /* Fekra primary green */
    opacity: 1 !important;
    width: 10px !important;
    height: 10px !important;
    transform: scale(1.2) !important;
    box-shadow: 0 2px 6px rgba(112, 145, 23, 0.4) !important;
}

/* ==========================================================================
   8. SCOPED HOMEPAGE RTL TITLE LINK ARROW FLIPPING (NATIVE GLYPH REPLACEMENT)
   ========================================================================== */
html[dir="rtl"].route-common-home .title-inline-btn::after,
html[dir="rtl"].route-common-home .title-inline-btn:after,
html[dir="rtl"].route-common-home .title-btn-1::after,
html[dir="rtl"].route-common-home .title-btn-1:after,
html[dir="rtl"].route-common-home .title-btn-2::after,
html[dir="rtl"].route-common-home .title-btn-2:after,
html[dir="rtl"].route-common-home .module-products .title-main .title-inline-btn::after,
html[dir="rtl"].route-common-home .module-products .title-main .title-inline-btn:after,
html[dir="rtl"].route-common-home .module-grid .title-main .title-inline-btn::after,
html[dir="rtl"].route-common-home .module-grid .title-main .title-inline-btn:after {
    content: "\ea92" !important;
    transform: none !important;
}

/* ==========================================================================
   9. SCOPED HOMEPAGE RTL SLIDER & CAROUSEL NAVIGATION ARROW FLIPPING
   ========================================================================== */
html[dir="rtl"].route-common-home .swiper-button-prev::before,
html[dir="rtl"].route-common-home .swiper-button-prev:before,
html[dir="rtl"].route-common-home .auto-carousel-prev span::before,
html[dir="rtl"].route-common-home .auto-carousel-prev span:before {
    transform: none !important;
}

html[dir="rtl"].route-common-home .swiper-button-next::before,
html[dir="rtl"].route-common-home .swiper-button-next:before,
html[dir="rtl"].route-common-home .auto-carousel-next span::before,
html[dir="rtl"].route-common-home .auto-carousel-next span:before {
    display: inline-flex !important;
    transform: scaleX(-1) !important;
}

/* ==========================================================================
   10. MINIMAL & CLEAN PRODUCT CARDS FOR HOMEPAGE TAB SECTIONS
   ========================================================================== */
.route-common-home .tab-container .product-layout .stats,
.route-common-home .tab-container .product-layout .description,
.route-common-home .tab-container .product-layout .product-labels,
.route-common-home .tab-container .product-layout .product-labels-outside,
.route-common-home .tab-container .product-layout .stepper,
.route-common-home .tab-container .product-layout .btn-compare,
.route-common-home .tab-container .product-layout .quickview-button,
.route-common-home .tab-container .product-layout .extra-group {
    display: none !important;
}

/* ==========================================================================
   11. HOMEPAGE HEADER UX OPTIMIZATIONS
   ========================================================================== */



/* Issue #2 Fix: Align main menu dropdowns perfectly below menu items with no gaps or offsets */
.route-common-home .desktop-main-menu-wrapper .main-menu > .j-menu > .main-menu-item.dropdown > .j-dropdown {
    top: 100% !important;
}

html[dir="ltr"].route-common-home .desktop-main-menu-wrapper .main-menu > .j-menu > .main-menu-item.dropdown > .j-dropdown {
    left: 0 !important;
    right: auto !important;
}

html[dir="rtl"].route-common-home .desktop-main-menu-wrapper .main-menu > .j-menu > .main-menu-item.dropdown > .j-dropdown {
    right: 0 !important;
    left: auto !important;
}

/* ==========================================================================
   12. HOMEPAGE SECTION HEADERS VERTICAL ALIGNMENT FIX
   ========================================================================== */
.route-common-home .title-main {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    gap: 12px !important;

    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-bottom: clamp(16px, 2vw, 24px) !important;
    min-height: auto !important;
}
.route-common-home .title-main .module-title {
    margin: 0 !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
    white-space: normal !important;
    line-height: 1.3 !important;
}

.route-common-home .title-main .title-inline-btn {
    margin: 0 !important; /* Remove offsets */
    align-self: center !important; /* Exact vertical alignment in flexbox */
    flex-shrink: 0 !important; /* Prevent see-all link from shrinking */
    white-space: nowrap !important; /* Button text must not wrap */
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
}

/* Responsive Headers Adjustments for Mobile (< 480px) */
@media (max-width: 479px) {
    .route-common-home .title-main .module-title {
        font-size: 14px !important; /* Scaled down title font size */
    }
    .route-common-home .title-main .title-inline-btn {
        font-size: 12px !important; /* Scaled down button font size */
        padding: 6px 12px !important;
    }
}

/* ==========================================================================
   13. RESPONSIVE MOBILE PRODUCT GRIDS (1 CARD PER ROW FOR VIEWPORTS < 480px)
   ========================================================================== */
@media (max-width: 479px) {
    /* Apply 1-column layout ONLY to the audited cramped homepage grid modules */
    .route-common-home .module-products-885 .auto-grid-items,
    .route-common-home .module-products-1185 .auto-grid-items,
    .route-common-home .module-products-1186 .auto-grid-items,
    .route-common-home .module-products-1187 .auto-grid-items,
    .route-common-home .module-products-1188 .auto-grid-items {
        grid-template-columns: 1fr !important;
        gap: 12px !important; /* Refined spacing between rows */
    }

    /* Optimize product card padding and spacing inside these grid modules */
    .route-common-home .module-products-885 .product-layout,
    .route-common-home .module-products-1185 .product-layout,
    .route-common-home .module-products-1186 .product-layout,
    .route-common-home .module-products-1187 .product-layout,
    .route-common-home .module-products-1188 .product-layout {
        padding: 16px !important; /* Premium card padding */
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Optimize image container and center the product image */
    .route-common-home .module-products-885 .product-layout .image-group,
    .route-common-home .module-products-1185 .product-layout .image-group,
    .route-common-home .module-products-1186 .product-layout .image-group,
    .route-common-home .module-products-1187 .product-layout .image-group,
    .route-common-home .module-products-1188 .product-layout .image-group {
        margin: 0 auto 12px auto !important; /* Centered with bottom spacing */
        max-width: 160px !important; /* Optimized image size */
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }

    /* Center product titles and apply line-clamp */
    .route-common-home .module-products-885 .product-layout .name,
    .route-common-home .module-products-1185 .product-layout .name,
    .route-common-home .module-products-1186 .product-layout .name,
    .route-common-home .module-products-1187 .product-layout .name,
    .route-common-home .module-products-1188 .product-layout .name {
        text-align: center !important;
        justify-content: center !important;
        margin: 8px 0 6px 0 !important;
    }

    .route-common-home .module-products-885 .product-layout .name a,
    .route-common-home .module-products-1185 .product-layout .name a,
    .route-common-home .module-products-1186 .product-layout .name a,
    .route-common-home .module-products-1187 .product-layout .name a,
    .route-common-home .module-products-1188 .product-layout .name a {
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important; /* Clamp to exactly 2 lines */
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: normal !important;
        word-break: break-word !important; /* Safe word breaking */
        line-height: 1.4 !important;
        max-height: 2.8em !important;
        font-size: 14px !important;
    }

    /* Center price and adjust spacing */
    .route-common-home .module-products-885 .product-layout .price,
    .route-common-home .module-products-1185 .product-layout .price,
    .route-common-home .module-products-1186 .product-layout .price,
    .route-common-home .module-products-1187 .product-layout .price,
    .route-common-home .module-products-1188 .product-layout .price {
        justify-content: center !important;
        margin: 4px 0 10px 0 !important;
        font-size: 14px !important;
    }

    /* Center action buttons container */
    .route-common-home .module-products-885 .product-layout .button-group,
    .route-common-home .module-products-1185 .product-layout .button-group,
    .route-common-home .module-products-1186 .product-layout .button-group,
    .route-common-home .module-products-1187 .product-layout .button-group,
    .route-common-home .module-products-1188 .product-layout .button-group {
        justify-content: center !important;
        margin: 8px 0 0 0 !important;
    }
}

/* ==========================================================================
   14. REMOVE GREY CONTAINER BOX FROM ALL HOMEPAGE SECTIONS
   ========================================================================== */
.route-common-home .grid-items {
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
}