/* Header Global Styles */

/* Fix horizontal scroll issue */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    position: relative;
}

/* Prevent specific elements from causing overflow */
* {
    box-sizing: border-box;
}

.row {
    margin-left: -15px;
    margin-right: -15px;
}

/* Responsive top header */
@media (max-width: 991px) {
    #top-header {
        text-align: center;
        padding: 10px 5px;
    }
    
    .header-links {
        display: inline-block;
        padding: 0;
        margin: 5px 0;
    }
    
    .header-links.pull-left,
    .header-links.pull-right {
        float: none !important;
        width: 100%;
    }
    
    .header-links li {
        display: inline-block;
        margin: 0 5px;
        font-size: 11px;
    }
}

@media (max-width: 767px) {
    #top-header {
        padding: 8px 5px;
    }
    
    .header-links li {
        font-size: 10px;
        margin: 0 3px;
    }
    
    .header-links li a {
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    /* Extra small devices - show only icons */
    #top-header {
        padding: 5px;
    }
    
    .header-links li {
        margin: 0 8px;
    }
    
    .header-links li a {
        font-size: 0;
    }
    
    .header-links li a i {
        font-size: 18px;
        margin-right: 0;
    }
    
    .header-links li a i::after {
        content: '';
    }
}

/* Responsive search bar */
#search-bar .header-search form {
    display: flex;
    width: 100%;
}

#search-bar .input {
    flex-grow: 1;
    max-width: 450px;
    width: 100%;
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
}

.search-btn {
    border-top-right-radius: 40px;
    border-bottom-right-radius: 40px;
}

@media (max-width: 991px) {
    #search-bar .input {
        max-width: 100%;
    }
}

/* Responsive logo sizing */
.responsive-logo {
    max-width: 250px;
    height: auto;
}

@media (max-width: 991px) {
    .responsive-logo {
        max-width: 180px;
    }
}

@media (max-width: 767px) {
    .responsive-logo {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .responsive-logo {
        max-width: 120px;
    }
}

/* Cart visibility - hide cart in responsive nav on desktop, hide cart icon in header on mobile */
@media only screen and (min-width: 992px) {
    #responsive-nav .cart-menu-item {
        display: none !important;
    }
}

@media only screen and (max-width: 991px) {
    /* Eltünteti a Kosár ikont és dropdownt mobilon a header-ből */
    .header-ctn .fa-shopping-cart {
        display: none !important;
    }
    
    .header-ctn .dropdown .qty {
        display: none !important;
    }
    
    .header-ctn .dropdown .fa-shopping-cart + span {
        display: none !important;
    }
    
    .header-ctn .cart-dropdown {
        display: none !important;
    }
}

/* Hide cart menu item in main navigation on ALL screen sizes */
.main-nav .cart-menu-item {
    display: none !important;
}

/* ===========================================
   MODERN USER DROPDOWN STYLES
   =========================================== */

/* Modern User Dropdown Menu */
.modern-user-dropdown {
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    min-width: 280px !important;
    overflow: hidden;
    background: white;
}

/* Dropdown Header */
.dropdown-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 20px;
    color: white;
}

.user-profile-info {
    display: flex;
    align-items: center;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.user-avatar-small i {
    color: white;
    font-size: 20px;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: white;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-balance {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 500;
}

/* Dropdown Divider */
.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0;
}

/* Modern Dropdown List */
.modern-dropdown-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.modern-dropdown-list li {
    margin: 0;
}

.modern-dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
    border: none;
    background: none;
    width: 100%;
}

.modern-dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
    text-decoration: none;
    transform: translateX(4px);
}

.modern-dropdown-item i {
    margin-right: 12px;
    width: 16px;
    text-align: center;
    font-size: 14px;
    color: #6c757d;
}

.modern-dropdown-item:hover i {
    color: #667eea;
}

/* Dropdown Footer */
.dropdown-footer {
    padding: 8px 0;
}

.logout-item {
    color: #dc3545 !important;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
}

.logout-item:hover {
    background: #f8d7da !important;
    color: #721c24 !important;
}

.logout-item i {
    color: #dc3545 !important;
}

/* JavaScript Animation Classes */
.modern-dropdown-item.hover-effect {
    background: #f8f9fa;
    color: #667eea;
    transform: translateX(4px);
}

.modern-dropdown-item.hover-effect i {
    color: #667eea;
}

.modern-dropdown-item.click-effect {
    transform: scale(0.98);
    background: #e9ecef;
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .modern-user-dropdown {
        min-width: 240px !important;
    }
    
    .dropdown-header {
        padding: 12px 16px;
    }
    
    .user-avatar-small {
        width: 32px;
        height: 32px;
        margin-right: 10px;
    }
    
    .user-avatar-small i {
        font-size: 16px;
    }
    
    .user-name {
        font-size: 13px;
    }
    
    .user-balance {
        font-size: 11px;
    }
    
    .modern-dropdown-item {
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .modern-user-dropdown {
        min-width: 200px !important;
    }

    .modern-dropdown-item {
        padding: 8px 14px;
        font-size: 12px;
    }
}

/*----------------------------*\
	Rainbow text animation
\*----------------------------*/

.rainbow-text a {
    background: linear-gradient(90deg, red, orange, yellow, green, blue, indigo, violet, red);
    background-size: 400%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow-animation 10s linear infinite;
}

@keyframes rainbow-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
