﻿@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');

/* Mejoras simples para el carrito */
.carritohead h2 {
    font-family: 'Nunito Sans', sans-serif;
    font-size: 32px;
    font-weight: 400;
    color: #2d2e2e;
    margin: 0;
}

.checkout-btn {
    background: #3caa36 !important;
    color: white !important;
    border: none;
    border-radius: 6px;
    padding: 15px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.checkout-btn:hover {
    background: #2e8a2a !important;
}

.total-price p {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #141414;
    margin: 0;
}

/* Nuevo layout del carrito tipo Figma */
.cart-items-list {
    display: flex;
    flex-direction: column;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px dashed #eeeeee;
    max-height: 11svh;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    flex-shrink: 0;
}

    .cart-item-image img {
        width: 4svw;
        object-fit: cover;
        mix-blend-mode: multiply;
    }

.cart-item-info {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.product-name {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #000000;
    cursor: pointer;
    margin-bottom: 2px;
    white-space: nowrap; /* No saltar de línea */
    overflow: hidden; /* Ocultar el exceso */
    text-overflow: ellipsis; /* Mostrar "..." al final */
}

.product-name:hover {
    color: #3caa36;
}

.product-code {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    color: #000000;
}

.cart-item-price {
    text-align: right;
    flex-shrink: 0;
}

.price-label {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #000000;
    margin-bottom: 2px;
}

.price-value {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #000000;
}

.quantity-control {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 8px 12px;
    gap: 12px;
    flex-shrink: 0;
}

.qty-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #121212;
    font-size: 16px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.qty-btn:hover {
    color: #3caa36;
}

.qty-number {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #121212;
    min-width: 20px;
    text-align: center;
}

.delete-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}

.delete-btn:hover {
    color: #dc3545;
}

/****************************************CABECERA****************************************/

#cabecera {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    position: relative;
    z-index: 998;
    padding-top: 0;
    padding-bottom: 10px;
    height: 125px;
}

.logo {
    margin-left: 106px;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
}

.menu {
    display: inline-block;
    width: calc(100% - 300px);
    vertical-align: top;
    margin-right: 115px;
    margin-left: 50px;
}

.descripcionmenu {
    color: #3A4F39;
    text-align: right;
    margin-top: 9px;
    margin-bottom: 11px;
    font-size: 14px;
}

#textBoxBusqueda {
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    display: none;
    font-size: 14px !important;
    margin: 0px 10px 0px 10px;
    opacity: 1 !important;
    outline: none;
    padding: 8px 12px !important;
    text-align: left;
    transition: all 0.3s ease !important;
    width: 300px !important;
    height: 36px !important;
    box-sizing: border-box !important;
    color: #333 !important;
    font-family: 'Nunito Sans', sans-serif !important;
    font-weight: 400 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
}

#textBoxBusqueda::placeholder {
    color: #999 !important;
    font-size: 14px !important;
    opacity: 1 !important;
    font-weight: 400 !important;
}

#textBoxBusqueda:focus {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1) !important;
    background-color: #fff !important;
    color: #333 !important;
}

/*Menú páginas*/
#barramenu {
    margin-top: 42px;
    padding: 0;
    display: inline-block;
}

    #barramenu nav ul.menuul {
        list-style-type: none !important;
        margin: 0;
        padding: 0;
        display: flex;
    }

    #barramenu nav ul li {
        cursor: pointer;
        color: #2D2E2E;
        margin-right: 50px;
    }

        #barramenu nav ul li a {
            text-decoration: none !important;
            color: black;
        }

.subrayado {
    position: relative;
    display: inline-block;
}

    .subrayado::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -3px;
        width: 0;
        height: 2px;
        background-color: black;
        transition: width 0.3s ease-in-out;
    }

    .subrayado:hover::after {
        width: 100%;
    }

/* Clase para la categoría principal con subrayado */
.subrayado-productos {
    display: inline-block;
}

    .subrayado-productos > a {
        position: relative;
        display: inline-block;
        text-decoration: none;
        color: inherit;
    }

        .subrayado-productos > a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 2px;
            background-color: black;
            transition: width 0.3s ease-in-out;
        }

        .subrayado-productos > a:hover::after {
            width: 100%;
        }

