/* Mega Menu Styles */

.megamenu-mega-panel {
    width: 100vw !important;
    max-width: 1200px !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
    background: #ffffff;
}

.megamenu-mega-content {
    display: flex;
    flex-direction: row;
    min-height: 480px;
}

/* Left Navigation Column */
.megamenu-left-column {
    width: 280px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 15px 0;
    flex-shrink: 0;
}

.megamenu-left-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-left-item {
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.15s ease-in-out;
}

.megamenu-left-item .megamenu-left-link {
    display: block;
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    text-decoration: none !important;
}

.megamenu-left-item:hover, 
.megamenu-left-item.active {
    background-color: #ffffff;
    border-left-color: #542580;
}

.megamenu-left-item:hover .megamenu-left-link, 
.megamenu-left-item.active .megamenu-left-link {
    color: #542580;
    font-weight: 600;
}

.megamenu-left-item .megamenu-left-link i.fa-chevron-right {
    opacity: 0.5;
    transition: transform 0.15s ease;
}

.megamenu-left-item:hover .megamenu-left-link i.fa-chevron-right,
.megamenu-left-item.active .megamenu-left-link i.fa-chevron-right {
    opacity: 1;
    transform: translateX(3px);
}

/* Right Content Area */
.megamenu-right-column {
    flex-grow: 1;
    padding: 30px;
    background: #ffffff;
    position: relative;
    overflow-y: auto;
}

.megamenu-pane {
    width: 100%;
    height: 100%;
}

.megamenu-pane.pane-featured {
    display: flex;
    flex-direction: row;
    gap: 30px;
}

.megamenu-pane-main-content {
    flex-grow: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Titles and Lists inside Panels */
.pane-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e3a8a; /* Navy blue accent */
    margin-bottom: 18px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pane-section-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pane-section-list li {
    margin-bottom: 10px;
}

.pane-section-list li a {
    font-size: 13.5px;
    color: #475569;
    text-decoration: none;
    transition: color 0.15s ease;
}

.pane-section-list li a:hover {
    color: #542580;
    text-decoration: underline;
}

/* Banners Section on the Right */
.megamenu-banners-container {
    display: flex;
    gap: 15px;
    width: 480px;
    flex-shrink: 0;
}

.megamenu-banners-stacked {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.megamenu-banner-tall-wrapper {
    flex: 1;
}

.megamenu-banner-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.megamenu-banner-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.megamenu-banners-stacked .megamenu-banner-item {
    height: calc(50% - 7.5px);
}

.megamenu-banner-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(246, 93, 0, 0.15);
}

/* 3rd Level Category Grid Layout */
.megamenu-pane.pane-sub3 {
    width: 100%;
}

/* Ensure top level item with mega menu gets proper behavior */
.navbar-nav .megamenu-mega-item.dropdown:hover > .megamenu-mega-panel {
    display: block !important;
}

/* Custom indicator for online matbaa blink effect */
.blink_me {
    display: inline-block;
    background: #542580;
    color: #fff;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    margin-right: 5px;
    animation: blinker 1.5s linear infinite;
    vertical-align: middle;
}

@keyframes blinker {
    50% {
        opacity: 0.3;
    }
}

/* Banner Layout Styles */
.megamenu-banners-container.layout-1 {
    width: 340px;
}
.megamenu-banners-container.layout-1 .megamenu-banner-item.single-full {
    height: 100%;
    width: 100%;
}

.megamenu-banners-container.layout-2 {
    width: 440px;
}
.megamenu-banners-container.layout-2 .megamenu-banner-item.half-vertical {
    flex: 1;
    height: 100%;
}

.megamenu-banners-container.layout-3 {
    width: 380px;
    flex-direction: column;
}
.megamenu-banner-wide-top {
    height: 180px;
    width: 100%;
}
.megamenu-banners-split-bottom {
    display: flex;
    gap: 15px;
    height: calc(100% - 195px);
    width: 100%;
}
.megamenu-banners-split-bottom .megamenu-banner-item {
    flex: 1;
    height: 100%;
}

.megamenu-banners-container.layout-4 {
    width: 380px;
    flex-direction: column;
}
.megamenu-banners-split-top {
    display: flex;
    gap: 15px;
    height: calc(100% - 195px);
    width: 100%;
}
.megamenu-banners-split-top .megamenu-banner-item {
    flex: 1;
    height: 100%;
}
.megamenu-banner-wide-bottom {
    height: 180px;
    width: 100%;
}

/* Dynamic No-Right-Column Mode (hides subcategory pane when empty) */
.megamenu-mega-content.no-right-col .megamenu-right-column {
    display: none !important;
}
.megamenu-mega-content.no-right-col {
    min-height: auto;
}
.megamenu-mega-content.no-right-col .megamenu-left-column {
    width: 100% !important;
    border-right: none !important;
}
.megamenu-mega-content.no-right-col .megamenu-mega-panel {
    max-width: 280px !important;
}

/* Ensure media manager, Roxy file manager, and nested modals appear on top of our settings modal */
.modal-backdrop {
    z-index: 1040 !important;
}
#settingsModal {
    z-index: 1050 !important;
}
/* Any other modal that is open while settingsModal is open should be on top */
body.modal-open .modal:not(#settingsModal),
body.modal-open .fancybox-container,
body.modal-open .fancybox-slider,
body.modal-open .ui-dialog,
body.modal-open .ui-widget-overlay {
    z-index: 1060 !important;
}

/* --- Dynamic MegaMenu Theme Customizations --- */

/* 1. Sticky Logo and Navigation Header */
@media (min-width: 992px) {
    .logo-container {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1030 !important;
        transition: box-shadow 0.2s ease, background-color 0.2s ease;
    }
    body.header-is-sticky .logo-container {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
        background-color: #542580 !important;
    }
}

/* 2. Shopbar (Logo, Search, Cart area) Background Color: Purple #542580 */
.shopbar-section {
    background-color: #542580 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 12px 0 !important;
}
.shopbar-section a,
.shopbar-section span,
.shopbar-section i,
.shopbar-section .label,
.shopbar-section .shopbar-button,
.shopbar-section .navbar-nav .nav-link,
.shopbar-section .shopbar-col {
    color: #ffffff !important;
}
/* Searchbar Custom Styling to match the design (Rounded with yellow border and drop shadow) */
.instasearch-form {
    border: 3px solid #ffde00 !important;
    border-radius: 30px !important;
    background-color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    padding: 2px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 600px !important;
    margin: 0 auto !important;
}
.instasearch-form .instasearch-term {
    border: none !important;
    background-color: transparent !important;
    color: #333333 !important;
    font-size: 16px !important;
    padding-left: 20px !important;
    height: 38px !important;
    box-shadow: none !important;
}
.instasearch-form .instasearch-term::placeholder {
    color: #999999 !important;
}
.instasearch-form .instasearch-button {
    background-color: #ffde00 !important;
    border: none !important;
    border-radius: 50% !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 4px !important;
    padding: 0 !important;
    top: 4px;
    cursor: pointer !important;
    box-shadow: none !important;
    transition: all 0.2s ease-in-out !important;
}
.instasearch-form .instasearch-button:hover {
    background-color: #e5c700 !important;
    transform: scale(1.05) !important;
}
.instasearch-form .instasearch-button i {
    color: #542580 !important;
    font-size: 16px !important;
    font-weight: bold !important;
}

/* 3. Navbar Background Color: Grey #ededed */
.megamenu-section .navbar-light,
.megamenu-section .navbar {
    background-color: #ededed !important;
    border-bottom: 2px solid #542580 !important;
    padding: 0 !important;
}
.megamenu-section .navbar-light .nav-link,
.megamenu-section .navbar .nav-link {
    color: #333333 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 10px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}

/* 4. White Dividers between Navigation Items */
.cms-menu-navbar #menu-main > li.nav-item {
    border-right: 1px solid #ffffff !important;
    display: flex !important;
    align-items: center !important;
}
    .cms-menu-navbar #menu-main > li.nav-item:first-child {
        /*border-left: 1px solid #ffffff !important;*/
    }

