/**
 * VMS Mega Menu CSS
 * 
 * @package VMS_Mega_Menu
 * @version 1.0.0
 */

/* === Elementor Typography Integration === */
:root {
    /* Elementor-style font variables with proper fallbacks */
    --vms-primary-font-family: var(--e-global-typography-primary-font-family), Sans-serif;
    --vms-primary-font-weight: var(--e-global-typography-primary-font-weight, bold);
    --vms-primary-line-height: var(--e-global-typography-primary-line-height, 1.3);
    --vms-primary-letter-spacing: var(--e-global-typography-primary-letter-spacing, normal);
    
    --vms-secondary-font-family: var(--e-global-typography-secondary-font-family), Sans-serif;
    --vms-secondary-font-weight: var(--e-global-typography-secondary-font-weight, normal);
    --vms-secondary-font-size: var(--e-global-typography-secondary-font-size, 14px);
    --vms-secondary-line-height: var(--e-global-typography-secondary-line-height, 1.6);
    --vms-secondary-letter-spacing: var(--e-global-typography-secondary-letter-spacing, normal);
}

/* === Base Styles === */
.vms-mega-menu-wrapper {
    position: relative;
    display: inline-block;
    font-family: var(--vms-primary-font-family);
}

/* === Toggle Button Styles === */
.vms-btn-toggle-categories {
    width: 260px;
    height: 60px;
    font-family: var(--vms-primary-font-family);
    font-size: 16px;
    line-height: var(--vms-primary-line-height);
    font-weight: var(--vms-primary-font-weight);
    letter-spacing: var(--vms-primary-letter-spacing);
    text-transform: uppercase;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #DFDFDF;
    text-decoration: none;
    color: #4F4F4F;
    transition: border-color 0.3s, color 0.3s;
    cursor: pointer;
}

.vms-btn-toggle-categories:hover {
    border-color: #FB7840;
    text-decoration: none;
    color: #4F4F4F;
}

.vms-btn-toggle-categories:hover .vms-btn-toggle-categories-icon:after {
    opacity: 1;
}

.vms-btn-toggle-categories.active .vms-btn-toggle-categories-icon span {
    background: transparent;
}

.vms-btn-toggle-categories.active .vms-btn-toggle-categories-icon span:after {
    transform: rotate(45deg);
    top: 0;
}

.vms-btn-toggle-categories.active .vms-btn-toggle-categories-icon span:before {
    transform: rotate(-45deg);
    top: 0;
}

