
.search-results-dropdown {
    position: absolute;
    background: #fff;
    width: 100%;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    list-style: none;
    margin-top: 2px;
    padding: 0;
}

.search-results-dropdown li {
    padding: 10px;
    border-bottom: 1px solid #f2f2f2;
    cursor: pointer;
}

.search-results-dropdown li:hover {
    background-color: #f5f5f5;
}

.search-results-dropdown a {
    text-decoration: none;
    color: #333;
    display: block;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f8f9fa;
}

.search-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-bottom: 2px solid #e5e5e5;

}

.axil-submenu {
    width: 200px !important;
}

.logo {
    margin-right: 25px;
}

.logo img {
    height: auto;
}

.search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.search-box input[type="text"] {
    border: none;
    outline: none;
    padding: 12px 18px;
    width: 280px;
    font-size: 15px;
    flex: 1;
}

.search-box select {
    border: none;
    outline: none;
    padding: 12px 15px;
    font-size: 14px;
    background: transparent !important;
    cursor: pointer;
    width: 207px;
    margin: 10px;
    color: #9aabba !important;
}

.search-box button {
    border: none;
    color: #fff;
    /* padding: 12px 20px; */
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 50px;
}

/* .search-box button:hover {
  background: #b00000;
} */

/* Responsive for mobile */
@media (max-width: 768px) {
    .search-container {
        flex-direction: column;
    }

    .logo {
        margin-bottom: 15px;
    }

    .search-box {
        width: 100%;
        max-width: 500px;
    }

    .search-box input[type="text"] {
        width: 100%;
    }
}

/* Smooth transition for theme changes */
/* Smooth transition */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========== DARK MODE ========== */
/* الوضع الليلي */
body.dark-mode .header-nav-department,
body.dark-mode .header-nav-department *,
body.dark-mode .axil-submenu,
body.dark-mode .axil-submenu *,
body.dark-mode .header-main-nav .mainmenu-nav,
body.dark-mode .header-main-nav .mainmenu-nav * {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
    border-color: #333 !important;
}

/* ☀️ الوضع الفاتح (Light Mode) */
body.light-mode .header-nav-department,
body.light-mode .header-nav-department *,
body.light-mode .axil-submenu,
body.light-mode .axil-submenu *,
body.light-mode .header-main-nav .mainmenu-nav,
body.light-mode .header-main-nav .mainmenu-nav * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ddd !important;
}

body.dark-mode {
    background-color: #121212 !important;
    color: #ffffff !important;
}

/* Every div becomes dark in dark mode */
body.dark-mode div {
    background-color: #1e1e1e !important;
    color: #ffffff !important;
    border-color: #333 !important;
}

/* Headings and text */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6,
body.dark-mode p,
body.dark-mode span,
body.dark-mode a {
    color: #ffffff !important;
}


/* Inputs, dropdowns */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #2a2a2a !important;
    color: #ffffff !important;
    border-color: #555 !important;
}

/* Service boxes specifically */
body.dark-mode .service-box {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

/* Images stay normal (no dark overlay) */
body.dark-mode img {
    filter: brightness(0.9);
}

/* 🌙 الوضع الليلي (Dark Mode) */
body.dark-mode .header-nav-department,
body.dark-mode .header-nav-department *,
body.dark-mode .axil-submenu,
body.dark-mode .axil-submenu *,
body.dark-mode .header-main-nav .mainmenu-nav,
body.dark-mode .header-main-nav .mainmenu-nav * {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
    border-color: #333 !important;
}

/* ☀️ الوضع الفاتح (Light Mode) */
body.light-mode .header-nav-department,
body.light-mode .header-nav-department *,
body.light-mode .axil-submenu,
body.light-mode .axil-submenu *,
body.light-mode .header-main-nav .mainmenu-nav,
body.light-mode .header-main-nav .mainmenu-nav * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ddd !important;
}

body.dark-mode .search-results-dropdown {
    background-color: #1e1e1e !important;
    color: #f1f1f1 !important;
    border-color: #333 !important;
}

/* ── Mobile Header Fix ── */
@media (max-width: 991px) {

    /* Make the top row wrap cleanly */
    .axil-header-top .row {
        flex-wrap: wrap;
    }

    /* Logo col — keep it small on the left */
    .axil-header-top .col-sm-3,
    .axil-header-top .col-5 {
        flex: 0 0 auto;
    }

    /* Search col — full width on its own row */
    .axil-header-top .col-lg-8 {
        order: 3;               /* push search to second row */
        flex: 0 0 100%;
        max-width: 100%;
        margin-top: 8px;
        padding-bottom: 8px;
    }

    /* Controls col (EN + moon) — sit on same row as logo */
    .axil-header-top .col-sm-9,
    .axil-header-top .col-7 {
        flex: 1 1 auto;
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
}

@media (max-width: 480px) {
    /* Shrink the category select so the search input isn't crushed */
    #categorySelect {
        width: 110px;
        font-size: 0.8rem;
    }

    /* Scale down the moon icon — fa-3x is too big for mobile */
    #themeToggle .fa-moon {
        font-size: 1.2rem;
    }
}