/* Asegúrate de que las subcategorías no tengan subrayado */
.subcategory a, .subsubcategory a {
    text-decoration: none;
    color: inherit;
}

#primary_categories a:hover,
#primary_categories a.hovered,
#primary_categories a.active {
    background-color: #f2f2f2;
}

#menu-container {
    display: none;
    position: absolute;
    grid-template-columns: 1fr 3fr 1fr;
    width: 77.5%;
    margin-left: -2.4%;
    z-index: 999;
    margin-top: 30px;
}

#primary_categories {
    display: flex;
    padding-bottom: 10%;
    border-radius: 3px 0px 0px 15px;
    flex: 1;
    flex-direction: column;
    z-index: 999;
    background-color: #FFFFFF;
}

    #primary_categories a {
        display: flex;
        padding: 3.5%;
        padding-left: 15%;
        z-index: 999;
        position: relative;
        transition: background-color 0.3s ease;
    }

        #primary_categories a::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 3px;
            background-color: #3CAA36;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #primary_categories a:hover::before,
        #primary_categories a.hovered::before,
        #primary_categories a.active::before {
            opacity: 1;
        }

.categoria-titulo {
    padding-left: 15%;
    margin-bottom: 3%;
    padding-bottom: 0%;
    z-index: 999;
}

/*Links páginas externas*/
.espacios {
    border: 1px solid #1A592B;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    margin-right: 13px;
    padding: 5px;
    width: 115px;
    max-width: 115px;
}

    .espacios img, .espacios p {
        margin: 0;
        padding: 0;
    }

    .espacios img {
        margin-top: 3px;
    }

    .espacios p {
        color: #1A592B;
        float: right;
        margin-top: 1px;
    }

.serviciosIT {
    border: 1px solid #757575;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    margin-right: 13px;
    padding: 5px;
    width: 115px;
    max-width: 115px;
}

    .serviciosIT img, .serviciosIT p {
        margin: 0;
        padding: 0;
    }

    .serviciosIT img {
        margin-top: 3px;
    }

    .serviciosIT p {
        color: #757575;
        float: right;
        margin-top: 1px;
    }

.oficina {
    border: 1px solid #686BAE;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    margin-right: 20px;
    padding: 5px;
    width: 115px;
    max-width: 115px;
}

    .oficina img, .oficina p {
        margin: 0;
        padding: 0;
    }

    .oficina img {
        margin-top: 3px;
    }

    .oficina p {
        color: #686BAE;
        float: right;
        margin-top: 1px;
    }

/*Iconos*/
.icono {
    width: 15px;
    height: 15px;
}

#icons {
    display: block ruby;
    height: 22px;
    margin-top: -32px;
    padding: 5px;
    text-align: right;
    padding-right: 0;
}

#buscadorContainer {
    align-items: center;
    display: flex;
    height: 40px;
    position: relative;
    z-index: 500;
}

#buscadorContainer .search-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 600;
    width: 100%;
    margin-top: 0;
}

#buscadorContainer .suggestion-item {
    padding: 0;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s ease;
    background: white;
}

#buscadorContainer .suggestion-item:first-child {
    border-radius: 8px 8px 0 0;
}

#buscadorContainer .suggestion-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

#buscadorContainer .suggestion-item:hover {
    background-color: #f8f9fa;
}

#buscadorContainer .suggestion-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

#buscadorContainer .suggestion-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    flex-shrink: 0;
}

#buscadorContainer .suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

#buscadorContainer .suggestion-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

#buscadorContainer .suggestion-main-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

#buscadorContainer .suggestion-reference {
    font-size: 12px;
    color: #666;
    font-weight: 400;
    margin-top: 1px;
}

#buscadorContainer .suggestion-price {
    font-size: 12px;
    color: #4caf50;
    font-weight: 600;
    margin-top: 2px;
}

