/* Navbar Styles - Стили навигации ТРОН */

/* Top Header */
.top-header {
    background-color: var(--tron-white);
    border-bottom: 1px solid #E5E5E5;
    padding: 12px 0;
    font-size: 14px;
    position: relative;
    z-index: 1000;
}

.top-header .d-flex {
    gap: 16px;
}

.top-header a {
    color: var(--tron-text);
    transition: color 0.3s ease;
}

.top-header a:hover {
    color: var(--tron-blue);
}

.top-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}



.location-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--tron-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.location-selector:hover {
    color: var(--tron-blue);
}

.top-nav-links {
    display: flex;
    gap: 20px;
}

.top-nav-links a {
    color: var(--tron-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.top-nav-links a:hover {
    color: var(--tron-blue);
}

.contact-info {
    color: var(--tron-text);
    font-weight: 500;
}

.contact-info strong {
    color: var(--tron-blue);
}

/* Header Wrapper */
.header-wrapper {
    position: relative;
    background-color: var(--tron-white);
}

/* Main Header */
.main-header {
    background-color: var(--tron-white);
    padding: 15px 0;
    position: relative;
    z-index: 999;
}


.logo {
    font-size: 32px;
    font-weight: 800;
    color: var(--tron-blue);
    text-decoration: none;
    position: relative;
    transition: all 0.3s ease;
}


.logo:hover {
    transform: scale(1.05);
}

.catalog-btn {
    background-color: var(--tron-blue);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.catalog-btn:hover {
    background-color: var(--tron-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.catalog-btn:active {
    transform: translateY(0);
}

.search-container {
    position: relative;
    flex: 1;
}

.search-input {
    width: 100%;
    padding: 12px 20px 12px 50px;
    border: 2px solid #E5E5E5;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: white;
}

.search-input:focus {
    border-color: var(--tron-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    outline: none;
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tron-dark-gray);
    font-size: 18px;
    pointer-events: none;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--tron-gray);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tron-text);
    font-size: 18px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.icon-btn:hover {
    background-color: var(--tron-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.cart-badge {
    background-color: #FF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -5px;
    right: -5px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Main Navigation */
.main-nav {
    background-color: var(--tron-white);
    border-bottom: 1px solid #E5E5E5;
    position: relative;
    z-index: 998;
}

.main-nav .container {
    display: flex;
    align-items: center;
}

.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--tron-text);
    font-weight: 500;
    padding: 15px 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    position: relative;
}

.nav-link:hover {
    color: var(--tron-blue);
    background-color: var(--tron-light-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tron-blue), #00CCFF);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link.active {
    color: var(--tron-blue);
    background-color: var(--tron-light-blue);
}

.nav-link.active::after {
    width: 80%;
}

/* Dropdown Menus */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--tron-text);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid #F5F5F5;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--tron-light-blue);
    color: var(--tron-blue);
}

.dropdown-divider {
    height: 1px;
    background-color: #E5E5E5;
    margin: 8px 0;
}

/* Mobile Navigation */
.navbar-toggler {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--tron-text);
    cursor: pointer;
}

.navbar-collapse {
    display: flex;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--tron-blue), #00CCFF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 15px 0;
    margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb-item {
    color: var(--tron-dark-gray);
    font-size: 14px;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '/';
    color: var(--tron-dark-gray);
    margin-right: 8px;
}

.breadcrumb-item.active {
    color: var(--tron-text);
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--tron-dark-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--tron-blue);
}

/* Responsive Design */
@media (max-width: 992px) {
    .top-header {
        display: none;
    }
    
    .main-header .container {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        max-width: none;
    }
    
    .header-icons {
        gap: 10px;
    }
    
    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .navbar-toggler {
        display: block;
    }
    
    .navbar-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #E5E5E5;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .nav {
        flex-direction: column;
        gap: 0;
    }
    
    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid #F5F5F5;
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: var(--tron-light-blue);
    }
    
    .main-header .container {
        justify-content: space-between;
    }
    
    .logo {
        font-size: 28px;
    }
    
    .catalog-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .main-header .container {
        padding: 0 10px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .catalog-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .search-input {
        font-size: 14px;
        padding: 10px 15px 10px 40px;
    }
    
    .search-icon {
        left: 15px;
        font-size: 16px;
    }
    
    .icon-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

/* Mega Menu Styles */
/* Mega Menu - OBI Style - Fullscreen */
.mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    overflow: hidden;
}

