/* ============================================
   PREMIUM HEADER NAVIGATION - ENHANCED
   ============================================ */

/* Main Header - Sticky with Premium Effects */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.main-header.scrolled {
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 1);
}

/* Navbar Container */
.navbar {
    padding: 10px 0;
    transition: padding 0.3s ease;
}

.navbar.scrolled {
    padding: 5px 0;
}

/* Brand Logo Styling */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    transition: all 0.3s ease;
}

.brand-logo {
    height: 65px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.1));
}

.navbar.scrolled .brand-logo {
    height: 55px;
}

.brand-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 10px rgba(15, 76, 117, 0.2));
}

/* Navigation Items */
.navbar-nav {
    gap: 8px;
    align-items: center;
}

/* Navigation Links - Premium Style */
.nav-link {
    font-weight: 600;
    color: #1a2f4d !important;
    padding: 10px 18px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-size: 0.98rem;
    letter-spacing: 0.3px;
    border-radius: 8px;
}

/* Animated Underline Effect */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #0f4c75, #3282b8);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

/* Hover State */
.nav-link:hover {
    color: #0f4c75 !important;
    background: rgba(15, 76, 117, 0.05);
}

.nav-link:hover::before {
    width: 70%;
}

/* Active State */
.nav-link.active {
    color: #0f4c75 !important;
    background: rgba(15, 76, 117, 0.08);
}

.nav-link.active::before {
    width: 70%;
}

/* Cart Link - Special Styling */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px !important;
}

.cart-link i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cart-link:hover i {
    transform: scale(1.15) rotate(-5deg);
}

/* Cart Count Badge - Premium Design */
.cart-count {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    position: absolute;
    top: 2px;
    right: 8px;
    min-width: 22px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.cart-link:hover .cart-count {
    background: linear-gradient(135deg, #c82333, #a71d2a);
    transform: scale(1.15);
    animation: none;
}

/* Contact CTA Button - WhatsApp Style */
.btn-header-cta {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff !important;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 12px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Button Ripple Effect */
.btn-header-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-header-cta:hover::before {
    width: 300px;
    height: 300px;
}

.btn-header-cta:hover {
    background: transparent;
    color: #25D366 !important;
    border-color: #25D366;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.btn-header-cta i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
    margin-right: 8px;
}

.btn-header-cta:hover i {
    transform: scale(1.2) rotate(15deg);
}

/* Navbar Toggler - Custom Premium Style */
.navbar-toggler {
    border: 2px solid #0f4c75;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(15, 76, 117, 0.05);
}

.navbar-toggler:hover {
    background: rgba(15, 76, 117, 0.1);
    transform: scale(1.05);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(15, 76, 117, 0.25);
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f4c75' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 22px;
    height: 22px;
}

/* ============================================
   NOTIFICATION ANIMATIONS
   ============================================ */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet & Below (991px) */
@media (max-width: 991px) {
    .brand-logo {
        height: 55px;
        max-width: 200px;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-nav {
        margin-top: 20px;
        gap: 0;
        padding: 10px 0;
        background: rgba(247, 250, 252, 0.95);
        border-radius: 12px;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 14px 20px !important;
        border-bottom: 1px solid rgba(15, 76, 117, 0.1);
        border-radius: 0;
        width: 100%;
    }
    
    .nav-item:last-child .nav-link {
        border-bottom: none;
    }
    
    /* Remove underline animation on mobile */
    .nav-link::before {
        display: none;
    }
    
    /* Mobile active state */
    .nav-link.active,
    .nav-link:hover {
        background: rgba(15, 76, 117, 0.12);
        border-left: 4px solid #0f4c75;
        padding-left: 16px !important;
    }
    
    .cart-link {
        justify-content: center;
    }
    
    .btn-header-cta {
        margin: 15px 20px 10px;
        width: calc(100% - 40px);
        justify-content: center;
        padding: 12px 28px;
    }
    
    /* Cart count position adjustment for mobile */
    .cart-count {
        top: 8px;
        right: 45%;
    }
}

/* Mobile Landscape & Small Tablets (768px) */
@media (max-width: 767px) {
    .brand-logo {
        height: 50px;
        max-width: 180px;
    }
    
    .navbar {
        padding: 8px 0;
    }
    
    .nav-link {
        padding: 12px 18px !important;
        font-size: 0.95rem;
    }
    
    .btn-header-cta {
        font-size: 0.9rem;
        padding: 11px 24px;
    }
}

/* Small Mobile (576px) */
@media (max-width: 576px) {
    .brand-logo {
        height: 45px;
        max-width: 160px;
    }
    
    .navbar {
        padding: 6px 0;
    }
    
    .navbar-toggler {
        padding: 6px 10px;
    }
    
    .nav-link {
        padding: 12px 16px !important;
        font-size: 0.9rem;
    }
    
    .btn-header-cta {
        font-size: 0.85rem;
        padding: 10px 20px;
        margin: 12px 15px 8px;
        width: calc(100% - 30px);
    }
}

/* Extra Small Mobile (480px) */
@media (max-width: 480px) {
    .brand-logo {
        height: 40px;
        max-width: 140px;
    }
    
    .navbar {
        padding: 5px 0;
    }
    
    .navbar-toggler {
        padding: 5px 8px;
    }
    
    .navbar-toggler-icon {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   SCROLLED STATE ENHANCEMENTS
   ============================================ */

/* Add this class with JavaScript on scroll */
.main-header.navbar-shrink {
    padding: 0;
}

.main-header.navbar-shrink .navbar {
    padding: 6px 0;
}

.main-header.navbar-shrink .brand-logo {
    height: 50px;
}

/* ============================================
   SMOOTH ANIMATIONS
   ============================================ */

/* Fade in animation for mobile menu */
@media (max-width: 991px) {
    .navbar-collapse {
        transition: all 0.3s ease-in-out;
    }
    
    .navbar-collapse.show,
    .navbar-collapse.collapsing {
        animation: slideDown 0.3s ease-in-out;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Loading state for cart count */
.cart-count.loading {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
