/**
 * GudItems Header Manager - Frontend Styles
 */

/* Brand Search */
.guditems-brand-search {
    position: relative;
}

.brand-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.brand-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.search-button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-button:hover {
    background: #005a87;
}

/* Search Results */
.brand-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -1px;
}

.brand-results {
    list-style: none;
    padding: 0;
    margin: 0;
}

.brand-results li {
    border-bottom: 1px solid #f0f0f0;
}

.brand-results li:last-child {
    border-bottom: none;
}

.brand-results a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
}

.brand-results a:hover {
    background: #f5f5f5;
}

.brand-logo-small {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.brand-title {
    font-weight: 500;
}

.loading,
.no-results,
.error {
    padding: 20px;
    text-align: center;
    color: #666;
}

.error {
    color: #dc3232;
}

/* Brands Grid */
.guditems-brands-grid {
    margin: 20px 0;
}

.brands_img {
    padding: 20px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    margin-bottom: 20px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brands_img:hover {
    border-color: #0073aa;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.1);
    transform: translateY(-2px);
}

.brands_img img {
    max-width: 100%;
    height: auto;
    max-height: 80px;
}

.brands_img .brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Brands Tabs */
.guditems-brands-tabs {
    margin: 30px 0;
}

.guditems-brands-tabs .nav-pills {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.guditems-brands-tabs .nav-pills .nav-link {
    padding: 12px 24px;
    background: none;
    border: none;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.3s;
}

.guditems-brands-tabs .nav-pills .nav-link:hover {
    color: #0073aa;
}

.guditems-brands-tabs .nav-pills .nav-link.active {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.guditems-brands-tabs .tab-pane {
    display: none;
}

.guditems-brands-tabs .tab-pane.show.active {
    display: block;
}

/* Load More Button */
.guditems-load-more {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.guditems-load-more:hover:not(:disabled) {
    background: #005a87;
}

.guditems-load-more:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Top Brands List */
.top_brands_list {
    margin: 20px 0;
}

.top_brands_list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.top_brands_list li {
    margin: 0;
}

.top_brands_list a {
    display: block;
    padding: 10px 15px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: center;
}

.top_brands_list a:hover {
    background: #0073aa;
    color: #fff;
}

/* Mega Menu */
.guditems-mega-menu {
    position: relative;
}

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

.menu__item {
    position: relative;
}

.menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.menu__link:hover {
    color: #0073aa;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 800px;
    z-index: 1000;
}

.menu__item.active .submenu {
    display: block;
}

.megamenu__text {
    display: flex;
    padding: 30px;
    gap: 30px;
}

.submenu__inner {
    flex: 1;
}

.submenu__title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #0073aa;
}

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

.submenu__list li {
    margin-bottom: 8px;
}

.submenu__list a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.submenu__list a:hover {
    color: #0073aa;
}

/* Delivery Bar */
.about_delivery_details {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.delivery_flex {
    display: flex;
    gap: 20px;
    align-items: center;
}

.delivery_flex p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .submenu {
        position: static;
        min-width: auto;
        box-shadow: none;
        background: #f5f5f5;
    }
    
    .megamenu__text {
        flex-direction: column;
        padding: 15px;
    }
    
    .top_brands_list ul {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brand-search-results {
        position: fixed;
        left: 10px;
        right: 10px;
        top: auto;
    }
}

@media (max-width: 576px) {
    .brands_img {
        min-height: 100px;
    }
    
    .top_brands_list ul {
        grid-template-columns: 1fr;
    }
}