.mega-menu.show {
    opacity: 1;
    visibility: visible;
}

.mega-menu-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    background: white;
    margin: 0;
    position: relative;
    max-width: none;
}

/* Close Button */
.mega-menu-close {
    position: absolute;
    top: 20px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--tron-text);
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mega-menu-close:hover {
    background: var(--tron-blue);
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* Left Categories List */
.mega-menu-categories {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    flex-shrink: 0;
    padding-top: 20px;
}

.category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-item {
    border-bottom: 1px solid #e5e5e5;
    transition: all 0.3s ease;
}

.category-item:hover,
.category-item.active {
    background: white;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: var(--tron-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-link:hover {
    color: var(--tron-blue);
    background: white;
}

.category-item.active .category-link {
    color: var(--tron-blue);
    background: white;
    border-left: 3px solid var(--tron-blue);
    padding-left: 17px;
}

.category-link i:first-child {
    font-size: 18px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.category-link i.fa-chevron-right {
    font-size: 12px;
    opacity: 0.5;
}

.category-count {
    font-size: 12px;
    color: #999;
    font-weight: 400;
}

/* Right Subcategories Panel */
.mega-menu-subcategories {
    flex: 1;
    background: white;
    overflow-y: auto;
    padding: 40px 60px;
    position: relative;
    width: calc(100vw - 350px);
}

.subcategories-panel {
    display: none;
}

.subcategories-panel.active {
    display: block;
}

.subcategories-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--tron-text);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.subcategories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.subcategory-group {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.subcategory-group:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.subcategory-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--tron-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.subcategory-title:hover {
    color: var(--tron-blue);
}

.subcategory-title .text-muted {
    font-size: 12px;
    font-weight: 400;
    margin-left: 5px;
}

/* Mega Menu Products - Mini Cards */
.mega-menu-products {
    padding: 20px 0;
}

.products-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

@media (max-width: 1400px) {
    .products-grid-5 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 991px) {
    .products-grid-5 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .products-grid-5 {
        grid-template-columns: 1fr;
    }
}

.mega-menu-product-mini-card {
    display: block;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.mega-menu-product-mini-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--tron-blue);
}

.product-mini-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-mini-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.mega-menu-product-mini-card:hover .product-mini-image img {
    transform: scale(1.05);
}

.product-mini-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2549d8 0%, #1e3cb8 100%);
    color: white;
    font-size: 2.5rem;
}

.product-mini-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-mini-name {
    font-size: 13px;
    font-weight: 600;
    color: #212529;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

.product-mini-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.product-mini-price .current {
    font-size: 16px;
    font-weight: 700;
    color: #212529;
}

.product-mini-price .old {
    font-size: 13px;
    color: #6c757d;
    text-decoration: line-through;
}

.catalog-btn.active {
    background-color: var(--tron-dark-blue);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.4);
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .mega-menu-wrapper {
        flex-direction: column;
        width: 90%;
        margin: 5vh auto;
        height: 90vh;
        border-radius: 20px;
        overflow: hidden;
    }
    
    .mega-menu-categories {
        width: 100%;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    
    .mega-menu-subcategories {
        padding: 20px;
        flex: 1;
    }
    
    .subcategories-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .subcategories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .mega-menu-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .mega-menu-wrapper {
        width: 95%;
        margin: 2vh auto;
        height: 96vh;
        border-radius: 15px;
    }
    
    .mega-menu-categories {
        max-height: 35vh;
    }
    
    .category-link {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .subcategories-title {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .subcategories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .subcategory-group {
        padding: 12px;
    }
}

/* Desktop Navigation Spacing Fix */
@media (min-width: 992px) {
    /* Равные отступы для навигации */
    .navbar-expand-lg .container-fluid {
        display: flex !important;
        align-items: center !important;
        gap: 24px !important;
    }
    
    .category-dropdown {
        flex-shrink: 0 !important;
    }
    
    .navbar-nav {
        margin-left: 0 !important;
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        gap: 24px !important;
    }
    
    .navbar-nav .nav-link {
        white-space: nowrap !important;
        padding: 0 !important;
    }
}