/* CSS for base html */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Hanken Grotesk Light", Verdana, Roboto;
    overflow-x: hidden;
    background-color: #f7f6fb !important;
    width: 100%;
}

main {
    position: relative;
    width: 100%;
}

#nav_bar {
    display: grid;
    width: 100%;
    position: sticky;
    grid-template-columns: 30% 40% 30%;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    background-color: #fff;
    border-bottom: 1px solid #bbbbbb;
    box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.3);
    padding: 15px 0px;
    top: 0;
    left: 0;
    z-index: 500;
}

.luxalogo {
    width: 90px;
}

#search_bar {
    position: relative;
    width: 600px;
    margin: 20px auto;
}

#search {
    display: flex;
    width: 100%;
    height: 50px;
    padding: 10px 5px 10px 10px;
    border: 1px solid #960ffa;
    border-radius: 25px;
    transition: all 0.3s ease-in-out;
    background-color: aliceblue;
}

#search:focus {
    box-shadow: 0 0 4px #960ffa;
    background-color: aliceblue;
    outline: none;
}

.search_btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background-color:#960ffa;
    border-radius: 25px;
    padding: 7.5px 15px;
    cursor: pointer;
    border: none;
    color: white; 
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 10px 10px;
    z-index: 1000;
}

.suggestions div {
    padding: 10px;
    cursor: pointer;
}

.suggestions div:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

#nav_logo {
    position: relative;
    display: flex;
    padding: 5px 10px 5px 10px;
    left: 20%;
}

#user_btns {
    position: relative;
    display: flex;
    flex-direction: row;
    justify-self: center;
    align-self: center;
    top: 10%;
}

#user_btns li {
    list-style-type: none;
}

.navicons {
    position: relative;
    margin-right: 20px;
}

.navicons a {
    display: flex;
    text-decoration: none;
    color: #000000;
    justify-content: baseline;
}

.navicons span {
    display: none;
    position: fixed;
    top: 50px;
    right: 60px;
    padding: 3.5px 8px;
    border-radius: 50%;
    background-color: #960ffa;
    font-weight: 550;
    font-size: 12px;
}

.nav_icon {
    position: relative;
    width: 20px;
    height: 20px;
    transition: color 0.8s ease;
    margin-right: 5px;
}

.nav_icon:hover {
    color: #007bff;
}

.userdropdown {
    list-style: none;
    position: absolute;
    top: 120%;
    width: 170px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px); 
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.userdropdown::before {
    content: "";
    position: absolute;
    top: -8px; /* just above the box */
    left: 20px; /* adjust horizontally as needed */
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid white; /* color matches dropdown background */
    filter: drop-shadow(0 -1px 1px rgba(0,0,0,0.1)); /* subtle shadow for realism */
}

.navicons:hover .userdropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdownli {
    padding: 0 0 3px 3px;
    margin-bottom: 6px;
    color: #000;
}

.dropdownli a {
    text-decoration: none;
    color: black;
}

.dropdownli:hover a {
    color: rgb(119, 32, 212);
}

#main_body {
    z-index: 5;
}

#bottomnav {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background-color: #0c0013;
    padding: 50px 0 80px 15px;
    margin-top: 40px;
    color: white;
}

.navli {
    list-style-type: none;
    padding-left: 0;
    margin-top: 20px;
}

.navli li {
    margin-bottom: 20px;
}

.navli a {
    text-decoration: none;
    color: #ffffff;
}

.navli a:hover {
    color: #960ffa;
}

#btmlogo {
    position: relative;
    top: -30px;
}

#about p {
    width: 55%;
}

#social_links {
    margin-top: 20px;
}

.socialicons {
    width: 40px;
}

/* General Styling for extended pages */
.cont {
    display: flex;
    margin-top: 30px;
    width: 85%;
    flex-direction: column;
    justify-self: center;
}

.cont h1 {
    border-bottom: 1px solid #ccc;
    padding-bottom: 15px;
}

.bod p{
    font-size: 28px;
}

a {
    text-decoration: none !important;
}

#mobile-menu-btn, 
.mobile-cart-icon, 
#mobile-sidebar, 
#mobile-overlay {
    display: none;
}

#mobile-menu-btn, 
.mobile-cart-icon, 
#mobile-sidebar, 
#mobile-overlay {
    display: none;
}

@media only screen and (max-width: 900px) {

    /* --- NAVBAR TRANSFORMATION --- */
    #nav_bar {
        display: grid; /* Changed from Flex to Grid for perfect centering */
        grid-template-columns: 50px 1fr 50px; /* Left button, Auto Center, Right Icon */
        align-items: center;
        padding: 5px 15px;
        height: 80px;
    }

    #nav_logo {
        left: 0; /* Reset desktop positioning */
        padding: 0;
        display: flex;
        justify-content: center; /* Center the logo image */
        width: 100%;
    }

    .luxalogo {
        width: 60px; 
    }

    /* Hide desktop elements */
    .desktop-only {
        display: none !important;
    }

    /* Show Mobile Elements */
    #mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: center; /* Center lines vertically */
        gap: 5px; /* Space between lines */
        width: 30px;
        height: 30px; /* Increased hit area */
        cursor: pointer;
        z-index: 501; /* Ensure it's clickable */
    }

    #mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 3px;
    }

    .mobile-cart-icon {
        display: flex;
        justify-content: flex-end; /* Push to right */
        align-items: center;
        position: relative;
    }

    .mobile-cart-count {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #960ffa;
        color: white;
        font-size: 10px;
        padding: 2px 6px;
        border-radius: 50%;
    }

    /* --- SIDEBAR SLIDER --- */
    #mobile-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: -280px; 
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transition: left 0.3s ease-in-out;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        padding: 20px;
        overflow-y: auto;
    }

    #mobile-sidebar.active {
        left: 0; 
    }

    #mobile-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
    }

    #mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Sidebar Content Styles */
    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
    }

    .close-btn {
        font-size: 30px;
        cursor: pointer;
        padding: 5px; /* Easier to click */
    }

    .sidebar-search form {
        display: flex;
        margin-bottom: 30px;
    }

    .sidebar-search input {
        width: 100%;
        padding: 10px;
        border: 1px solid #ddd;
        border-radius: 5px 0 0 5px;
        outline: none;
    }

    .sidebar-search button {
        background: #960ffa;
        border: none;
        color: white;
        padding: 0 15px;
        border-radius: 0 5px 5px 0;
    }

    .sidebar-links {
        list-style: none;
        padding: 0;
    }

    .sidebar-links li {
        margin-bottom: 20px;
    }

    .sidebar-links a {
        color: #333;
        font-size: 18px;
        font-weight: 500;
        text-decoration: none;
    }

    /* --- FOOTER STACKING --- */
    #bottomnav {
        grid-template-columns: 1fr;
        padding: 40px 20px;
        text-align: center;
        gap: 40px;
    }
    
    #about p {
        width: 100%;
        margin: 0 auto;
    }
    
    #social_links {
        justify-content: center;
        display: flex;
        gap: 20px;
    }
}
