/* Dynamic Buy Now button styling */
.mega-menu-buy-now {
    background-color: #5db737 !important;
    color: #ffffff !important;
}

.mega-menu-buy-now:hover {
    background-color: #54a532 !important;
    color: #ffffff !important;
}

/* Dynamic product button styling */
.mega-menu-product-buy {
    background-color: #5db737 !important;
    color: #ffffff !important;
}

.mega-menu-product-buy:hover {
    background-color: #54a532 !important;
    color: #ffffff !important;
}

/* Category headers - customizable styles */
.mega-menu-category-title {
    color: #ff7733;
    text-decoration: none;}

/* Links - Poppins font */
.mega-menu-category-link {
    color: #333333 !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 17px !important;
    letter-spacing: -0.3px !important;
    padding: 4px 0px !important;
}

.mega-menu-category-link:hover {
    color: #ff7733 !important;
}

/* Main menu title - customizable styles */
.mega-menu-title {
    left: 1% !important;
    width: 98%;
    margin-left: 1% !important;
    font-weight: 500;
    text-align: left;
    padding: 0.5em 0 0 0;
    border-bottom: none;
    margin-bottom: 0;
}

/* Dropdown background, borders, and shadow */
.mega-menu-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #ECE8E0 !important;
    border-radius: 20px !important;
    box-shadow: 0px 4px 44px rgba(36, 42, 59, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;    /* Full width dropdown */
    left: 1% !important;
    right: 0 !important;
    width: 98%;
    max-width: 100vw !important;
    max-height: calc(100vh - 14em);
    overflow-y: scroll;
}

/* Dynamic dropdown padding and layout */
.mega-menu-content {
    padding: 1em !important; /* More padding for full-width dropdown */
    gap: 20px !important; /* Reduced gap for tighter layout */
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    line-height: 1.4 !important; /* Tighter line height */
    width: 98%;
    max-width: 1400px !important; /* Constrain content width */
    margin: 0 auto !important; /* Center the content */
    position: relative !important; /* Enable absolute positioning for last column */
    box-sizing: border-box !important;
}

/* All columns default behavior */
.mega-menu-column {
    flex: 1 1 auto !important; /* Share available space equally */
    min-width: 150px !important; /* Minimum column width */
}

/* Column dividers - all except first and last */
.mega-menu-column:not(:first-child):not(:last-child) {
    border-left: 1px solid #ECE8E0 !important;
    padding-left: 12px !important;
}

/* If there's only one non-product column before products, it should still get a border */
.mega-menu-column:nth-child(2):not(.mega-menu-products-column) {
    border-left: 1px solid #ECE8E0 !important;
    padding-left: 12px !important;
}

/* Last column (products) - always right aligned with minimal width */
.mega-menu-column:last-child {
    flex: 0 0 auto !important; /* Just fit content width */
    width: auto !important;
    min-width: auto !important;
    max-width: 200px !important; /* Maximum product column width */
    margin-left: auto !important; /* Push to right */
    border-left: none !important;
    padding-left: 0 !important;
    background-color: var(--color-offwhite);
    border-radius: 1em;
    top: -4em;
    right: -1em;
}

/* Tighter category spacing */
.mega-menu-category {
    margin-bottom: 16px !important; /* Reduced from default */
}

.mega-menu-category:last-child {
    margin-bottom: 0 !important;
}

/* Tighter link spacing */
.mega-menu-category-link {
    padding: 4px 0 !important; /* Reduced padding */
    line-height: 1.3 !important; /* Tighter line height */
    margin-bottom: 2px !important; /* Small gap between links */
}

/* First column - no left border/padding */
.mega-menu-column:first-child {
    border-left: none !important;
    padding-left: 0 !important;
}

/* Product section background - style the last column when it's products */
.mega-menu-column:last-child.mega-menu-products-column,
.mega-menu-products-column {
    background: #F7F5F2 !important;
    border-radius: 20px 0px 0px 20px !important;
    padding: 16px !important;
}

/* Product cards - white with rounded corners */
.mega-menu-product {
    background-color: #FFFFFF !important;
    border: 1px solid #ECE8E0 !important;
    border-radius: 12px !important;
    padding: 0 !important;
    margin-bottom: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 172px !important;
    box-sizing: border-box !important;
}

/* Product image container */
.mega-menu-product-image {
    width: 172px !important;
    height: 109px !important;
    background: #FFFFFF !important;
    border-radius: 12px 12px 0 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    position: relative !important;
}

.mega-menu-product-image img {
    max-width: 80% !important;
    max-height: 80% !important;
    object-fit: contain !important;
    display: block !important;
}