/* === Toggle Icon Styles === */
.vms-btn-toggle-categories-icon {
    width: 60px;
    height: 60px;
    position: relative;
    background-image: linear-gradient(45deg, #FB7840 0%, #FBB040 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vms-btn-toggle-categories-icon:after {
    content: "";
    display: block;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(225deg, #FB7840 0%, #FBB040 100%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.vms-btn-toggle-categories-icon span,
.vms-btn-toggle-categories-icon span:after,
.vms-btn-toggle-categories-icon span:before {
    content: "";
    display: block;
    position: absolute;
    width: 24px;
    height: 3px;
    background: #fff;
    transition: all 0.3s;
    z-index: 1;
}

.vms-btn-toggle-categories-icon span {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.vms-btn-toggle-categories-icon span:before {
    top: -7px;
    left: 0;
}

.vms-btn-toggle-categories-icon span:after {
    top: 7px;
    left: 0;
}

.vms-btn-toggle-title {
    margin-left: 35px;
    color: #FB7840;
    background-image: linear-gradient(45deg, #FB7840 0%, #FBB040 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--vms-primary-font-family);
    font-weight: var(--vms-primary-font-weight);
    letter-spacing: var(--vms-primary-letter-spacing);
}

/* === Categories Wrapper === */
.vms-categories-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    visibility: hidden;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    z-index: 1000;
    transition: opacity 0.3s, max-height 0.3s, visibility 0.3s;
}

.vms-categories-wrapper.active {
    visibility: visible;
    opacity: 1;
    max-height: 2500px;
    overflow: visible;
}

/* === Categories Container === */
.vms-categories {
    width: 331px;
    min-height: auto;
    position: relative;
    background: #fff;
    display: flex;
    box-shadow: 0 10px 30px 0 rgba(0, 0, 0, 0.3);
}

/* === Categories Navigation === */
.vms-categories-nav {
    width: 330px;
    height: 100%;
    padding: 25px 25px 35px;
    background: #fff;
    box-shadow: -5px 0 30px 0 rgba(0, 0, 0, 0.3);
    margin: 0;
    list-style: none;
    position: relative;
}

.vms-categories-nav:before {
    content: "";
    position: absolute;
    display: block;
    width: 15px;
    height: 15px;
    background: #fff;
    top: -7px;
    left: 22px;
    transform: rotate(45deg);
    z-index: 101;
    box-shadow: -2px -2px 5px rgba(0, 0, 0, 0.1);
}

/* === Category Items === */
.vms-categories-nav > li {
    position: relative;
}

.vms-categories-nav > li:last-child {
    border-bottom: none;
}

/* === Category Labels - Primary Font === */
.vms-categories-nav > li > a {
    color: #FB7840;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 10px 30px 10px 0;
    font-family: var(--vms-primary-font-family);
    font-size: 14px;
    line-height: var(--vms-primary-line-height);
    font-weight: var(--vms-primary-font-weight);
    letter-spacing: var(--vms-primary-letter-spacing);
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s;
}

.vms-categories-nav > li.vms-has-children > a:after {
    content: "";
    position: absolute;
    display: block;
    width: 10px;
    height: 10px;
    background: #fff;
    right: -30px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    -webkit-transform: translateY(-50%) rotate(45deg);
    -ms-transform: translateY(-50%) rotate(45deg);
    z-index: 111;
    opacity: 0;
    transition: opacity 0.3s;
    -webkit-backface-visibility: hidden;
    -webkit-tap-highlight-color: transparent;
    border-top:none !important;
    border-right:none !important;
    border-bottom:none !important;
    border-left:none !important;
}

.vms-categories-nav > li.vms-has-children > a:before {
    content: "";
    display: none;
}

.vms-categories-nav > li > a:hover {
    text-decoration:underline;
}

.vms-categories-nav > li > a:hover .vms-counter {
    color: #FB784090;
}

.vms-categories-nav > li:hover .vms-subcategories-cnt {
    opacity: 1;
    visibility: visible;
    height: auto;
}

.vms-categories-nav > li.vms-has-children:hover > a:after {
    opacity: 1;
}

.vms-categories-nav > li.vms-has-children.active > a:after {
    opacity: 1;
}

.vms-categories-nav > li.active .vms-subcategories-cnt {
    opacity: 1;
    visibility: visible;
    height: auto;
}

/* === Counter - Secondary Font === */
.vms-counter {
    font-family: var(--vms-secondary-font-family);
    font-size: var(--vms-secondary-font-size);
    line-height: var(--vms-secondary-line-height);
    font-weight: var(--vms-secondary-font-weight);
    letter-spacing: var(--vms-secondary-letter-spacing);
    text-transform: none;
    color: #999;
    transition: color 0.3s;
    flex-shrink: 0;
}

.vms-category-name {
    flex: 1;
    font-family: var(--vms-primary-font-family);
    font-weight: var(--vms-primary-font-weight);
    letter-spacing: var(--vms-primary-letter-spacing);
}

/* === Subcategories Container === */
.vms-subcategories-cnt {
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    height: 0;
    position: absolute;
    top: 0;
    left: 305px;
    right: 0;
    min-height: auto;
    padding: 25px 25px 35px;
    width: 330px;
    background: transparent;
    box-shadow: -5px 0 30px 0 rgba(0, 0, 0, 0.3);
    border-left: 1px solid #E2E2E2;
    z-index: 11;
    transition: all 0.3s;
}

.vms-subcategories-cnt.full {
    width: 1070px;
}

/* === Subcategories List === */
.vms-subcategories {
    list-style: none;
    font-family: var(--vms-secondary-font-family);
    font-size: var(--vms-secondary-font-size);
    line-height: var(--vms-secondary-line-height);
    font-weight: var(--vms-secondary-font-weight);
    letter-spacing: var(--vms-secondary-letter-spacing);
    color: #4F4F4F;
    text-transform: none;
    margin: 0;
    padding: 0;
}

.vms-subcategories > li {
    margin-bottom: 8px;
}

.vms-subcategories > li > a {
    color: #f2f2f2;
    position: relative;
    padding: 6px 0;
    display: inline-block;
    text-decoration: none;
    transition: color 0.3s, border-bottom-color 0.3s;
    border-bottom: 1px solid transparent;
    font-family: var(--vms-secondary-font-family);
    font-weight: var(--vms-secondary-font-weight);
    letter-spacing: var(--vms-secondary-letter-spacing);
}

.vms-subcategories > li > a:hover {
    text-decoration: underline;
}

.vms-subcategories > li > a:hover:after {
    color: white;
}

/* === Special Links === */
.vms-link-red .vms-red {
    color: #C9011A;
    font-weight: 600;
}

.vms-link-red:hover {
    border-bottom-color: #C9011A !important;
}

.vms-link-red:hover:before {
    color: #C9011A !important;
}

.vms-categories-all {
    font-weight: bold;
    color: #FB7840;
}

.vms-categories-all:hover {
    color: #FBB040 !important;
}

/* === Responsive Design === */
@media (max-width: 1250px) {
	.vms-categories-wrapper{
		    width: calc(100vw - 20px);
	}
    .vms-btn-toggle-categories {
        width: 200px;
        font-size: 14px;
    }
    
    .vms-btn-toggle-title {
        margin-left: 25px;
    }
    
    .vms-categories {
        width: 100%;
        max-width: 660px;
    }
    
    .vms-categories-nav {
        width: 100%;
    }
    
    .vms-subcategories-cnt {
        width: 330px;
        left: 100%;
        max-width: 330px;
    }
}

@media (max-width: 980px) {
    .vms-mega-menu-wrapper {
        width: 100%;
    }
    
    .vms-btn-toggle-categories {
        width: 100%;
        justify-content: flex-start;
    }
    
    .vms-categories {
        width: 100%;
        flex-direction: column;
        min-height: auto;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
    
    .vms-categories-nav {
        width: 100%;
        height: auto;
        padding: 0;
        box-shadow: none;
        background-image: linear-gradient(45deg, #FB7840 0%, #FBB040 100%);
    }
    
    .vms-categories-nav:before {
        display: none;
    }
    
    .vms-categories-nav > li {
        padding: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .vms-categories-nav > li > a {
        color: #fff;
        padding: 0;
        position: relative;
    }
    
    .vms-categories-nav > li > a:after {
        display: none;
    }
    
    .vms-categories-nav > li.vms-has-children > a {
        padding-right: 30px;
    }
    
    .vms-categories-nav > li.vms-has-children > a:before {
        content: "❯";
        position: absolute;
        display: block;
        font-size: 13px;
        color: #fff;
        right: 15px;
        top: 50%;
        transform: translateY(-50%) rotate(90deg);
        margin-left: 0;
        opacity: 1;
        font-weight: bold;
        transition: transform 0.3s;
    }
    
    .vms-categories-nav > li.vms-has-children > a:after {
        display: none;
    }
    
    .vms-categories-nav > li.active > a:after {
        display: none;
    }
    
    .vms-categories-nav > li.active > a:before {
        transform: translateY(-50%) rotate(270deg);
    }
    
    .vms-counter {
        display: none;
    }
    
    .vms-subcategories-cnt {
        width: 100%;
        position: relative;
        top: unset;
        left: unset;
        min-height: unset;
        max-height: 0;
        overflow: hidden;
        padding: 0 0 0 15px;
        border: none;
        box-shadow: none;
        clip-path: none;
        transition: max-height 0.3s;
    }
    
    .vms-subcategories-cnt.active {
        max-height: 1500px;
    }
    
    .vms-subcategories {
        text-transform: uppercase;
        font-size: 13px;
        line-height: 26px;
        color: white;
        padding-top: 10px;
    }
    
    .vms-subcategories > li > a {
        padding: 2px 0;
        color: #f2f2f2;
    }
}

@media (max-width: 600px) {
    .vms-btn-toggle-categories {
        font-size: 14px;
        height: 50px;
    }
    
    .vms-btn-toggle-categories-icon {
        width: 50px;
        height: 50px;
    }
    
    .vms-btn-toggle-title {
        margin-left: 20px;
    }
    
    .vms-categories-nav > li {
        padding: 12px 15px;
    }
    
    .vms-categories-nav > li > a {
        font-size: 14px;
    }
} 