/* 5. Circular Icon Border/Background styling */
.cms-menu-navbar #menu-main > li.nav-item i,
.cms-menu-navbar #menu-main > li.nav-item img.sm-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    border: 1.5px solid #542580 !important;
    background-color: transparent !important;
    color: #542580 !important;
    font-size: 12px !important;
    margin-right: 0 !important;
    padding: 0 !important;
    transition: all 0.2s ease-in-out !important;
}
.cms-menu-navbar #menu-main > li.nav-item img.sm-icon {
    padding: 4px !important;
    object-fit: contain !important;
}

/* Hover style: reverse icon colors on menu hover */
.cms-menu-navbar #menu-main > li.nav-item:hover i,
.cms-menu-navbar #menu-main > li.nav-item:hover img.sm-icon {
    background-color: #542580 !important;
    color: #ffffff !important;
}

/* 6. Transparent highlights on hover/focus/active navbar items */
.navbar-light .megamenu .nav-item.active .nav-link,
.navbar-light .megamenu .nav-item .nav-link:focus,
.navbar-light .megamenu .nav-item .nav-link:hover,
.navbar-light .cms-menu-navbar .nav-item.active .nav-link,
.navbar-light .cms-menu-navbar .nav-item .nav-link:focus,
.navbar-light .cms-menu-navbar .nav-item .nav-link:hover {
    background-color: transparent !important;
    background: transparent !important;
}

/* 7. Remove border-right inside .shopbar-search menu item container */
.shopbar-search .cms-menu-navbar #menu-main > li.nav-item {
    border-right: 0 !important;
    border-left: 0 !important;
}

/* 8. Ensure dropdown menu items under .shopbar-tool are black (white dropdown background contrast) */
.shopbar-tool .dropdown-menu,
.shopbar-tool .dropdown-menu a,
.shopbar-tool .dropdown-menu span,
.shopbar-tool .dropdown-menu i,
.shopbar-tool .dropdown-menu .label,
.shopbar-tool .dropdown-menu .shopbar-button,
.shopbar-tool .dropdown-menu .navbar-nav .nav-link,
.shopbar-tool .dropdown-menu .shopbar-col,
.shopbar-tool .dropdown-menu div,
.shopbar-tool .dropdown-menu p {
    color: #333333 !important;
}

/* 9. Force all mega menu dropdown panels to align to the left edge of the container with full-width */
.megamenu-dropdown-container.simple .dropdown-menu.megamenu-mega-panel {
    left: 0 !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
}