#buscadorContainer .suggestion-type {
    font-size: 11px;
    color: #999;
    font-weight: 500;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
    align-self: flex-start;
    margin-top: 2px;
}

.iconoBuscador {
    cursor: pointer;
    height: 20px;
    left: 0;
    position: relative;
    width: 20px;
}

.iconoCarrito {
    cursor: pointer;
    height: 20px;
    margin-left: 10px;
    margin-bottom: 10px;
    width: 20px;
}

    .iconoCarrito.items {
        content: url('/images/iconos/carritop_lleno.png');
    }

#labelCartEmpty, #labelPedidosCartEmpty {
    display: none;
    text-align: center;
}

.cart-items .fa.fa-check {
    color: #3CAA36;
}

.cart-items .fa.fa-times {
    color: red;
}

.dropdown {
    position: relative;
    display: block;
}

.dropdown-content {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    width: 40%;
    background-color: #f9f9f9;
    box-shadow: -8px 0 16px 0 rgba(0,0,0,0.2);
    padding: 12px 16px;
    z-index: 9999;
    overflow-y: auto;
}

.dropdown.open .dropdown-content {
    display: block;
}

h2 {
    display: inline-flex;
    margin-right: 45%;
}

#close {
    display: inline-flex;
    font-size: xx-large;
    color: grey;
    cursor: pointer;
}

#totalPrice {
    font-size: x-large;
}

.cart-item {
    display: inline-flex;
    align-items: center;
}

.carritoimg {
    width: 100%;
    mix-blend-mode: darken;
}

.checkout-btn {
    background-color: #3CAA36;
    color: white;
    padding: 10px 20px;
    text-align: center;
    display: block;
    font-size: 16px;
    cursor: pointer;
    margin-top: 5%;
    border: none;
    text-decoration: none;
    line-height: normal;
    border-radius: 5px;
}

    .checkout-btn:hover {
        background-color: #45a049;
    }

.carritohead {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-items {
    overflow-y: auto;
    margin-bottom: 3%;
    margin-top: 4svh;
    max-height: 70svh;
}

    .cart-items table {
        text-align: left;
    }

        .cart-items table th {
            padding-right: 15px;
        }

            .cart-items table th.th-image {
                width: 20%;
            }

            .cart-items table th.th-unidades, .cart-items table th.th-precio {
                width: 80px;
            }

            .cart-items table th.th-logo {
                width: 45px;
            }

            .cart-items table th.th-icons {
                width: 50px;
            }

        .cart-items table td {
            padding-right: 15px;
        }

            .cart-items table td.td-producto span {
                cursor: pointer;
            }

                .cart-items table td.td-producto span:hover {
                    text-decoration: underline;
                }

            .cart-items table td.td-logo {
                text-align: center;
            }

            .cart-items table td.td-unidades, .cart-items table td.td-precio {
                text-align: right;
            }

            .cart-items table td.td-icons img {
                cursor: pointer;
            }

.td-icons {
    padding-right: 0 !important;
    text-align: right;
}

.th-precio {
    text-align: end;
}

.h2, .checkout-btn, .carritohead, .cart-items, div#divCartTotal, div#divPedidosCartTotal {
    margin-left: 10%;
    margin-right: 10%;
}

#menuResponsive {
    display: none;
}

#divCartTotal {
    justify-content: space-between;
}

#menuIcon {
    display: none;
    cursor: pointer;
}