/* ── Main Menu Mobile — full width icons ── */
@media (max-width: 991px) {

    /* Hide desktop nav text links */

    /* Navbar takes full width */
    .axil-mainmenu .header-navbar {
        display: flex;
        align-items: center;
        width: 100%;
    }

    /* Action list stretches full width */
    .axil-mainmenu .header-action {
        width: 100%;
    }

    .axil-mainmenu .header-action .action-list {
        display: flex;
        align-items: center;
        justify-content: space-around; /* spreads icons evenly */
        flex-wrap: nowrap;
        width: 100%;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* Each icon item takes equal space */
    .axil-mainmenu .header-action .action-list > li {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* Icon links/buttons fill their cell */
    .axil-mainmenu .header-action .action-list > li a,
    .axil-mainmenu .header-action .action-list > li button {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 10px 0;
        font-size: 2rem; /* bigger icons */
        line-height: 1;
    }

    /* Cart badge sizing */
    .axil-mainmenu .cart-count {
        font-size: 0.65rem;
        min-width: 16px;
        height: 16px;
        line-height: 16px;
    }

    /* Account dropdown anchored */
    .axil-mainmenu .my-account {
        position: relative;
    }
    .axil-mainmenu .my-account-dropdown {
        position: absolute;
        top: calc(100% + 4px);
        right: 0;
        left: auto;
        width: 220px;
        z-index: 9999;
    }
}

/* Breadcrumb responsive margin */
.axil-breadcrumb {
    margin: 0 auto 15px !important;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 991px) {
    .axil-mainmenu .header-action .action-list li.shopping-cart {
        position: relative;
    }

    .axil-mainmenu .cart-count {
        position: absolute;
        top: -5px !important;
        left: 50%;
        margin-left: 2px; /* slight nudge right of icon center */
        font-size: 0.6rem;
        min-width: 14px;
        height: 14px;
        line-height: 14px;
    }

    html[dir="rtl"] .axil-mainmenu .cart-count {
        left: 50%  !important;
        right: auto !important;
    }
}

@media only screen and (max-width: 991px) {
    .header-brand a img {
        max-height: none !important;
    }
}

.language-dropdown .dropdown-toggle {
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 10px;
}

.language-dropdown .dropdown-menu {
    min-width: 220px;
    padding: 12px;
    border-radius: 10px;
}

.language-dropdown .dropdown-item {
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.language-dropdown .dropdown-item:hover,
.language-dropdown .dropdown-item.active {
    background-color: #ff497c;
    color: white;
}


/* Hover */
.language-dropdown .dropdown-item:hover {
    background-color: #ff497c;
    color: white;
}

/* Active / Selected */
.language-dropdown .dropdown-item.active,
.language-dropdown .dropdown-item:active {
    color: var(--bs-dropdown-link-active-color);
    background-color: var(--bs-dropdown-link-active-bg);
}

html[dir="rtl"] select {
    background-position: left 15px center !important;
    padding-left: 35px !important;
    padding-right: 15px !important;
}

html[dir="rtl"] .menu-item-has-children > a {
    position: relative;
    padding-right: 0 !important;
    padding-left: 20px; /* space for arrow on left */
}

/* move ONLY the existing theme arrow */
html[dir="rtl"] .menu-item-has-children > a::after {
    right: auto !important;
    left: 0 !important;
}

html[dir="rtl"] .header-department-text.department-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    direction: rtl;
}

/* icon spacing fix */
html[dir="rtl"] .header-department-text.department-title .icon {
    margin-left: 8px;
    margin-right: 0;
    order: 2; /* push icon to the left side in RTL */
}

/* text stays correct */
html[dir="rtl"] .header-department-text.department-title .text {
    order: 1;
}

html[dir="rtl"] .axil-testimoial-area {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .testimonial-style-one {
    direction: rtl;
    text-align: right;
}

/* media alignment fix */
html[dir="rtl"] .testimonial-style-one .media {
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .testimonial-style-one .media-body {
    text-align: right;
}

/* image spacing fix */
html[dir="rtl"] .testimonial-style-one .thumbnail {
    margin-left: 12px;
    margin-right: 0;
}

html[dir="rtl"] .testimonial-slick-activation {
    direction: ltr; /* keep slider engine stable */
}

html[dir="rtl"] .testimonial-slick-activation .slick-slide {
    direction: rtl; /* fix content inside slides */
}

html[dir="rtl"] .section-title-wrapper {
    text-align: right;
}

html[dir="rtl"] .title-highlighter {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

/* ============================================
   MOBILE NAV MENU - Single consolidated block
   ============================================ */

@media (max-width: 991px) {

    /* --- LTR (English) --- */
    html[dir="ltr"] .department-nav-menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: auto !important;
        height: 100vh !important;
        z-index: 9999 !important;
        opacity: 1;               /* ✅ Don't animate opacity on iOS */
        visibility: hidden;       /* ✅ Use visibility instead */
        pointer-events: none;
        transform: translateX(-100%);
        -webkit-transform: translateX(-100%); /* ✅ iOS Safari prefix */
        transition: transform 0.3s ease, visibility 0.3s ease;
        -webkit-transition: -webkit-transform 0.3s ease, visibility 0.3s ease;
    }

    html[dir="ltr"] .department-nav-menu.active {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }

    /* --- RTL (Arabic) --- */
    html[dir="rtl"] .department-nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        height: 100vh !important;
        z-index: 9999 !important;
        opacity: 1;
        visibility: hidden;
        pointer-events: none;
        transform: translateX(100%);
        -webkit-transform: translateX(100%);
        transition: transform 0.3s ease, visibility 0.3s ease;
        -webkit-transition: -webkit-transform 0.3s ease, visibility 0.3s ease;
    }

    html[dir="rtl"] .department-nav-menu.active {
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
        -webkit-transform: translateX(0);
    }
}

/* ============================================
   DESKTOP - hide menu, show on active
   ============================================ */
@media (min-width: 992px) {
    .department-nav-menu {
        display: none !important;
        visibility: hidden !important;
    }

    .department-nav-menu.active {
        display: block !important;
        visibility: visible !important;
    }
}
html[dir="rtl"] .mainmenu-nav .mainmenu > li > a {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px; /* clean space between text and arrow */
    text-align: right;
}

/* keep theme arrow but fix spacing + position */
html[dir="rtl"] .mainmenu-nav .mainmenu > li.menu-item-has-children > a::after {
    position: static !important;   /* IMPORTANT: stops overlap */
    margin-right: 6px;             /* space from text */
    margin-left: 0 !important;
    transform: none !important;
}

/* hover state fix (theme override) */
html[dir="rtl"] .mainmenu-nav .mainmenu > li:hover > a::after {
    position: static !important;
    margin-right: 6px !important;
    transform: none !important;
}

html[dir="rtl"] .axil-testimoial-area .prev-arrow {
    left: 0 !important;
    right: auto !important;
}

html[dir="rtl"] .axil-testimoial-area .next-arrow {
    left: 50px !important;
    right: auto !important;
    margin-left: 10px !important;
}

@media (max-width: 767px) {
    .axil-cart-table thead {
        display: none;
    }

    .axil-cart-table tr {
        display: block;
        margin-bottom: 20px;
        border-bottom: 2px solid #eee;
        padding: 10px 0;
    }

    .axil-cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 15px;
        border: none;
    }

    .axil-cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        flex-shrink: 0;
        margin-right: 10px;
    }

    .axil-cart-table td.product-remove,
    .axil-cart-table td.product-thumbnail {
        justify-content: flex-end;
    }

    .axil-cart-table td.product-thumbnail {
        padding-bottom: 0;
    }
}

@media (max-width: 767px) {
    html[dir="rtl"] .axil-product-table tbody td.product-price,
    html[dir="rtl"] .axil-product-table tbody td.product-quantity,
    html[dir="rtl"] .axil-product-table tbody td.product-subtotal {
        padding-right: 120px !important;
        padding-left: 0 !important;
        text-align: left !important;
    }

    html[dir="rtl"] .axil-product-table tbody td::before {
        left: auto !important;
        right: 8px !important;
    }

    html[dir="rtl"] .axil-product-table tbody td.product-stock {
        padding-right: 120px !important;
        padding-left: 0 !important;
        text-align: left !important;
    }
}
.axil-product-table.axil-cart-table .pro-qty {
    width: fit-content !important;
}
html[dir="rtl"] .cart-dropdown .item-content {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

html[dir="rtl"] .cart-dropdown .item-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}

html[dir="rtl"] .cart-dropdown .item-quantity {
    direction: ltr !important;
    flex-shrink: 0 !important;
}
html[dir="rtl"] .cart-dropdown .cart-item {
    flex-direction: row-reverse !important;
}
html[dir="rtl"] .cart-dropdown .item-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    flex: 1 !important;
}
html[dir="rtl"] .cart-dropdown .cart-item {
    flex-direction: row-reverse !important;
}
html[dir="rtl"] .axil-slick-arrow.arrow-top-slide .slick-arrow {
    right: auto !important;
    left: 0 !important;
}

html[dir="rtl"] .axil-slick-arrow.arrow-top-slide .slide-arrow.prev-arrow {
    left: 0 !important;
}

html[dir="rtl"] .axil-slick-arrow.arrow-top-slide .slide-arrow.next-arrow {
    left: 50px !important;
}

.cart-empty-msg::before {
    display: none !important;
}
.cart-empty-msg {
    width: 100% !important;
    display: block !important;
}

.axil-cart-table tbody tr:only-child td {
    width: 100% !important;
    text-align: center !important;
}
.header-department-text,
.department-title {
    cursor: pointer !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent;
    /* Chrome iOS CRITICAL fix */
    -webkit-appearance: none;
    appearance: none;
}
[dir="rtl"] .axil-shop-sidebar .title::before {
    right: unset;
    left: 0px;
}

[dir="rtl"] .axil-shop-sidebar .title::after {
    left: unset;
    right: 0px;
}
