html, body, * {
    font-family: "Poppins", sans-serif !important;
}

/* Push content below fixed navbar */
body {
    padding-top: 130px; /* 70 (main nav) + 60 (category nav approx) */
}

/**********************************************************************
                        HEADER NAV BAR
************************************************************************/


/* FONTS */
.navbar .navbar-brand {
    font-family: "Monomaniac One", sans-serif !important;
    font-weight: 600;
    font-size: 28px;
    font-style: normal;
}

h1 {
    font-family: "Poppins", sans-serif;
    font-size: 40px;
    font-weight: 700;
    font-style: normal;
    text-align: left;
}

h2 {
    font-family: "Poppins", sans-serif;
    font-size: 30px;
    font-weight: 700;
    font-style: normal;
}

h3 {
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-style: normal;
    font-size: 14px;
    color: #9B9B9B;
    text-align: center;
}

/* NAV BAR */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.5rem 0rem; /* More compact padding */
    max-height: 60px;
}

.navbar-nav .btn {
    margin-left: 10px;
    border-radius: 20px;
    border: none;
    background-color: #282828;
    padding: 12px 28px !important;

    display: flex;
    align-items: center;

    flex-wrap: nowrap;
    white-space: nowrap;
}

.input-group .form-control {
    border-radius: 30px 0 0 30px;
}

.form-control, .bi-search, .btn {
    font-size: 14px;
}

.input-group .input-group-text {
    border-radius: 0 30px 30px 0;
    padding: 0.375rem 0.75rem;
    cursor: pointer;
}

.navbar .bi-cart3 {
    font-size: 14px;
    color: #000;
}


/* Add to Cart */
.add-to-cart-btn {
    font-size: 12.5px;
    background-color: transparent;
    outline-color: black;
    border-radius: 16px;
    border: thin solid black;
    padding: 10px;
    width: 100%;
}

    .add-to-cart-btn:hover {
        box-shadow: 0 2px 8px #bebebe;
    }

    .add-to-cart-btn:disabled {
        background-color: transparent !important;
        color: #999;
        border: 1px solid #ccc;
        cursor: not-allowed;
    }

    .add-to-cart-btn.active {
        background-color: black;
        color: white;
        font-weight: 500;
        border: thin solid #010301;
    }

.add-to-cart-btn.added i {
    color: green;
    font-size: medium;
    font-weight: bolder;
}

/* FAVORITE/HEART BUTTON */
.favorite-btn.favorited i {
    color: red;
}

.favorite-btn:hover {
    background-color: #efc7c7;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.navbar .badge {
    font-size: 0.7rem;
    margin-top: 10px;
    padding: 0.5em 0.5em;
}

.navbar .navbar-brand {
    align-content: center;
    justify-content: center;
    text-align: left;
    padding: 0;
    margin-top: 0;
}

.navbar-nav .nav-item .nav-link {
    padding: 0 12px;
    display: flex;
    align-items: center; 
    font-size: 14px;
}

.navbar-nav .nav-link {
    transition: all 0.3s ease;
    border-radius: 8px;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0.5rem 20px;
    white-space: nowrap; /* Prevent multi-line */
    /*overflow: hidden;*/
    text-overflow: ellipsis;
}

    .navbar-nav .nav-link:hover {
        color: black;
        transform: scale(1.05);
    }

.navbar .navbar-nav .nav-item,
.navbar .navbar-nav .nav-link {
    line-height: 1.5; 
    margin: 0; 
}

.navbar form.d-flex {
    display: flex;
    align-items: center;
}

.navbar-nav .btn,
.navbar-nav .nav-link,
.navbar form .input-group {
    display: flex;
    align-items: center;
}

/* Login Button */
.navbar-nav .btn {
    transition: background-color 0.3s ease;
    background-color: #282828;
    color: white;
}

    .navbar-nav .btn:hover {
        background-color: #141414;
        color: white;
    }

/* User Profile Dropdown*/
.navbar .profile-image {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    object-position: 100% 15%; /*Maybe y axis should be reverted to 0 for real photos*/
}

.navbar .profile-image-lg {
    width: 48px;
    height: 48px;
    object-fit: cover;
    object-position: 100% 15%; /*Maybe y axis should be reverted to 0 for real photos*/
    border-radius: 50%;
    flex-shrink: 0;
}

/* Ensure all navbars respect these sizes consistently */
.navbar li img[class*="profile-image"],
.navbar a img[class*="profile-image"] {
    max-width: 32px;
    max-height: 32px;
}

.navbar li .dropdown-menu img.profile-image-lg,
.navbar a .dropdown-menu img.profile-image-lg {
    max-width: 48px;
    max-height: 48px;
}