@media only screen and (max-width: 1200px) {
    .logo {
        margin-left: 25px;
    }

    .menu {
        display: none;
    }

    #menuIcon {
        display: block;
        z-index: 9999;
        margin-right: 25px;
        width: 30px;
        display: flex;
        justify-content: flex-end;
    }

    #textBoxBusqueda {
        width: 240px !important;
        font-size: 14px !important;
        height: 34px !important;
        padding: 6px 10px !important;
        opacity: 1 !important;
        color: #333 !important;
        background-color: #fff !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
    }

    #textBoxBusqueda::placeholder {
        color: #999 !important;
        font-size: 14px !important;
        opacity: 1 !important;
    }

    #buscadorContainer {
        height: 36px;
    }

    #buscadorContainer .search-suggestions {
        max-height: 350px;
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

    #buscadorContainer .suggestion-content {
        padding: 10px 12px;
        gap: 10px;
    }
    
    #buscadorContainer .suggestion-image,
    #buscadorContainer .suggestion-icon {
        width: 35px;
        height: 35px;
    }
    
    #buscadorContainer .suggestion-main-text {
        font-size: 13px;
    }
    
    #buscadorContainer .suggestion-reference,
    #buscadorContainer .suggestion-price {
        font-size: 11px;
    }
    
    #buscadorContainer .suggestion-type {
        font-size: 10px;
        padding: 1px 6px;
    }

    #menuResponsive {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        background-color: #fff;
        width: 100%;
        height: 100vh;
        z-index: 999;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
        overflow-y: auto;
        text-align: center;
        padding-top: 50px;
    }

    #barramenu nav ul li {
        margin-right: 0;
    }

    ul.menuul {
        list-style-type: none;
        padding: 0;
        margin: 0 auto;
        border-top: 1px solid #ccc;
        margin-top: 30px;
    }

        ul.menuul li {
            padding: 15px 20px;
        }

            ul.menuul li:last-child {
                border-bottom: none;
            }

            ul.menuul li a {
                text-decoration: none;
                color: #333;
                font-size: 16px;
            }

    #barramenu nav ul.menuul {
        display: block;
    }

    #icons {
        display: flex;
        justify-content: center;
        margin-top: 30px;
        margin-bottom: 30px;
        position: relative;
        z-index: 999;
    }

        #icons div {
            margin: 0 10px;
        }

    #menuResponsive a {
        text-decoration: none;
        color: #333;
        font-size: 16px;
        margin: 0 10px;
    }

    .dropdown-content {
        width: 80%;
    }

    h2, #close, #totalPrice, .cart-item, .checkout-btn, .carritohead, .cart-items {
        margin-left: 10%;
        margin-right: 10%;
    }

    h2 {
        display: inline-flex;
        margin-right: 10%;
    }

    #close {
        display: inline-flex;
        font-size: large;
        color: grey;
    }

    #totalPrice {
        font-size: large;
    }
}

/********************-------------- FIN CABECERA -------------******************************/

/**************************************** FOOTER ****************************************/

body {
    font-family: 'Nunito Sans';
}

.lineafooter {
    width: 25%;
    margin-right: 6%;
    margin-bottom: 3%;
    margin-top: 1%;
}

.footer {
    position: relative;
    bottom: 0;
}

.contenido {
    display: flex;
    justify-content: space-between;
    margin: 0px 115px 0px 115px;
}

.parte1 {
    width: calc(40% - 50px);
    margin-right: 50px;
}

    .parte1 p {
        font-size: 16px;
    }

.parte2, .parte3, .parte4 {
    width: 15%;
    font-size: 16px;
}

.parte1, .parte2, .parte3, .parte4 {
    display: inline-block;
    vertical-align: top;
}

    .parte2 a {
        text-decoration: none !important;
        color: black;
    }

    .parte3 a {
        text-decoration: none !important;
        color: black;
    }

.aviso {
    margin: 0px 115px 0px 115px;
}

    .aviso p {
        display: inline;
        margin-right: 10px;
        font-size: 12px;
        color: #BDBDBD;
    }

.gris {
    color: #757575;
}

.parte4 .logos img {
    width: 30px;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    margin-right: 9%;
}

.pmclogo {
    width: 20%;
}

/* Alinear parte4 a la derecha */
.parte4 {
    margin-right: 0px;
}

