/* Header Styles */

.main-header {
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    padding: 10px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.header-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 80px;
}

.logo {
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
    color: #1a2744;
    white-space: nowrap;
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
    min-width: 200px;
    height: 80px;
}

.logo img {
    height: 250px !important;
    width: auto;
    max-width: 300px;
    display: block;
    position: absolute;
    top: 50%;
    left: -80px;
    transform: translateY(-50%);
    z-index: 10;
}

/* Search Bar */
.search-bar {
    flex: 2;
    max-width: 600px;
    
    /* margin-left: 80px;
    margin-right: 80px; */
}

.search-bar form {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 12px 18px;
    border: 1px solid #d1d5db;
    border-radius: 8px 0 0 8px;
    border-right: none;
    font-size: 14px;
}

.search-bar input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-bar button {
    padding: 12px 18px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.search-bar button:hover {
    background: #1d4ed8;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 16px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #374151;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    padding: 8px;
}

.action-item:hover {
    color: #2563eb;
}

.action-item i {
    font-size: 20px;
}

/* Notification badge */
.notify-box {
    position: relative;
}

.notif-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #1a2744;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cart count badge */
.cart-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #2563eb;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Wishlist count badge */
.wishlist-count {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation - Dark Blue Bar */
.header-bottom {
    background: #1a2744;
    padding: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    display: block;
    color: white;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 24px;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-links a:hover,
.nav-links li.active a {
    background: #2563eb;
}

/* Bottom Navigation Bar (Mobile) */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    padding: 0;
    height: 70px;
    justify-content: center;
    align-items: center;
}

.bottom-nav-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 500px;
    gap: 0;
}

.bottom-nav-item {
    flex: 1;
    text-align: center;
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    padding: 8px;
    transition: all 0.2s;
    position: relative;
}

.bottom-nav-link:hover,
.bottom-nav-link.active {
    color: #2563eb;
}

.bottom-nav-link i {
    font-size: 20px;
}

.bottom-nav-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 20px);
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--navy);
    cursor: pointer;
    padding: 8px;
}

/* Responsive - Complete Mobile Overhaul */
@media (max-width: 768px) {
    .header-top {
        padding: 10px 0;
        position: relative;
    }
    
    .header-top .container {
        padding: 0 10px;
        max-width: 100%;
    }
    
    .header-flex {
        display: grid;
        grid-template-columns: 40px 1fr auto;
        grid-template-areas: "menu logo icons" "search search search";
        gap: 8px;
        align-items: center;
        min-height: auto;
    }
    
    .mobile-menu-toggle {
        display: flex;
        grid-area: menu;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        padding: 0;
    }
    
    .logo {
        grid-area: logo;
        font-size: 20px;
        margin: 0;
        min-width: 0;
        max-width: 100%;
        width: 100%;
        justify-content: center;
        text-align: center;
        height: auto;
        overflow: hidden;
    }
    
    .logo span {
        max-width: calc(100vw - 150px);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .logo img {
        position: static;
        height: 42px !important;
        width: auto;
        left: auto;
        top: auto;
        margin-right: 8px;
        flex-shrink: 0;
    }
    
    .header-icons {
        grid-area: icons;
        gap: 4px;
    }
    
    .header-icons a {
        width: 32px;
        height: 32px;
    }
    
    .header-icons a i {
        font-size: 14px;
    }
    
    .header-icons .badge {
        top: -4px;
        right: -4px;
        font-size: 10px;
        padding: 2px 5px;
        min-width: 16px;
        height: 16px;
    }
    
    .search-bar {
        grid-area: search;
        order: unset;
        max-width: 100%;
        width: 100%;
        margin-top: 4px;
    }
    
    .search-bar input {
        padding: 10px 12px;
        font-size: 16px;
        min-width: 0;
    }
    
    .search-bar button {
        padding: 10px 14px;
    }
    
    /* Mobile Navigation - Slide-out menu */
    .header-bottom {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(26, 39, 68, 0.98);
        z-index: 2000;
        padding: 60px 20px 20px;
        overflow-y: auto;
    }
    
    .header-bottom.active {
        display: block;
    }
    
    .header-bottom .container {
        display: block;
        padding: 0;
    }
    
    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .nav-links li {
        width: 100%;
    }
    
    .nav-links a {
        font-size: 16px;
        padding: 14px 20px;
        text-align: center;
        border-radius: 8px;
    }
    
    .nav-links a:hover,
    .nav-links li.active a {
        background: rgba(37, 99, 235, 0.3);
    }
    
    .mobile-menu-close {
        display: block;
        position: absolute;
        top: 16px;
        right: 16px;
        background: none;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        z-index: 2001;
        width: 40px;
        height: 40px;
    }
    
    .bottom-nav {
        display: flex;
        height: 60px;
    }
    
    body {
        padding-bottom: 60px;
        overflow-x: hidden;
    }
}

/* Small phones (480px and below) */
@media (max-width: 480px) {
    .header-top {
        padding: 10px 0;
    }
    
    .header-top .container {
        padding: 0 8px;
    }
    
    .header-flex {
        gap: 6px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo img {
        height: 38px !important;
    }
    
    .mobile-menu-toggle {
        font-size: 20px;
        width: 32px;
        height: 32px;
    }
    
    .header-icons {
        gap: 2px;
    }
    
    .header-icons a {
        width: 28px;
        height: 28px;
    }
    
    .header-icons a i {
        font-size: 12px;
    }
    
    .search-bar {
        margin-top: 6px;
    }
    
    .search-bar input {
        padding: 8px 10px;
        font-size: 14px;
    }
    
    .search-bar button {
        padding: 8px 10px;
    }
    
    .nav-links a {
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .bottom-nav {
        display: flex;
        height: 60px;
    }
    
    .bottom-nav-link {
        padding: 8px;
        font-size: 11px;
    }
    
    body {
        padding-bottom: 60px;
    }
}

/* Extra small phones (360px and below) */
@media (max-width: 360px) {
    .logo {
        font-size: 16px;
    }
    
    .logo img {
        height: 28px;
        margin-right: 4px;
    }
    
    .header-icons a {
        width: 28px;
        height: 28px;
    }
    
    .header-icons a i {
        font-size: 12px;
    }
}

/* Mobile menu close button (hidden on desktop) */
.mobile-menu-close {
    display: none;
}

/* Prevent horizontal scroll on mobile */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container {
        max-width: 100%;
    }
    
    img {
        max-width: 100%;
        height: auto;
    }
}