/* DROPDOWN MENU USER PROFILE & (ADMIN)*/
.dropdown-menu .dropdown-item:active,
.dropdown-menu .dropdown-item.custom-click-bg:active {
    background-color: black !important;
    color: white !important;
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        right: 100%;
        margin-right: 0.1rem;
        display: none;
        position: absolute;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

        .dropdown-submenu > .dropdown-menu.show {
            display: block;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }



/*********************************************************************
                    CATEGORY NAVBAR
**********************************************************************/

.category-navbar {
    position: fixed;
    top: 59px;
    left: 0;
    right: 0;
    background-color: #000;
    padding: 10px 0;
    z-index: 998;
    transition: top 0.3s ease, position 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 40px;
}

.category-nav-link {
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

    .category-nav-link:hover {
        color: #FFD700 !important;
        transform: scale(1.05);
    }

.category-toggle-btn {
    background-color: transparent;
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

    .category-toggle-btn i {
        transition: transform 0.3s ease;
    }

    .category-toggle-btn.active i {
        transform: rotate(180deg);
    }

#toast .toast-body a {
    color: black;
    text-decoration: underline;
}

    #toast .toast-body a:hover {
        color: yellow;
    }

/** Clickable Mi Cuenta Link in User Profiule */
.Logout-Container h1 a {
    font-size: 1.8rem;
    color: inherit;
    text-decoration: none; 
    transition: color 0.3s ease;
}

    .Logout-Container h1 a:hover {
        color: #d45e49 !important; 
        text-decoration: none;
    }

    .Logout-Container h1 a:visited {
        color: inherit;
    }

/**********************************************************************
                        RESPONSIVENSS 
***********************************************************************/

/* Medium screens (laptops) */
@media (min-width: 992px) and (max-width: 1199px) {
    .navbar-nav .nav-link {
        padding: 0.5rem 20px; /* Reduced horizontal padding */
        font-size: 0.9rem; /* Slightly smaller font */
    }


    .navbar .navbar-brand {
        font-size: 24px; /* Smaller brand name */
    }

    .input-group {
        width: 180px; /* Fixed width for search */
    }

    /* Compact the search bar a bit */
    .navbar form.d-flex {
        margin-right: 10px;
    }
}


/*************************** TABLET *************************************/

@media (min-width: 768px) and (max-width: 991px) {
    .navbar {
        padding: 10px 15px;
        display: flex;
        justify-content: space-between;
        z-index: 1002;
    }

    .navbar-toggler {
        display: block !important;
        order: 3; /* Push to the right */
        margin-left: auto; /* Push to the right */
    }

    /* Hide navbar links by default */
    .navbar-collapse {
        position: absolute;
        top: 60px;
        left: 50%;
        transform: translateX(-50%); /* Center horizontally */
        width: 92%;
        background-color: white;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

        /* Show navbar when toggled */
        .navbar-collapse.show {
            display: block !important;
            opacity: 1;
            visibility: visible;
            transition: all 0.3s ease-in;
            z-index: 1001 !important;
        }

    .navbar-nav .nav-item .nav-link {
        padding: 6px 10px;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .form-control {
        margin: 6px 0;
    }

    /* Force navbar-nav to be a column in the collapsed menu */
    .navbar-collapse .navbar-nav {
        display: flex;
        flex-direction: column !important;
        width: 100%;
    }

    .navbar-nav.align-items-center {
        flex-direction: row !important;
        justify-content: center;
        gap: 10px;
        padding-top: 10px;
    }

        .navbar-nav.align-items-center .btn {
            font-size: 15px;
            width: 100%;
        }

    /* CATEGORY NAVBAR */
    .category-navbar {
        top: 60px; /* just below the main nav */
        padding: 30px 0;
        flex-direction: column;
        z-index: 1000;
    }

    .category-toggle-btn {
        display: block; /*from flex*/
        justify-content: space-between;
        align-items: center;
        width: 100%;
        font-size: 16px;
        font-weight: 500;
        color: white;
        background-color: white;
        border: none;
        cursor: pointer;
        z-index: 1200;
    }

    .category-nav-container {
        padding: 0 30px;
        flex-direction: column;
        gap: 10px;
        display: none; /* hidden by default for toggle */
    }

        .category-nav-container.show {
            display: flex !important; /* show when toggled */
        }

    #categoryCollapse {
        flex-direction: column;
        gap: 10px;
        padding: 10px 0;
    }

        #categoryCollapse .category-nav-link {
            text-align: left;
            padding: 6px 0;
        }

}

/*************************** PHONE *************************************/

@media (max-width: 576px) {
    .category-navbar {
        top: 58px;
    }

    navbar navbar-expand-sm {
        padding: 20px 15px;
    }

    .navbar-collapse {
        background-color: white;
        margin-top: 10px;
        padding: 15px 15px;
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

        .navbar-nav .nav-item .nav-link {
            padding: 6px 10px;
            display: flex;
            align-items: center;
            font-size: 16px;
        }

    .form-control {
        margin: 6px 0;
    }

    .navbar-nav.align-items-center {
        flex-direction: row !important;
        justify-content: flex-end;
        gap: 10px;
        padding-top: 10px;
    }

        .navbar-nav.align-items-center .nav-item {
            margin-bottom: 0; /* Avoid vertical gaps */
        }

        .navbar-nav.align-items-center .btn {
            font-size: 15px;
        }

.navbar-toggler i {
    transition: transform 0.3s ease;
}

.navbar-toggler.collapsed i {
    transform: rotate(180deg);
}

    /* NAV BAR */
    .navbar {
        z-index: 1002;
    }

    .navbar-collapse.show {
        display: block !important;
        opacity: 1;
        visibility: visible;
        transition: all 0.3s ease-in;
        z-index: 1001 !important;
    }

    .category-links {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 40px;
    }

    /* CATEGORY NAV BAR */
    .category-toggle-btn {
        background-color: transparent;
        border: none;
        color: white;
        font-size: 16px;
        font-weight: 500;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 5px;
        cursor: pointer;
    }

    .category-navbar {
        padding: 10px 0;
        flex-direction: column;
    }

    .category-toggle-btn {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        width: 100%;
        font-size: 16px;
        font-weight: 500;
        color: white;
        background: none;
        border: none;
    }

    .category-nav-container {
        padding: 0 30px;
        gap: 10px;
    }

    /* Collapse container style */
    #categoryCollapse {
        padding: 10px 0;
        flex-direction: column;
        gap: 10px;
    }

        #categoryCollapse .category-nav-link {
            text-align: right;
            padding: 6px 0;
        }
}