/* Media query para dispositivos móviles */
@media only screen and (max-width: 800px) {
    .lineafooter {
        width: 100%;
        margin-bottom: 40px;
    }

    .contenido {
        flex-direction: column;
        align-items: center;
        margin: 0px;
    }

    .parte1, .parte2, .parte3, .parte4 {
        width: 100%;
        margin: 0px;
        text-align: center;
    }

    .pmclogo {
        width: 40%;
        margin-bottom: 20px;
    }

    .aviso {
        width: 100%;
        margin: 0 auto;
        text-align: center;
    }

        .aviso p {
            display: inline-block;
        }

    .parte4 .logos img {
        width: 20px;
    }

    .espacios, .serviciosIT, oficina {
        margin: 2svh !important;
    }
}

/*******************************--------- FIN  FOOTER ----------**************************/

/* Elementos del menú */
.acordeon {
    font-family: 'Nunito Sans', sans-serif;
}

.pregunta {
    background-color: #f4f4f4;
    color: #333;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 5px;
}

.respuesta {
    padding: 10px;
    display: none;
}

/* Subsubcategorías */
.subsubcategory {
    font-weight: normal;
    position: relative;
}

    .subsubcategory .inner-div {
        display: inline-block;
        position: relative;
    }

        .subsubcategory .inner-div::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 1px;
            background-color: black;
            transition: width 0.2s ease-in-out, visibility 0.2s ease-in-out;
        }

        .subsubcategory .inner-div:hover::after {
            width: 100%;
            visibility: visible;
        }

        .subsubcategory .inner-div:not(:hover)::after {
            width: 0;
            visibility: hidden;
        }

/* Subcategorías */
#subcategories_panel {
    width: 100%;
    z-index: 999;
    background-color: #f2f2f2;
}

.subcategories {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(20%, 1fr));
    grid-gap: 10% 12%;
    padding-left: 10%;
    padding-right: 10%;
}

.subcategory {
    box-sizing: border-box;
    font-weight: bold;
}

    .subcategory p {
        margin: 0;
        margin-bottom: 8%;
    }

.subsubcategory {
    font-weight: normal;
    margin-bottom: 2%;
}

.subsubcategories {
    margin-top: 1svh;
}

/* Cargando y modales */
div#loading {
    background-color: rgba(255, 255, 255, 0.8);
    display: block;
    height: 100%;
    left: 0px;
    position: fixed;
    top: 0px;
    width: 100%;
    z-index: 9999;
}

    div#loading .animation-container {
        left: 50%;
        position: absolute;
        top: 50%;
        transform: translate(-50%, -50%);
    }

div#messagemodal {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    overflow: auto;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9999;
}

    div#messagemodal .message-content {
        background-color: #fefefe;
        border: 1px solid #888;
        border-radius: 10px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
        max-width: 500px;
        padding: 50px 80px;
        position: fixed;
        width: 40%;
        z-index: 998;
    }

    div#messagemodal .close {
        color: #aaa;
        cursor: pointer;
        float: right;
        font-size: 28px;
        font-weight: bold;
        user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
    }

        div#messagemodal .close:hover, div#messagemodal .close:focus {
            color: black;
            cursor: pointer;
            text-decoration: none;
        }

    div#messagemodal .message-header {
        font-size: 25px;
        font-weight: normal;
        margin-bottom: 20px;
    }

/* Overlay */
.overlay {
    position: absolute;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

    .overlay.active {
        background-color: rgba(0, 0, 0, 0.5);
        opacity: 1;
        visibility: visible;
    }

/* Botón Ver Producto */
.ver-productoc {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    background-color: rgba(255, 255, 255, 0.85);
    color: #808080;
    border: 1px solid #808080;
    border-radius: 10px 0px 0px 10px;
    text-align: center;
    font-size: 16px;
    cursor: pointer;
    position: absolute;
    top: 60%;
    right: 0;
    width: 17%;
}

/* Estilos adicionales */
.total-price p {
    font-weight: bold !important;
}

/* Scrollbar personalizada */
::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: #F5F5F5;
}

::-webkit-scrollbar {
    width: 8px;
    background-color: #F5F5F5;
    display: none;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: #757575;
}

