/* HEADER */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 80px;
    background: var(--bg-light, #ffffff);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    z-index: 999;
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-links {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 32px;
    list-style: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    list-style: none;
}

.profile-wrapper {
    margin-left: 50px;
}

.wishlist-link {
    margin-left: 25px;
} 

html, body {
    overflow-x: hidden;
}

#header .logo {
    width: 130px;
    height: auto;
}


.desktop-nav #navbar-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.desktop-nav #navbar-links li a,
.desktop-nav #navbar-links li button {
    text-decoration: none;
    color: #222;
    font-weight: 600;
    background: none;
    border: none;
    cursor: pointer;
}

.desktop-nav #navbar-links li a:hover,
.desktop-nav #navbar-links li a.active {
    color: #088178;
}



.desktop-nav #navbar-links li {
    position: relative;
}

.desktop-nav #navbar-links li a,
.desktop-nav #navbar-links li button {
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark, #222);
    transition: color 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.desktop-nav #navbar-links li a:hover,
.desktop-nav #navbar-links li a.active {
    color: var(--primary-color, #088178);
}

/* Active underline for current page */
#navbar-links li a.active::after {
    width: 100%;
    height: 2px;
    background-color: var(--primary-color, #088178);
}


/* Hide Hamburger Button on Desktop */
#mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

#mobile-menu-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-dark, #222);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

#mobile-menu-btn:hover .hamburger-line {
    background: var(--primary-color, #088178);
}

/* ==================== MOBILE MENU OVERLAY ==================== */
#mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

#mobile-menu-overlay.active {
    display: block;
    transform: translateX(0);
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 10;
}

.mobile-logo {
    width: 120px;
    height: auto;
}

/* Animate mobile menu slide-in smoothly */
#navbar-links {
    will-change: transform;
    transform: translateX(0);
    transition: right 0.3s ease, transform 0.3s ease;
}

#mobile-close-btn:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: rotate(90deg);
}

#mobile-close-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-dark, #222);
}

/* Mobile Navigation */
.mobile-nav {
    padding: 24px;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--text-dark, #222);
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: #ffffff;
    border: 1px solid transparent;
}

.mobile-link:hover {
    background: linear-gradient(135deg, #088178 0%, #066663 100%);
    color: #ffffff;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(8, 129, 120, 0.2);
}

.mobile-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.mobile-badge {
    background: var(--primary-color, #088178);
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
}

.mobile-divider {
    height: 1px;
    background: #e9ecef;
    margin: 16px 0;
}

/* ==================== RESPONSIVE (TABLET & MOBILE) ==================== */
@media (max-width: 1024px) {
    #header {
        padding: 16px 24px;
    }
    
    .desktop-nav {
        display: none;
    }

    #mobile-menu-btn {
        display: flex;
    }

    #mobile-menu-overlay {
        max-width: 350px;
    }
}

@media (max-width: 477px) {
    #header {
        padding: 12px 20px;
    }

    #header .logo {
        width: 110px;
    }

    #mobile-menu-overlay {
        max-width: 100%;
    }

    .mobile-menu-header {
        padding: 16px 20px;
    }

    .mobile-logo {
        width: 100px;
    }

    .mobile-nav {
        padding: 20px;
    }

    .mobile-link {
        padding: 14px 16px;
        font-size: 15px;
    }
}

/* CART */
.cart-link a {
    display: flex;
    align-items: center;
    gap: 6px;
}

#cart-badge,
#wishlist-badge {
    background: var(--primary-color);
    color: white;
    font-size: 12px;
    border-radius: 50%;
    padding: 2px 6px;
}

/* PROFILE DROPDOWN */
.profile-wrapper {
    position: relative;
}

#profile-dropdown {
    position: absolute;
    top: 45px;
    right: 0;
    min-width: 230px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 1000;
    background: var(--dropdown-bg, white);
}

/* desktop hover */
.profile-wrapper:hover #profile-dropdown[data-loggedin="true"] {
    display: flex;
}

/* js active dropdown */
#profile-dropdown.active {
    display: flex;
}

#profile-dropdown a,
#profile-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 14px;
    width: 100%;
    min-height: 44px;
    
}

#profile-dropdown a:hover,
#profile-dropdown button:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

/* FOOTER */
footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background: #fafafa;
    width: 100%;
    padding: 40px 80px;
    box-sizing: border-box;
}

footer .col {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
}

footer .logo {
    margin-bottom: 30px;
}

footer h4 {
    font-size: 14px;
    padding-bottom: 20px;
}

footer p {
    font-size: 13px;
    margin: 0 0 8px 0;
}

footer a {
    font-size: 13px;
    text-decoration: none;
    color: var(--text-light);
    margin-bottom: 10px;
    transition: var(--transition-fast);
}

footer .follow {
    margin-top: 20px;
}

