/* NAVBAR */
.profile {
    display: flex;
    align-items: center;
    height: 70px;
    background: #534229;
    padding: 20px;
    color: white;
    width: 100%;
    margin-left: -20px;
}

.profile-picture {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 15px;
    border: 1px solid white;
}

.profile-name {
    font-size: 18px;
    margin: 0;
}

.profile-username {
    font-size: 15px;
    color: #ddd;
    margin: 0;
}

.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #faf8f5d4;
    padding: .5rem 1.5rem;
    border-bottom: 1px solid #534229;
    height: 70px;
}

.navbar-custom .container-fluid {
    position: relative;
}

.navbar-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    width: 130px;
    height: auto;
    margin-bottom: 5px;
    margin-left: 0;
}

:root {
    --body-bg-color: #534229;
    --hr-color: #534229;
    --transition-duration: 0.3s;
    --transition-delay: 0.2s;
}

.btn-diagonal:hover .bi {
    color: rgb(0, 0, 0);
    transform: scale(1.2);
    cursor: pointer;
    background-color: #534229;
    padding: 10px;
}

.bi {
    font-size: 30px;
    color: #534229;
    transition: all var(--transition-duration) ease-in-out;
    padding: 8px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 20px;
    background-color: #f0ebe4;
}

.bi:hover {
    color: rgb(255, 255, 255);
    cursor: pointer;
    background-color: #534229;
    padding: 8px;
    padding-left: 12px;
    padding-right: 12px;
    border-radius: 20px;
}

/* MENU LATERAL */
.sidebar {
    position: fixed;
    top: 0;
    left: -500%;
    width: 320px;
    height: 100%;
    padding: 2rem 1.5rem;
    z-index: 9999;
    background-color: #534229;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 5px 0 20px #b39c7f;
    transition: left 0.4s ease;
}

.sidebar.active {
    left: 0;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: rgb(255, 255, 255);
    text-decoration: none;
    margin: 1.5rem 0;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
    position: relative;
    overflow: hidden;
}

.sidebar a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background-color: #ffffff;
    opacity: 0;
    transition: opacity .3s;
}

.sidebar a:hover::before {
    opacity: 1;
}

.sidebar a:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: translateX(6px);
    box-shadow: 2px 4px 12px rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.sidebar i {
    font-size: 1.2rem;
    margin-right: 12px;
    width: 20px;
    text-align: center;
}

.sidebar .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.4rem;
    border: none;
    background: fixed;
    transition: transform 0.2s;
}

.sidebar .close-btn:hover {
    transform: rotate(90deg);
}

.separador {
    width: 100%;
    height: 3px;
    background-color: rgb(0, 0, 0);
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 10px;
}

/* AVISO */
.aviso {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.aviso-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.623);
    z-index: 1024;
}

.aviso-content {
    background: rgb(255, 255, 255);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    color: black;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.btn-cancel,
.btn-login {
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-login {
    margin-right: 10px;
    background: #534229;
    color: white;
    font-weight: bold;
}

.btn-cancel {
    background: white;
    color: #534229;
    font-weight: bold;
    border: 1px solid #534229;
}

.btn-cancel:hover {
    background: #54575a;
}

.btn-login:hover {
    background: #d0ab8e;
}

/* MENSAJES */
.message-base {
    position: fixed;
    padding: 15px 20px;
    border-radius: 15px;
    color: rgb(0, 0, 0);
    font-weight: bold;
    z-index: 10000;
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    background-color: white;
}

.message-show {
    opacity: 1;
    transform: scale(1);
    color: white;
}

.message-else {
    top: 80px;
    left: 50%;
    transform: translate(-50%) scale(0.9);
}

.message-delete {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: rgb(255, 255, 255);
    color: black;
}

.message-content {
    color: black;
    text-align: center;
}

.accept-btn,
.cancel-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
    margin-bottom: 5px;
    text-align: center;
}

.accept-btn {
    margin-right: 10px;
    background: #ffffff;
    color: #534229;
    border: 1px solid #534229;
    font-weight: bold;
}

.cancel-btn {
    margin-right: 10px;
    background: #534229;
    color: white;
    font-weight: bold;
}

.accept-btn:hover {
    background: #f8f4eb;
    color: #7c684a;
}

.cancel-btn:hover {
    background: #7c522e;
}

/* CARRITO */
.cart-container-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
    color: rgb(0, 0, 0);
    box-shadow: 10px;
    z-index: 2000;
}