/* Indicadores de stock */
.cart-items .stock-indicator {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    color: white;
    font-weight: bold;
}

    .cart-items .stock-indicator.in-stock {
        color: #3CAA36;
        background-color: transparent;
    }

    .cart-items .stock-indicator.partial-stock {
        color: #FFA500;
        background-color: transparent;
    }

    .cart-items .stock-indicator.out-of-stock {
        color: red;
        background-color: transparent;
    }

/* Menú de servicios */
#Div1 {
    width: 14svw;
    display: flex;
    padding-bottom: 10%;
    border-radius: 3px 0px 0px 15px;
    flex: 1;
    flex-direction: column;
    z-index: 999;
    background-color: #FFFFFF;
}

    #Div1 h3 {
        align-items: center;
        gap: 5px;
        display: flex;
        padding: 3.5%;
        padding-left: 13%;
        z-index: 999;
        position: relative;
        margin: 0;
        font-size: medium;
    }

    #Div1 div {
        position: relative;
        align-items: center;
        gap: 10px;
        display: flex;
        padding: 3.5%;
        padding-left: 13%;
        z-index: 999;
        transition: background-color 0.3s ease;
    }

        #Div1 div::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            width: 3px;
            background-color: #3CAA36;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        #Div1 div:hover,
        #Div1 div.hovered,
        #Div1 div.active {
            background-color: #f2f2f2;
        }

            #Div1 div:hover::before,
            #Div1 div.hovered::before,
            #Div1 div.active::before {
                opacity: 1;
            }

    #Div1 hr {
        border: 0.1px solid #f2f2f2;
        margin: 0 15% 0 12%;
    }

#Div2 {
    width: 54.5svw;
    background-image: url("../images/images/servicios/bannerPM.svg");
    border-radius: 0 0 10px 0px;
    z-index: 9999;
    background-size: cover;
}

/* Enlaces con subrayado hover en footer */
.footer a {
    position: relative;
    display: inline-block;
}

    .footer a::after {
        content: '';
        position: absolute;
        left: 0;
        bottom: -3px;
        width: 0;
        height: 2px;
        background-color: black;
        transition: width 0.3s ease-in-out;
    }

    .footer a:hover::after {
        width: 100%;
    }

/* Ruta de categoría */
.category-path {
    font-size: 14px;
    align-content: center;
    width: 35svw;
    color: #666;
}

    .category-path a {
        position: relative;
        display: inline-block;
        text-decoration: none !important;
        color: black;
        background-image: linear-gradient(black, black);
        background-size: 0% 2px;
        background-position: 0 100%;
        background-repeat: no-repeat;
        transition: background-size 0.3s ease-in-out;
    }

        .category-path a:hover {
            background-size: 100% 2px;
        }

        .category-path a:not(:last-child)::after {
            content: " / ";
            margin: 0 5px;
            text-decoration: none !important;
            color: #666;
        }

/* Botón Agregar al carrito */
.btn-agregar.added-to-cart {
    background-color: #3CAA36;
    color: white;
}

    .btn-agregar.added-to-cart img {
        filter: brightness(0) invert(1);
    }

/* Pantallas 4K */
@media screen and (min-width: 3840px) {
    #cabecera {
        display: flex;
        justify-content: space-between;
        padding: 10px;
        position: relative;
        z-index: 998;
        padding-top: 0;
        padding-bottom: 10px;
        height: 126px;
        margin-left: 10%;
        margin-right: 10%;
        font-size: large;
    }

    #menu-container {
        font-size: larger;
    }

    .ver-productoc {
        font-size: large;
        top: 70%;
        width: 15%;
    }

    #categoryimage {
        height: 32svh;
    }

    .footer {
        position: relative;
        bottom: 0;
        margin-left: 7%;
        margin-right: 6%;
    }

    .menu {
        display: inline-block;
        width: 94%;
        vertical-align: top;
        margin-right: 0;
        margin-left: 0;
    }

    .logo {
        margin-left: 0;
    }
}