/* Product divider */
.mega-menu-product-image::after {
    content: '' !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 8px !important;
    right: 8px !important;
    height: 1px !important;
    background: #F7F5F2 !important;
}

/* Product text content */
.mega-menu-product-content {
    padding: 12px !important;
    width: 172px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

/* Product title */
.mega-menu-product-title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 300 !important;
    font-size: 12px;
    line-height: 16px !important;
    color: #323232 !important;
    margin: 0 !important;
    text-align: left !important;
    width: 148px !important;
    height: 48px !important;
    overflow: hidden !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
}

/* Product bottom row (price + button) */
.mega-menu-product-bottom {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-end !important;
    width: 148px !important;
    height: 32px !important;
    gap: 10px !important;
}

/* Product price */
.mega-menu-product-price {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-weight: 400 !important;
    font-size: 22px;
    line-height: 24px !important;
    color: #272727 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 2px !important;
}

.mega-menu-product-price::before {
    content: '$' !important;
    font-weight: 700 !important;
    font-size: 12px;
    line-height: 12px;
}

/* Product buy button - basic structure only, allow CSS overrides */
.mega-menu-product-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-sizing: border-box;
}

/* Dynamic font sizing */
.divi-mega-menu-link {
    font-size: 16px;
}

.mega-menu-category-title {
    font-size: 18px;
    margin-bottom:0;
}

.mega-menu-category-link {
    font-size: 15px;
}

/* Category header underlines */
.mega-menu-category-title {
    border-bottom: none !important;
}

/* Link hover borders */
.mega-menu-category-link:hover {
    border-left-color: #ff7733 !important;
}
        
:root {
    --dmm-category-color: #ff7733;
    --dmm-link-color: #333333;
    --dmm-link-hover-color: #ff7733;
    --dmm-dropdown-bg: #ffffff;
    --dmm-border-color: #e5e7eb;
    --dmm-card-bg: #ffffff;
    --dmm-price-color: #000000;
    --dmm-button-color: #5db737;
    --dmm-button-text: #ffffff;
    --dmm-border-radius: 8px;
    --dmm-column-spacing: 40px;
    --dmm-dropdown-padding: 30px;
}

/* Dynamic dropdown styling */
.mega-menu-dropdown {
    background: var(--dmm-dropdown-bg) !important;
    border-color: var(--dmm-border-color) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

.mega-menu-content {
    padding: var(--dmm-dropdown-padding) !important;
}

/* Dynamic column layout */
.mega-menu-columns {
    gap: var(--dmm-column-spacing) !important;
}

.mega-menu-column {
    flex: 0 0 calc(16.666666666667% - var(--dmm-column-spacing));
    max-width: calc(16.666666666667% - var(--dmm-column-spacing));
}

/* Category headers */
.mega-menu-category-title {
    color: var(--dmm-category-color) !important;
    border-bottom-color: var(--dmm-category-color) !important;
}

/* Links */
.mega-menu-link {
    color: var(--dmm-link-color) !important;
}

.mega-menu-link:hover {
    color: var(--dmm-link-hover-color) !important;
}

/* Product cards */
.mega-menu-product-card {
    background: var(--dmm-card-bg) !important;
    border-radius: var(--dmm-border-radius) !important;
    border-color: var(--dmm-border-color) !important;
}

.mega-menu-product-price {
    color: var(--dmm-price-color) !important;
}
                /* Hide Divi's default navigation elements */
        #et-top-navigation,
        .et_mobile_menu,
        #et_mobile_nav_menu,
        .et_pb_menu,
        .et_pb_menu__menu,
        #main-header .et_pb_row,
        .et-main-menu-container,
        .et_pb_menu_0,
        .et_pb_menu_1,
        .et_pb_fullwidth_menu,
        .et_pb_section .et_pb_menu {
            display: none !important;
        }
        
        /* Simply hide the main header - don't modify its structure */
        #main-header {
            display: none !important;
        }
        
        /* Ensure our header system starts at the top */
        .divi-mega-menu-header-system {
            position: relative;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 9999;
        }
                :root {
            --mega-menu-animation-speed: 300ms;
            --mega-menu-hover-delay: 100ms;
            --mega-menu-bg: #ffffff;
            --mega-menu-text: #374151;
            --mega-menu-hover: #10b981;
            --mega-menu-border: #e5e7eb;
            --mega-menu-dropdown-bg: #ffffff;
            --mega-menu-title: #1f2937;
            --mega-menu-link: #6b7280;
            --mega-menu-accent: #10b981;
        }
        
                