.cart-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.cart-login {
    padding: 8px 16px;
    color: white;
    border: solid 2px black;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-right: 10px;
    background: #9c714e;
}

.cart-login:hover {
    background: #d0ab8e;
}

/* Afecta a todos los tamaños de fuente en html */
html {
    font-size: clamp(12px, min(2.5vw, 2.5vh), 16px);
}

/* ESTILO PARA LAS NOTIFICACIONES */
.notification-counter {
    display: block;
    position: absolute;
    top: 5px;
    right: 10px;
    background: rgb(198, 138, 98);
    color: #333;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.notification-container {
    display: none;
    position: absolute;
    right: 15px;
    top: 50px;
    width: 620px;
    background: #fff;
    border-radius: 12px;
    z-index: 9999;
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-item {
    border-radius: 15px 15px 0px 0px;
    padding: 10px;
    margin-bottom: 5px;
    border-bottom: 1px solid rgba(208, 208, 208, 0.91);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: 0.3s;
}

.notification-item:hover {
    background-color: #eaedef;
    transition: 0.3s;
}

.notification-title {
    margin-bottom: 3px;
}

.notification-content {
    display: flex;
}


/* Responsividad pantallas medianas */
@media (max-width: 992px) {

    .sidebar a {
        margin: 0.5rem 0;
        font-size: 0.98rem;
        padding: 0.4rem 0.8rem;
    }

    .btn {
        margin-right: -15px;
    }

     .notification-container {
        width: 500px;
        right: 10px;
        max-height: 380px;
    }

}

@media (max-width: 768px) {
    .notification-container {
        width: 420px;
        right: 10px;
        top: 55px;
        max-height: 350px;
    }
    
    .notification-counter {
        top: 2px;
        right: 5px;
        padding: 2px 7px;
        font-size: 10px;
    }
    
    .notification-item {
        padding: 8px 12px;
    }
}

/* Responsividad pantallas pequeñas */
@media (max-height: 600px) {
    .sidebar {
        width: 90%;
    }

    .sidebar a {
        margin: 0.5rem 0;
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }

    .profile-picture {
        width: 45px;
        height: 45px;
    }

    .profile {
        height: 50px;
    }

    .separador {
        margin-top: 10px;
        margin-bottom: 10px;
    }
}

/* Responsividad pantallas mas pequeñas */
@media (max-width: 576px) {
    .logo {
        width: 100px;
        height: auto;
    }

    .bi {
        font-size: 22px;
        padding: 6px 10px;
    }

    .navbar-custom {
        padding: .5rem 0.8rem;
    }

    .btn {
        margin-right: -20px;
    }

    .btn-outline-dark {
        font-size: 11px;
        padding: 4px 8px;
    }

    .sidebar {
        width: 90%;
    }

    .sidebar a {
        margin: 0.5rem 0;
        font-size: 1.5rem;
        padding: 0.4rem 0.8rem;
    }

    .notification-container {
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        right: auto;
        top: 65px;
        max-height: 40vh;
    }
    
    .notification-counter {
        top: 0px;
        right: 0px;
        padding: 2px 6px;
        font-size: 9px;
    }
    
    .notification-item {
        padding: 10px;
    }

}

/* Responsividad pantallas muy pequeñas */
@media (max-width: 393px) {

    .logo {
        width: 85px;
    }

    .bi {
        font-size: 20px;
        padding: 5px 8px;
    }

    .btn {
        margin-right: -20px;
    }

    .btn-outline-dark {
        font-size: 10px;
        padding: 3px 6px;
    }

    .sidebar {
        width: 97%;
    }

    .sidebar a {
        margin: 0.5rem 0;
        font-size: 1.2rem;
        padding: 0.4rem 0.8rem;
    }

     .notification-container {
        width: 90%;
        top: 60px;
        max-height: 50vh;
    }
    
    .notification-item {
        padding: 8px;
    }

}

/* Responsividad, solo hace q desaparezca el logo en pantallas muy muy chiquitas*/
@media (max-width: 325px) {

    .logo {
        display: none !important;
    }

}

/*================================ESTILOS PARA EL MODO OSCURO=================================================*/
body.dark-mode {
    background-color: #0a0a0a;
}

body.dark-mode .notif {
    color: white;
}

/* NAVBAR */
body.dark-mode .navbar-custom {
    background-color: #1a1a1ad4;
    border-bottom: 1px solid #6b4e33;
}

body.dark-mode .profile {
    background: #1e1a16;
}

body.dark-mode .profile-name {
    color: #fff;
}

body.dark-mode .profile-username {
    color: #aaa;
}

body.dark-mode .login{
    color: #d4b48c;
    background-color: #2a2a2a;
}

body.dark-mode .login:hover{
    color: #fff;
    background-color: #6b4e33;
}

/* Iconos */
body.dark-mode .bi {
    color: #d4b48c;
    background-color: #2a2a2a;
}

body.dark-mode .bi:hover {
    color: #fff;
    background-color: #6b4e33;
}

body.dark-mode .btn-diagonal:hover .bi {
    color: #fff;
}

/* MENU LATERAL */
body.dark-mode .sidebar {
    background-color: #1e1a16;
    box-shadow: 5px 0 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .sidebar a {
    color: #e0e0e0;
}

body.dark-mode .sidebar a:hover {
    background-color: rgba(107, 78, 51, 0.4);
    color: #ffd7a5;
}

body.dark-mode .sidebar a::before {
    background-color: #d4b48c;
}

body.dark-mode .separador {
    background-color: #6b4e33;
}

/* AVISO */
body.dark-mode .aviso-content {
    background: rgba(30, 26, 22, 0.95);
    color: #fff;
}

body.dark-mode .btn-login {
    background: #6b4e33;
    border-color: #d4b48c;
}

body.dark-mode .btn-login:hover {
    background: #8b623f;
}

body.dark-mode .btn-cancel {
    background: #3a3a3a;
    border-color: #666;
}

body.dark-mode .btn-cancel:hover {
    background: #4a4a4a;
}

/* CARRITO */
body.dark-mode .cart-container-content {
    color: #fff;
}

body.dark-mode .cart-login {
    background: #6b4e33;
    border-color: #d4b48c;
}

body.dark-mode .cart-login:hover {
    background: #8b623f;
}

body.dark-mode .cart-backdrop {
    backdrop-filter: blur(5px);
}

/* NOTIFICACIONES  */
body.dark-mode .notification-container {
    background: #1e1a16;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

body.dark-mode .notification-item {
    color: #e0e0e0;
}

body.dark-mode .notification-item:hover {
    background-color: #2a2a2a;
}

body.dark-mode .notification-counter {
    background: #6b4e33;
    color: #fff;
}

body.dark-mode .notification-title {
    color: #ffd7a5;
}

body.dark-mode .logonav img {
     filter: invert(1) hue-rotate(180deg);
}


/* AVISO */
body.dark-mode .aviso-backdrop {
    background-color: rgba(0, 0, 0, 0.8);
}

body.dark-mode .aviso-content {
    background: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .btn-login {
    background: #6b4e33;
    color: white;
}

body.dark-mode .btn-login:hover {
    background: #8b623f;
}

body.dark-mode .btn-cancel {
    background: #2a2a2a;
    color: #d4b48c;
    border: 1px solid #6b4e33;
}

body.dark-mode .btn-cancel:hover {
    background: #3a3a3a;
    color: white;
}

/* MENSAJES */
body.dark-mode .message-base {
    background-color: #1a1a1a;
    color: #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .message-show {
    color: #e0e0e0;
}

body.dark-mode .message-delete {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .message-content {
    color: #e0e0e0;
}

body.dark-mode .accept-btn {
    background: #2a2a2a;
    color: #d4b48c;
    border: 1px solid #6b4e33;
}

body.dark-mode .accept-btn:hover {
    background: #3a3a3a;
    color: white;
}

body.dark-mode .cancel-btn {
    background: #6b4e33;
    color: white;
}

body.dark-mode .cancel-btn:hover {
    background: #8b623f;
}