/* Estilos para el layout principal de Blazor */
.page {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

/* Animación de carga para Blazor */
.loader {
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3CAA36;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    margin-top: -60px;
    margin-left: -60px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Añade estos estilos a tu MainLayout.razor.css o a un archivo CSS global */

/* Estilos para el nivel 4 de categorías */
.nivel4categories {
    margin-left: 12px;
    margin-top: 6px;
    font-size: 0.9em;
}

.nivel4category {
    font-weight: normal;
    position: relative;
    margin-bottom: 4px;
}

    .nivel4category .inner-div {
        display: inline-block;
        position: relative;
        color: #666;
        transition: color 0.2s ease;
    }

        .nivel4category .inner-div::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0;
            height: 1px;
            background-color: #666;
            transition: width 0.2s ease-in-out, visibility 0.2s ease-in-out;
        }

        .nivel4category .inner-div:hover {
            color: #000;
        }

            .nivel4category .inner-div:hover::after {
                width: 100%;
                visibility: visible;
            }

        .nivel4category .inner-div:not(:hover)::after {
            width: 0;
            visibility: hidden;
        }

/* Asegura que los eventos de clic funcionen correctamente en dispositivos táctiles */
@media (max-width: 768px) {
    .subsubcategory, .nivel4category {
        padding: 6px 0;
    }

        .subsubcategory .inner-div, .nivel4category .inner-div {
            display: block;
            width: 100%;
        }

    .nivel4categories {
        margin-left: 16px;
    }
}

/* ===================================================================
   ESTILOS DROPDOWN DE FAVORITOS - EXACTO A FIGMA
   =================================================================== */

/* Modal de favoritos */
.favorites-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 60px;
    padding-right: 20px;
}

/* Contenido del dropdown */
.favorites-dropdown-content {
    background: #FFFFFF;
    border-radius: 15px 0px 15px 15px; /* rounded-bl-[15px] rounded-tl-[15px] */
    box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.25);
    padding: 40px 90px;
    width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

/* Header */
.favorites-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 55px;
}

.favorites-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 48px;
    line-height: 1;
    color: #2D2E2E;
    margin: 0;
    font-variation-settings: 'YTLC' 500, 'wdth' 100;
}

.favorites-close-btn {
    background: none;
    border: none;
    width: 24px;
    height: 24px;
    cursor: pointer;
    color: #2D2E2E;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.favorites-close-btn:hover {
    opacity: 0.7;
}

/* Lista de productos */
.favorites-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

/* Fila de producto */
.favorite-product-row {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 108px;
    position: relative;
}

/* Imagen del producto */
.product-image-container {
    flex-shrink: 0;
}

.product-image {
    width: 100px;
    height: 100px;
    border-radius: 14px;
    object-fit: cover;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Información del producto */
.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.product-title {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    color: #000000;
    cursor: pointer;
    margin: 0;
    font-variation-settings: 'YTLC' 500, 'wdth' 100;
}

.product-title:hover {
    text-decoration: underline;
}

.product-code {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 300;
    font-size: 16px;
    line-height: 1;
    color: #000000;
    margin: 0;
    font-variation-settings: 'YTLC' 500, 'wdth' 100;
}

/* Control de cantidad */
.quantity-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    position: relative;
}

.quantity-control-bg {
    background: #F5F5F5;
    border-radius: 8px;
    width: 128.269px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12.269px;
    position: relative;
}

.quantity-btn {
    background: none;
    border: none;
    width: 20.667px;
    height: 20px;
    cursor: pointer;
    color: #121212;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-btn:hover:not(:disabled) {
    opacity: 0.7;
}

.quantity-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-number {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 1;
    color: #121212;
    text-align: center;
    font-variation-settings: 'YTLC' 500, 'wdth' 100;
}

/* Botón carrito */
.cart-button {
    background: #FFFFFF;
    border: 1px solid #3CAA36;
    border-radius: 6px;
    width: 57.5px;
    height: 46px;
    cursor: pointer;
    color: #3CAA36;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cart-button:hover:not(.disabled) {
    background: #3CAA36;
    color: #FFFFFF;
}

.cart-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ccc;
    color: #ccc;
}

