@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

*{
    font-family: Poppins;
    margin: 0;
}

nav{
    height: 135px;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    background-color: #ed0018;
    box-shadow: 1px 1px 15px 1px rgb(61, 61, 61);
}

.nav-links{
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    list-style: none;
    gap: 20px;
}

.nav-links a{
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    border-radius: 16px;
    transition: font-size ease 0.25s;
    padding: 10px;
}

.nav-links a:hover{
    font-size: 22px;
}

.logo img{
    width: 200px;
    height: 80px;
}

.header-logo span{
    color: white;
    font-size: 35px;
    font-weight: 500;
    text-decoration: none;
}

.icons{
    display: flex;
    width: auto;
    height: 50px; /* Fixed height for alignment */
    align-items: center;
    justify-content: space-evenly;
    gap: 15px;
}

/* Desktop icon links - ensure same height */
.desktop-icon {
    display: flex;
    align-items: center;
    height: 50px;
}

/* Language Dropdown Styles */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.language-btn img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border: white solid 1px;
}

.language-btn svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s;
}

.language-btn.active svg {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.language-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.language-option:first-child {
    border-radius: 8px 8px 0 0;
}

.language-option:last-child {
    border-radius: 0 0 8px 8px;
}

.language-option:hover {
    background-color: #f5f5f5;
}

.language-option.selected {
    background-color: #e3f2fd;
}

.language-option img {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 2px;
}

.language-option span {
    font-size: 14px;
    color: #333;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .language-selector {
        order: -1;
    }
    
    .language-dropdown {
        right: auto;
        left: 0;
    }
}

.carticon, .profile-icon, .wishlisticon{
    height: 50px;
    width: 50px;
    background-color: transparent;
    color: white;
    padding: 10px;
    transition: transform ease 0.25s;
}

.carticon:hover, .profile-icon:hover, .wishlisticon:hover{
    transform: scale(1.3);
}

/* Cart icon styling */
.cart-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Match parent height */
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffd700;
    color: #ed0018;
    font-size: 12px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.cart-badge[style*="display: flex"] {
    display: flex !important;
}

/* Wishlist icon styling */
.wishlist-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%; /* Match parent height */
}

.wishlist-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffd700;
    color: #ed0018;
    font-size: 12px;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.wishlist-badge[style*="display: flex"] {
    display: flex !important;
}

.login-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    border: white solid 2px;
    border-radius: 25px;
    width: 220px;
    height: 50px;
    color: white;
    text-decoration: none;
    transition: transform ease 0.25s;
}

.logout-btn{
    display: flex;
    justify-content: center;
    align-items: center;
    border: white solid 2px;
    border-radius: 25px;
    width: 140px;
    height: 50px;
    color: white;
    text-decoration: none;
    transition: transform ease 0.25s;
}

.login-btn:hover, .logout-btn:hover{
    transform: scale(1.05);
}

.login-icon, .logout-icon{
    height: 30px;
    width: 30px;
    background-color: transparent;
    color: white;
    padding: 5px;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    color: white;
    padding: 8px;
    z-index: 1001;
}

.hamburger svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
    transition: transform 0.3s ease, color 0.3s ease;
}

.hamburger:hover svg {
    color: #ffcccc;
    transform: scale(1.1);
}

/* Hide mobile cart and wishlist icons on desktop */
.mobile-cart-icon, .mobile-wishlist-icon{
    display: none;
}

/* Hide mobile menu icons on desktop */
.mobile-menu-icons {
    display: none;
}

/* Desktop icons visible by default */
.desktop-icon {
    display: flex;
}

/* Bottom Navigation Bar - Hidden on Desktop */
.bottom-nav {
    display: none;
}

