/*=============================================
=    Vendors Megamenu Custom Styles        =
=============================================*/

/* Parent positioning */
.mainmenu__item.vendors-menu-item {
    position: relative;
}

/* Megamenu Container */
.mainmenu__item.vendors-menu-item .megamenu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 900px;
    padding: 25px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    z-index: 9999;
    margin-top: 0;
}

.mainmenu__item.vendors-menu-item:hover .megamenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: flex;
}

.mainmenu__item.vendors-menu-item .megamenu > li {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Vendors Search Box */
.vendors-search-wrapper {
    display: block;
    width: 100%;
    padding: 0 0 20px 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.vendors-search-box {
    position: relative;
    width: 100%;
}

.vendors-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s ease;
    outline: none;
    background: #f9f9f9;
}

.vendors-search-input:focus {
    border-color: #ff6600;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.1);
}

.vendors-search-input::placeholder {
    color: #999;
    font-style: italic;
}

.vendors-search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff6600;
    font-size: 18px;
    pointer-events: none;
}

/* Vendors Grid Container */
.vendors-grid-wrapper {
    display: block;
    width: 100%;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    margin: 0;
    flex-shrink: 0;
}

/* Custom Scrollbar */
.vendors-grid-wrapper::-webkit-scrollbar {
    width: 6px;
}

.vendors-grid-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 5px;
}

.vendors-grid-wrapper::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.vendors-grid-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

/* Vendors Grid Layout */
.vendors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px 15px;
    width: 100%;
}

/* Vendor Item */
.vendor-menu-item {
    padding: 6px 10px;
    border-radius: 4px;
    transition: all 0.25s ease;
    background: transparent;
}

.vendor-menu-item:hover {
    background: #fff5f0;
    transform: translateX(3px);
}

.vendor-menu-item a {
    display: block;
    color: #333;
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.25s ease;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vendor-menu-item:hover a {
    color: #ff6600;
    font-weight: 500;
}

/* No Results Message */
.no-vendors-found {
    display: none;
    text-align: center;
    padding: 30px 15px;
    color: #999;
    font-size: 14px;
}

.no-vendors-found i {
    font-size: 40px;
    color: #e0e0e0;
    margin-bottom: 10px;
    display: block;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mainmenu__item.vendors-menu-item .megamenu {
        width: 750px;
    }
    
    .vendors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .mainmenu__item.vendors-menu-item .megamenu {
        width: 600px;
    }
    
    .vendors-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mainmenu__item.vendors-menu-item .megamenu {
        width: 400px;
        max-width: calc(100vw - 40px);
    }
    
    .vendors-grid {
        grid-template-columns: 1fr;
    }
    
    .vendors-grid-wrapper {
        max-height: 300px;
    }
}

/* Hidden Class for Search Filter */
.vendor-menu-item.hidden {
    display: none;
}