/* Botón corazón */
.heart-button {
    background: #FFFFFF;
    border: none;
    border-radius: 32px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #e74c3c;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2);
}

.heart-button:hover {
    background: #f8f8f8;
    transform: scale(1.05);
}

/* Separador entre productos */
.product-separator {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed #EEEEEE;
    margin: 0;
}

/* Estado vacío simplificado */
.empty-favorites-simple {
    text-align: center;
    padding: 60px 20px;
}

.empty-message-simple {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 400;
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.explore-btn-simple {
    background: #3CAA36;
    color: #FFFFFF;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.explore-btn-simple:hover {
    background: #2e8b2e;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 768px) {
    .favorites-dropdown-content {
        width: 90vw;
        max-width: 400px;
        padding: 30px 20px;
        margin-right: 10px;
    }
    
    .favorites-title {
        font-size: 32px;
    }
    
    .favorite-product-row {
        gap: 15px;
        height: auto;
        min-height: 108px;
        flex-wrap: wrap;
    }
    
    .quantity-control-bg {
        width: 110px;
    }
    
    .cart-button {
        width: 50px;
        height: 40px;
    }
}

/* Eliminar estilos anteriores */
.favorite-item,
.empty-favorites,
.favorites-summary,
.favorites-footer,
.favorite-quantity-control,
.favorite-actions,
.add-to-cart-btn,
.delete-btn,
.secondary-btn,
.primary-btn,
.btn-text,
.stock-available,
.stock-unavailable,
.empty-icon,
.empty-message,
.empty-hint,
.explore-btn,
.summary-row,
.summary-label,
.summary-value,
.footer-actions,
.quantity-label {
    /* Resetear estilos anteriores */
    all: unset;
}

/* ESTILOS PARA ELEMENTOS ELIMINADOS EN FAVORITOS */
/* ============================================== */

/* Container para items eliminados localmente */
.cart-item.removed-item {
    opacity: 0.6;
    background-color: #f8f8f8;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.cart-item.removed-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(220, 220, 220, 0.3) 10px,
        rgba(220, 220, 220, 0.3) 20px
    );
    pointer-events: none;
    border-radius: 8px;
}

/* Texto en gris para elementos eliminados */
.removed-text {
    color: #888 !important;
    text-decoration: line-through;
    opacity: 0.7;
}

/* Imágenes en gris para elementos eliminados */
.removed-image {
    filter: grayscale(100%) brightness(1.2);
    opacity: 0.6;
}

/* Controles deshabilitados */
.quantity-control.disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    pointer-events: none;
}

.quantity-control.disabled .qty-btn {
    color: #999;
    cursor: not-allowed;
}

.quantity-control.disabled .qty-number {
    color: #999;
}

/* Botones deshabilitados */
.qty-btn:disabled,
.qty-btn.disabled {
    color: #ccc !important;
    cursor: not-allowed;
    opacity: 0.5;
}

.qty-btn:disabled:hover,
.qty-btn.disabled:hover {
    color: #ccc !important;
}

/* Etiqueta de eliminado */
.removed-label {
    font-size: 12px;
    color: #dc3545;
    font-weight: 600;
    margin-left: 8px;
    background: #ffe6e6;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

/* Botón de restaurar */
.restore-btn {
    background: none;
    border: 2px solid #28a745;
    border-radius: 6px;
    cursor: pointer;
    color: #28a745;
    font-size: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.restore-btn:hover {
    background: #28a745;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.restore-btn:active {
    transform: scale(0.95);
}

/* Animación de pulso para el botón restaurar */
.restore-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.restore-btn:hover::before {
    width: 100px;
    height: 100px;
}

/* Mejoras de accesibilidad */
.cart-item.removed-item:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Estados hover mejorados para elementos eliminados */
.cart-item.removed-item:hover {
    opacity: 0.8;
    background-color: #f0f0f0;
}

/* Responsive para elementos eliminados */
@media (max-width: 768px) {
    .removed-label {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .restore-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .cart-item.removed-item {
        padding: 10px 0;
    }
}