/* Responsive Section */
@media (max-width: 1200px) {
    nav {
        display: flex;
        justify-content: space-between;
        padding: 0 20px;
        height: 100px;
    }

    .logo img{
        width: 130px;
        height: 50px;
    }

    .hamburger {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: #ed0018;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        gap: 30px;
        z-index: 1000;
        padding: 40px 20px;
    }

    .nav-links a {
        font-size: 20px;
    }

    .nav-links.active {
        right: 0;
    }

    /* Hide desktop icons on mobile */
    .desktop-icon {
        display: none;
    }

    /* Show mobile wishlist and cart icons */
    .mobile-wishlist-icon, .mobile-cart-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        position: relative;
    }

    .mobile-badge {
        position: absolute;
        top: -5px;
        right: -5px;
    }

    .icons{
        display: flex;
        width: auto;
        height: auto;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }

    /* Bottom Navigation Bar - Visible on Tablet/Mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 8px 0;
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        height: 65px;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        padding: 8px 15px;
        border-radius: 12px;
        transition: all 0.3s ease;
        flex: 1;
        max-width: 100px;
    }

    .bottom-nav-item svg {
        width: 24px;
        height: 24px;
        margin-bottom: 4px;
        fill: currentColor;
        transition: all 0.3s ease;
    }

    .bottom-nav-item span {
        font-size: 11px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .bottom-nav-item:hover,
    .bottom-nav-item.active {
        color: #ed0018;
    }

    .bottom-nav-item:hover svg,
    .bottom-nav-item.active svg {
        transform: scale(1.1);
    }

    .bottom-nav-item.active {
        font-weight: 600;
    }

    /* Add padding to body to prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 75px;
    }
}

@media (max-width: 900px){
    .mobile-wishlist-icon{
        right: -8px;
    }
}

/* Responsive Section */
@media (max-width: 480px) {
    nav {
        display: flex;
        justify-content: space-between;
        padding: 0 15px;
        height: 90px;
    }

    .logo img{
        width: 100px;
        height: 45px;
    }

    .hamburger {
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border-radius: 50%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: #ed0018;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.3s ease;
        gap: 25px;
        z-index: 1000;
        padding: 30px 15px;
    }

    .nav-links a {
        font-size: 18px;
    }

    .nav-links.active {
        right: 0;
    }

    /* Hide desktop icons */
    .desktop-icon {
        display: none;
    }

    /* Mobile wishlist and cart icons styling */
    .mobile-wishlist-icon, .mobile-cart-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        position: relative;
    }

    .mobile-wishlist-icon .wishlisticon,
    .mobile-cart-icon .carticon {
        width: 35px;
        height: 35px;
        padding: 5px;
    }

    .mobile-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        width: 18px;
        height: 18px;
        font-size: 11px;
    }

    .icons{
        padding: 0;
        display: flex;
        width: auto;
        height: auto;
        justify-content: center;
        align-items: center;
        gap: 7px;
    }

    .login-btn{
        display: flex;
        justify-content: center;
        align-items: center;
        border: white solid 1.5px;
        border-radius: 25px;
        padding: 8px 12px;
        width: auto;
        height: 40px;
        font-size: 11px;
        color: white;
        text-decoration: none;
        transition: transform ease 0.25s;
    }

    .logout-btn{
        display: flex;
        justify-content: center;
        align-items: center;
        border: white solid 1.5px;
        border-radius: 25px;
        padding: 8px 12px;
        width: auto;
        height: 40px;
        font-size: 11px;
        gap: 5px;
        color: white;
        text-decoration: none;
        transition: transform ease 0.25s;
    }

    .login-btn:hover, .logout-btn:hover{
        transform: scale(1.05);
    }

    .login-btn .login-icon, .logout-btn .logout-icon{
        width: 18px;
        height: 18px;
        background-color: transparent;
        color: white;
        padding: 0;
    }

    /* Bottom Navigation Bar - Optimized for Mobile */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
        padding: 6px 0;
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        height: 60px;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #666;
        padding: 6px 10px;
        border-radius: 10px;
        transition: all 0.3s ease;
        flex: 1;
        max-width: 80px;
    }

    .bottom-nav-item svg {
        width: 22px;
        height: 22px;
        margin-bottom: 3px;
        fill: currentColor;
        transition: all 0.3s ease;
    }

    .bottom-nav-item span {
        font-size: 10px;
        font-weight: 500;
        transition: all 0.3s ease;
    }

    .bottom-nav-item:hover,
    .bottom-nav-item.active {
        color: #ed0018;
        background-color: rgba(237, 0, 24, 0.05);
    }

    .bottom-nav-item:hover svg,
    .bottom-nav-item.active svg {
        transform: scale(1.15);
    }

    .bottom-nav-item.active {
        font-weight: 600;
    }

    @media (max-width: 380px){
        .login-btn, .logout-btn{
            font-size: 8px;
            font-weight: 500;
        }

        .header-logo img{
            width: 90px;
            height: auto;
        }
    }

    /* Add padding to body to prevent content from being hidden behind bottom nav */
    body {
        padding-bottom: 70px;
    }
}