footer .follow .icon {
    display: flex;
    gap: 12px;
}

footer .follow a {
    color: var(--text-light);
    transition: var(--transition-fast);
}

footer .follow a:hover {
    color: var(--primary-color);
}

footer .install .row {
    display: flex;
    gap: 10px;
    margin: 10px 0 15px 0;
}

footer .install .row img {
    border: 1px solid var(--primary-color);
    border-radius: 6px;
    width: 130px;
    height: auto;
}

footer .install > img {
    margin: 10px 0 15px 0;
    max-width: 100%;
    height: auto;
}

footer a:hover {
    color: var(--primary-color);
}

footer .copyright {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #e1e1e1;
    padding-top: 20px;
}

/* RESPONSIVE */
@media(max-width:1024px) {
    #header {
        padding: 16px 40px;
    }
    footer {
        padding: 40px 40px;
    }

    .profile-wrapper:hover #profile-dropdown {
        display: none;
    }
}

@media(max-width:477px) {
    #header {
        padding: 12px 20px;
    }

    .logo {
        width: 110px;
    }

    footer {
        text-align: center;
        padding: 40px 20px;
    }

    footer .col {
        align-items: center;
        width: 100%;
    }

    footer .install .row {
        justify-content: center; 
    }
}

.nav-profile-image{
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #088178;
}
body.dark-theme #profile-dropdown {
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #333;
}

body.dark-theme #profile-dropdown a {
    color: #ffffff;
}

body.dark-theme #profile-dropdown a:hover {
    background-color: #2a2a2a;
}

body.dark-theme #profile-dropdown button {
    background-color: transparent;
    color: #ffffff;
    border: none;
}
body.dark-theme .pro,
body.dark-theme .product-card,
body.dark-theme .card {
  background-color: #1e1e1e;
  border: 1px solid #2a2a2a;
  color: #e0e0e0;
}

body.dark-theme .pro h4,
body.dark-theme .pro span {
  color: #e0e0e0;
}

/* Header */
body.dark-theme #header {
  background: #1a1a1a;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

/* Desktop nav links */
body.dark-theme .desktop-nav #navbar-links li a,
body.dark-theme .desktop-nav #navbar-links li button {
  color: #e0e0e0;
}

/* Hamburger lines */
body.dark-theme .hamburger-line {
  background: #e0e0e0;
}

/* Mobile menu overlay */
body.dark-theme #mobile-menu-overlay {
  background: linear-gradient(135deg, #1a1a1a 0%, #121212 100%);
}

body.dark-theme .mobile-menu-header {
  background: #1e1e1e;
  border-bottom: 1px solid #333;
}

body.dark-theme .mobile-link {
  background: #1e1e1e;
  color: #e0e0e0;
  border-color: #333;
}

body.dark-theme #mobile-close-btn {
  background: #2a2a2a;
  border-color: #444;
}

/* Footer */
body.dark-theme footer {
  background: #1a1a1a;
}

body.dark-theme footer .copyright {
  border-top: 1px solid #333;
}

/* Feature boxes */
body.dark-theme #feature .fe-box {
  background-color: #1e1e1e;
  border-color: #333;
}

body.dark-theme #feature .fe-box h6 {
  color: #ffffff;
}

/* Newsletter */
body.dark-theme #newsletter {
  background-color: #0d0d0d;
}

body.dark-theme #newsletter input {
  background-color: #2a2a2a;
  color: #ffffff;
}

/* Explore More button dark fix */
body.dark-theme #banner button.normal {
    background-color: #1e1e1e ;
    color: #ffffff ;
    border: 1px solid #444 ;
}

body.dark-theme #header .logo-text,
body.dark-theme #header a {
    color: #39a4d6 ;
}

body.dark-theme #header .logo {
    filter: brightness(0) invert(1) sepia(1) saturate(3) hue-rotate(175deg);
}

body.dark-theme .desktop-nav #navbar-links li a.active {
    border-bottom: none ;
    text-decoration: none ;
}

body.dark-theme .desktop-nav #navbar-links li a::after,
body.dark-theme .desktop-nav #navbar-links li a::before {
    display: none ;
}
#theme-toggle {
    background: none ;
    border: none ;
    cursor: pointer ;
    font-size: 20px ;
    padding: 5px ;
    box-shadow: none ;
}

body.dark-theme footer .logo {
    filter: invert(1) ;
}

body.dark-theme {
    --dropdown-bg: #0c0c0c;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.6);
}

body.dark-theme #profile-dropdown a,
body.dark-theme #profile-dropdown button{
    color: #ffffff !important;
    background-color: transparent !important;
}

/* Active nav link */
#navbar-links a.active {
    font-weight: 600;
    color: #088178;
    border-bottom: 2px solid #088178;
    padding-bottom: 2px;
}
