﻿/* #region Navbar */
.navbar {
    background-color: var(--header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 25px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 10000;
    height: 80px;
    box-sizing: border-box;
    box-shadow: var(--shadow-standard);
    border-bottom: 1px solid var(--border-main);
    backdrop-filter: blur(14px);
}

.navbar-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.navbar-brand img {
    height: 100px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.theme-switch-input {
    display: none;
}

.theme-switch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
}

.theme-switch-text {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

.theme-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 50px;
    height: 30px;
    background-color: rgba(var(--accent-main-rgb), 0.2);
    border-radius: 20px;
    cursor: pointer;
    transition-duration: .2s;
    flex-shrink: 0;
}

.theme-switch::after {
    content: "";
    position: absolute;
    height: 10px;
    width: 10px;
    left: 5px;
    background-color: transparent;
    border-radius: 50%;
    transition-duration: .2s;
    box-shadow: 5px 2px 7px rgba(8, 8, 8, 0.26);
    border: 5px solid var(--pure-white);
    box-sizing: content-box;
}

.theme-switch-input:checked + .theme-switch::after {
    transform: translateX(100%);
    transition-duration: .2s;
    background-color: var(--pure-white);
}

.theme-switch-input:checked + .theme-switch {
    background-color: var(--accent-main);
    transition-duration: .2s;
}

.sesion {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sesion a,
.dropdown-btn {
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border-radius: 20px;
    transition: 0.3s;
    background: transparent;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.sesion a:hover,
.dropdown-btn:hover {
    background-color: var(--hover-bg);
    color: var(--accent-main);
}

.link-activo {
    background-color: var(--hover-bg) !important;
    color: var(--accent-main) !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--header-text);
    font-size: 2rem;
    cursor: pointer;
}

.cart-container {
    position: relative;
    transition: transform 0.3s ease;
}

.cart-container > a {
    transition: all 0.3s ease;
}

.cart-container:hover {
    transform: translateY(var(--hover-lift-global));
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--badge-bg);
    color: var(--pure-white);
    font-size: 0.7rem;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface-main);
    font-weight: bold;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: var(--dropdown-bg);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.35);
    border: 1px solid var(--border-main);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1001;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    border-radius: 0;
    width: 100%;
    justify-content: flex-start;
    padding: 12px 18px;
    color: var(--text-main);
}

.dropdown-content a:hover {
    background: var(--hover-bg);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--hover-bg);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-main);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.user-pill:hover {
    background: var(--hover-bg);
    border-color: var(--accent-main);
}

.user-pill img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-main);
}

.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    text-align: left;
}

.user-name {
    color: var(--header-text);
    font-weight: 700;
    font-size: 0.85rem;
}

.user-role {
    color: var(--accent-main);
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 800;
}

.location-alert {
    color: var(--danger-main);
    font-weight: bold;
}

.dropdown-divider-line {
    height: 1px;
    background: var(--border-main);
    margin: 8px 15px;
}

.user-icon-fallback {
    color: var(--accent-main);
    font-size: 1.8rem;
}

.logout-link {
    color: var(--danger-main) !important;
}

.login-link-pill {
    border: 2px solid var(--accent-main);
    border-radius: 50px;
    color: var(--header-text) !important;
}

@media (max-width: 992px) {
    .menu-toggle {
        display: block;
    }

    .sesion {
        display: none;
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: var(--header-bg);
        padding: 20px 0;
        gap: 10px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.22);
        border-top: 1px solid var(--border-main);
    }

    .sesion.active {
        display: flex;
    }

    .sesion > a,
    .dropdown,
    .cart-container,
    .user-pill {
        width: 85% !important;
    }

    .sesion > a,
    .dropdown-btn,
    .cart-container > a,
    .user-pill,
    .login-link-pill {
        width: 100%;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 18px;
        background: var(--header-bg);
        border: 1px solid var(--border-main);
        color: var(--header-text);
    }

    .cart-container {
        position: relative;
    }

    .cart-container > a,
    .dropdown-btn {
        display: flex;
    }

    .sesion > a:hover,
    .dropdown-btn:hover,
    .cart-container > a:hover,
    .login-link-pill:hover {
        background: var(--hover-bg) !important;
        color: var(--accent-main) !important;
        border-color: var(--accent-main) !important;
        transform: translateY(var(--hover-lift-global));
    }

    .cart-container:hover {
        transform: translateY(var(--hover-lift-global));
    }

    .cart-container:hover > a {
        background: var(--hover-bg) !important;
        color: var(--accent-main) !important;
        border-color: var(--accent-main) !important;
    }

    .dropdown {
        border-radius: 18px;
        overflow: hidden;
        border: 1px solid var(--border-main);
        background: var(--header-bg);
    }

    .dropdown-btn {
        border: none;
        border-radius: 0;
    }

    .user-pill {
        background: transparent;
        padding: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        backdrop-filter: none;
    }

    .theme-switch-item {
        width: 85%;
        justify-content: space-between;
        padding: 14px 16px;
        border-radius: 18px;
        background: var(--header-bg);
        border: none;
    }

    .theme-switch-text {
        color: var(--header-text);
        flex: 1;
        min-width: 0;
        font-size: 0.9rem;
        white-space: normal;
    }

    .theme-switch {
        width: 54px !important;
        height: 32px;
        margin-left: 12px;
    }

    .theme-switch::after {
        height: 12px;
        width: 12px;
    }

    .dropdown-content {
        position: static;
        width: 100% !important;
        background: var(--header-bg);
        border: none;
        box-shadow: none;
        border-top: 1px solid var(--border-main);
    }

    .dropdown-content a {
        color: var(--header-text);
        background: var(--header-bg);
    }

    .dropdown-content a:hover {
        background: var(--hover-bg);
    }

    .cart-badge {
        top: 10px;
        right: 12px;
    }
}

@media (max-width: 480px) {
    .sesion {
        padding: 14px 0 18px;
    }

    .sesion > a,
    .dropdown,
    .cart-container,
    .theme-switch-item {
        width: 92%;
    }

    .sesion > a,
    .dropdown-btn,
    .cart-container > a,
    .user-pill,
    .login-link-pill,
    .theme-switch-item {
        gap: 10px;
        align-items: center;
        padding: 12px 14px;
    }

    .theme-switch-text {
        font-size: 0.85rem;
        line-height: 1.25;
    }

    .theme-switch {
        width: 50px !important;
        height: 30px;
        margin-left: 8px;
    }
}
/* #endregion */

