/* ===== VARIABLES Y ESTILOS GLOBALES ===== */
:root {
    --color-primary: #2792e3;
    --color-secondary: #bee9e9;
    --color-white: #ffffff;
    --color-gray-light: #f5f5f5;
    --color-gray: #666666;
    --color-dark: #333333;
    --color-black: #000000;
    --color-success: #28a745;
    --color-danger: #dc3545;

    --header-top-height-desktop: -60px;
    --header-main-height-desktop: 70px;
    --header-total-height-desktop: calc(var(--header-top-height-desktop) + var(--header-main-height-desktop));

    --header-top-height-mobile: 20px;
    --header-main-height-mobile: 50px;
    --header-total-height-mobile: calc(var(--header-top-height-mobile) + var(--header-main-height-mobile));

    --categories-bar-height: 40px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--color-gray-light);
    color: var(--color-dark);
    padding-top: calc(var(--header-total-height-desktop) + var(--categories-bar-height));

}

a {
    text-decoration: none;
    color: var(--color-primary);
}

img {
    max-width: 100%;
    height: auto;
}

.main-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0.5rem;
    padding-top: 0.25rem;
}

/* ===== BOTONES GENÉRICOS ===== */
.btn-primary {
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
    height: 35px;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0.25rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
}

.btn-primary:hover {
    background-color: #0ba70d;
    color: white;
}



.header {
    background-color: var(--color-white);
    position: fixed;
    display: grid;
    top: 0;
    left: 0;
    right: 0;
    /* (P2) Z-INDEX CORREGIDO: Header (1001) debe estar SOBRE el overlay (1000) */
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 145, 255, 0.799);
}



.header-container-grid {
    gap: 15px;
    padding: 5px;
    display: flex;
    height: 56px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
    margin: 0;
}




/* Asignación de áreas de Grid */
.logo-container {
    grid-area: logo;
}



.header-actions {
    grid-area: actions;
}

.logo-container {
    height: 100%;
    display: flex;
    align-items: center;
}

#main-logo {
    height: 40px;
    width: auto;

}

.header-titles {
    background: radial-gradient(circle, #4bf308, #2792e3, #f30808, #2792e3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    margin-top: 0px;
    /*margin: 0 -100%;
    padding: 0 100%;*/
}

/*#site-slogan {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.8rem;
    display: none;
}*/

#site-title {
    color: var(--color-white);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    display: inline-block;
    /* Permite aplicar transformación */
    animation: mover-texto 25s linear infinite;
    /* Nombre, duración, función y repetición */
}

@keyframes mover-texto {
    from {
        transform: translateX(100%);
        /* Comienza desde la derecha */
    }

    to {
        transform: translateX(-100%);
        /* Termina en la izquierda */
    }
}

@media (max-width: 768px) {
    #site-title {
        font-size: 0.8rem;
        animation: mover-texto 20s linear infinite;
        padding: 5px;
    }

    @keyframes mover-texto {
        from {
            transform: translateX(30%);
            /* Comienza desde la derecha */
        }

        to {
            transform: translateX(-100%);
            /* Termina en la izquierda */
        }
    }
}



.search-container {
    display: flex;
    position: relative;
    width: 28%;
    justify-content: center;

}

#search-input {
    width: 80%;

}

#search-button {
    font-size: 0.85rem;
    background: none;
    color: var(--color-gray);
    border: none;
    position: relative;
    left: -22px;

}

/* Avatar de usuario logueado en el header
.header-user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-white);
    margin-top: 8px;
    cursor: pointer;
    transition: transform .2s ease;
}

.header-user-avatar:hover {
    transform: scale(1.1);
}

/* Responsivo 
@media (max-width: 600px) {
    .header-user-avatar {
        width: 45px;
        height: 45px;
        margin-top: -8px;
    }
}*/




.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--color-primary);
    position: relative;
    margin-top: 0px;
    padding: 0.5rem;
}

.header-action-btn:hover {
    color: #1e7ac7;
}

.mobile-menu-trigger {
    display: flex;
}

.cart-button {
    position: relative;
}

.cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--color-danger);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 400;
    border-radius: 50%;
    padding: 0.15rem 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* MENÚ MÓVIL (Contenedor) */
#mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 550px;
    overflow: auto;
    background-color: var(--color-white);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    /* (P2) Z-INDEX CORREGIDO: El menú debe estar SOBRE el header (y el overlay) */
    z-index: 1002;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

#mobile-menu.active {
    right: 0;
    top: 130px;
    background: radial-gradient(#0addae91, #2393e7c9);
}

@media (max-width: 630px) {
    #mobile-menu.active {
        top: 150px;
        left: 0;
        height: 600px;
    }

}

.mobile-menu-header {
    display: flex;
    height: 10%;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-light);
}

.mobile-menu-header h2 {
    margin: 0;
    color: white;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

.mobile-search-menu {
    display: flex;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-gray-light);
    gap: 0.5rem;
}






#mobile-search-input-menu {
    flex-grow: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 5px 0 0 5px;
}

#mobile-search-button-menu {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0;
    cursor: pointer;
    border-radius: 0 5px 5px 0;
}

.categories-menu-mobile {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.categories-menu-mobile li {
    border-bottom: 1px solid var(--color-gray-light);
}

.categories-menu-mobile a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--color-dark);
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.categories-menu-mobile a:hover {
    background-color: var(--color-gray-light);
}


/* ===== BARRA DE CATEGORÍAS FIJA ===== */
.categories-overview-sticky {
    position: relative;
    background-color: #010508;
    z-index: 999;
    /* Debajo del header */
    box-shadow: 0 4px 5px rgb(0, 255, 13);
    height: var(--categories-bar-height);
    overflow-x: auto;
}

.categories-menu-desktop {
    max-width: 1200px;
    margin: auto;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 1.5rem;
}

.categories-menu-desktop a {
    display: block;
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.categories-menu-desktop a:hover {
    color: var(--color-primary);
}

/* ===== BANNER ANCHO COMPLETO ===== */
.carousel-container-full {
    width: 100%;
    height: 50vh;
    max-height: 450px;
    overflow: hidden;
    position: relative;
    margin-bottom: 0.25rem;
}

.carousel-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    opacity: 0;
    animation: slide 12s linear infinite;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-slide:nth-child(1) {
    animation-delay: 0s;
}

.carousel-slide:nth-child(2) {
    animation-delay: 3s;
}

.carousel-slide:nth-child(3) {
    animation-delay: 6s;
}

.carousel-slide:nth-child(4) {
    animation-delay: 9s;
}

@keyframes slide {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }

    8.33% {
        opacity: 1;
    }

    25% {
        opacity: 1;
        transform: scale(1);
    }

    33.33% {
        opacity: 0;
        transform: scale(1);
    }

    100% {
        opacity: 0;
    }
}


/* ===== CARRUSEL LOGOS ANCHO COMPLETO ===== */
.client-logos {
    padding: 0.5rem 0;
    text-align: center;
    background: linear-gradient(178deg, #2ecc71, #274eae);
    /*overflow: hidden;*/
}

.logo-carousel-container {
    /*overflow: hidden;*/
    position: relative;
    width: 100%;
    margin: 10px 0 10px;
}

.logo-carousel-track {
    display: flex;
    width: fit-content;
    animation: logo-slide 40s linear infinite;
}

.logo-slide-circular {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 1rem;
    border: 3px solid var(--color-gray-light);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-slide-circular img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-slide-circular:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

@keyframes logo-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


/* ===== SECCIONES DE PRODUCTOS (Centradas) ===== */
.featured-products,
.random-products {
    background-color: var(--color-white);
    padding: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 0.25rem;
    /*overflow: hidden;*/
}

.featured-products h2,
.random-products h2 {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0;
    text-transform: capitalize;
}

/* ===== CARRUSELES PRODUCTOS (Index) ===== */
.product-carousel-container {
    /*overflow: hidden;*/
    position: relative;
    padding: 0.5rem 0;
}

.product-carousel-track {
    display: flex;
    width: fit-content;
    animation: product-slide 60s linear infinite;
    zoom: 0.65;
}

#featured-products-track {
    animation-direction: reverse;
}

#random-products-track {
    animation-direction: normal;
}

@keyframes product-slide {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Tarjeta de producto (Base) */
.product-card {
    background-color: var(--color-white);
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
    flex-shrink: 0;
}

.product-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 5px 10px 5px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    align-content: flex-start;
    flex-direction: column;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.4em;
}

.product-card-category,
.product-card-subcategory {
    font-size: 0.85rem;
    color: var(--color-gray);
    margin-bottom: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
}

.product-card-subcategory {
    color: var(--color-primary);
}

.btn-add-to-cart-grid {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: auto;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 4px;
    padding-top: 0px;
    text-align: left;
}

/* Tarjetas en Carrusel (Index) */
#page-index .product-card {
    width: 250px;
    margin: 0 0.5rem 1rem;
}

#page-index .product-card .product-price,
#page-index .product-card .btn-add-to-cart-grid {
    display: block;
}

#page-index .product-card-category,
#page-index .product-card-subcategory {
    display: block;
}


/* ===== PÁGINA CATEGORÍA (Grid) ===== */
.category-page-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: -2.1rem;
    margin-top: 78px;
}

#page-categorias .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-left: -35px;
}

@media (max-width: 600px) {
    #page-categorias .products-grid {
        grid-template-columns: 1fr 1fr;
        margin-left: 0;
    }

    .category-page-title {
        margin-bottom: 1.1rem;
        margin-top: 100px;
    }
}

#page-categorias .product-card {
    width: auto;
    margin: 0;
}

#page-categorias .product-image {
    height: 200px;
}

#page-categorias .product-name {
    font-size: 0.7rem;
    min-height: 3em;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-categorias .product-card-category,
#page-categorias .product-card-subcategory {
    display: none;
}

#page-categorias .product-price,
#page-categorias .product-card .btn-add-to-cart-grid {
    display: block;
}


/* ===== PÁGINA DE DETALLE DE PRODUCTO ===== */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    background: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 85px;
}

.product-detail-image img {
    width: 100%;
    border-radius: 8px;
}

.product-detail-category {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-gray);
    text-transform: uppercase;
    text-decoration: none;
}

.product-detail-category:hover {
    color: var(--color-primary);
}

.product-detail-business {
    font-size: 0.65rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    text-decoration: none;
    font-weight: 500;
}

.product-detail-business:hover {
    text-decoration: underline;
}

.product-detail-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.product-detail-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-detail-specs {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.product-detail-specs li {
    margin-bottom: 0.5rem;
    color: var(--color-gray);
}

.product-detail-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.product-detail-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-control {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 5px;
    overflow: hidden;
    height: 46px;
}

.qty-btn {
    background-color: var(--color-gray-light);
    border: none;
    width: 44px;
    height: 100%;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.qty-btn:hover {
    background-color: #ddd;
}

.quantity-input {
    width: 60px;
    padding: 0;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    background: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-to-cart {
    flex-grow: 1;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0 1.5rem;
    height: 46px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-add-to-cart:hover {
    background-color: #1e7ac7;
}

/* Productos Relacionados (Carrusel Scroll) */
.related-products {
    background-color: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    margin-top: 1.5rem;

}

.related-products h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
}

.related-carousel-container {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.related-carousel-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.product-card-small {
    flex: 0 0 180px;
    width: 180px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.product-card-small .product-link {
    text-decoration: none;
    color: inherit;
}

.product-image-small {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.product-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info-small {
    padding: 10px 10px 5px;
}

.product-name-small {
    overflow: hidden;
    text-align: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 2px 0;
    -webkit-box-orient: revert-layer;
    height: 38px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-price-small {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-top: 4px;
    padding-top: 0px;
    text-align: left;
}


/* ===== PÁGINA LEGAL ===== */
.legal-container {
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: 8px;
}

.legal-container h2 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--color-gray-light);
    padding-bottom: 1rem;
}

.legal-container h3 {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-container p,
.legal-container li {
    line-height: 1.7;
    color: var(--color-gray);
    margin-bottom: 1rem;
}

.legal-container ul,
.legal-container ol {
    padding-left: 2rem;
}


/* ===== FOOTER ===== */
.footer {
    background-color: var(--color-dark);
    color: var(--color-gray-light);
    padding: 3rem 1rem;
    margin-top: 2rem;
    zoom: 0.65;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-column h3 {
    color: var(--color-white);
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--color-primary);
}

.footer-form-button {
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.footer-form-button:hover {
    background-color: #1e7ac7;
}

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

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--color-gray-light);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-primary);
    padding-left: 5px;
}

.footer-info-text {
    line-height: 1.6;
    color: var(--color-gray-light);
}

.contact-info p {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: var(--color-white);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--color-primary);
    transform: translateY(-3px);
}

.copyright {
    max-width: 1200px;
    margin: 2rem auto 0 auto;
    padding: 1rem 0;
    border-top: 1px solid var(--color-gray);
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-gray-light);
}


/* ===== MODALES ===== */
/* (P2) Z-INDEX CORREGIDO: Overlay (1000) debe estar DEBAJO del header (1001) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    /* BAJADO */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* (P2) Z-INDEX CORREGIDO: Modales (1002) deben estar SOBRE el header (1001) */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1002;
    /* MANTENIDO (Más alto que el header) */
    width: 90%;
    max-width: 500px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-content {
    padding: 2rem 2.5rem;
    position: relative;
    background: radial-gradient(#70b0ff80, #13a0722e);
    max-height: 95vh;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 1rem 1.5rem;
    }
}


.close-modal-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-gray);
    cursor: pointer;
    line-height: 1;
}

.modal-content h2 {
    color: var(--color-primary);
    text-align: center;
    margin-top: 5px;
    margin-bottom: 5px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.radio-group input[type="radio"] {
    width: auto;
}

.radio-group label {
    font-weight: normal;
    margin-bottom: 0;
}

.form-footer-text {
    text-align: center;
    margin-top: 1rem;
    color: var(--color-gray);
}

.form-footer-text a {
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: underline;
}

/* (P2) Z-INDEX CORREGIDO: Cart Modal (1002) debe estar SOBRE el header (1001) */
.cart-modal {
    position: fixed;
    top: 0;
    right: -100%;
    width: 75%;
    max-width: 400px;
    height: 100%;
    background: var(--color-white);
    box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    /* MANTENIDO (Más alto que el header) */
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-modal.active {
    right: 0;
    top: 0;
    zoom: 0.95;
    height: auto;
}

@media (max-width: 768px) {
    .cart-modal.active {
        right: 0;
        top: 0px;
        height: 91%;
        width: 84%;
    }
}

.cart-header {
    display: flex;
    height: 10%;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: currentColor;
    border-bottom: 1px solid var(--color-gray-light);
}

.cart-header h2 {
    margin: 0;
    color: white;
}

.close-cart-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: white;
}

.cart-items-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.cart-empty-message {
    text-align: center;
    color: var(--color-gray);
    padding: 2rem 0;
}

.cart-item {
    display: flex;
    background: #ffffffd4;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border-bottom: 5px solid #21c451;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex-grow: 1;
}

.cart-item-info h4 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    color: var(--color-dark);
}

.cart-item-info p {
    font-size: 0.9rem;
    color: var(--color-gray);
    margin: 0;
}

.cart-item-price {
    font-weight: 600;
    color: var(--color-primary);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--color-danger);
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.cart-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-gray-light);
    background-color: var(--color-gray-light);
}

.cart-total {
    text-align: right;
    margin-bottom: 1rem;
    color: white;
}

.btn-checkout {
    background-color: var(--color-success);
    color: var(--color-white);
    border: none;
    padding: 0.15rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

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


/* ===== RESPONSIVE ===== 
@media (max-width: 768px) {


    

   


    /* Estilos de header móvil 
    #main-logo {
        height: 42px;
        margin-top: 0px;
        position: relative;
        top: 14px;
    }

    .logo-container {
        height: var(--header-top-height-mobile);
        display: flex;
        align-items: center;
        justify-content: center;
        /* Centrar logo en su caja 
    }



    /*#site-slogan {
        color: var(--color-primary);
        font-size: 1rem;
        font-weight: 700;
        text-shadow: none;
        font-size: 0.5rem;
        color: var(--color-gray);
        font-weight: 500;
        position: relative;
        top: -2.5px;
        display: flow-root;
    }



    @keyframes mover-texto {
        from {
            transform: translateX(35%);
            /* Comienza desde la derecha 
        }

        to {
            transform: translateX(-135%);
            /* Termina en la izquierda 
        }
    }

    .mobile-menu-trigger {
        display: block;
    }



    #search-input {
        height: 38px;
        padding: 0 1rem;
        padding-right: 2.5rem;
        font-size: 0.9rem;
        border: none;
        background-color: var(--color-gray-light);
        border-radius: 8px;
        position: relative;

    }

    #search-button {
        height: 38px;
        width: 2.5rem;
        font-size: 0.9rem;
        background: none;
        color: var(--color-gray);
        border: none;
        border-radius: 0 8px 8px 0;
    }*/

/* (P1) Ancho fijo para los botones de íconos 
    #login-button,
    #cart-button,
    .mobile-menu-trigger,
    .favorito-button {
        height: var(--header-main-height-mobile);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        padding: 0;
        /* Sin padding, el ancho lo da el grid 
        color: var(--color-primary);
    }*/



/* Ajustes generales 
    .main-container {
        padding: 0.25rem;
        zoom: 0.75;
        margin-top: 0px;
    }*/

@media (max-width: 768px) {

    .client-logos,
    .featured-products,
    .random-products {
        padding: 0.5rem 0;
    }

    .carousel-container-full {
        height: 30vh;
    }

    .product-detail-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .product-detail-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity-control {
        justify-content: center;
        height: 50px;
    }

    .qty-btn {
        height: 100%;
    }

    .btn-add-to-cart {
        height: 50px;
    }

    /* Relacionados en móvil */
    .related-products {
        padding: 1rem;
    }

    .related-products h2 {
        font-size: 1.25rem;
    }

    .product-card-small {
        flex-basis: 150px;
        width: 150px;
    }

    .product-image-small {
        height: 130px;
    }

    .product-name-small {
        font-size: 0.8rem;
    }

    .product-price-small {
        font-size: 0.9rem;
    }
}

/* ===== CAMBIOS EXCLUSIVOS RESPONSIVE (max-width: 768px) ===== */
@media (max-width: 768px) {

    .logo-container {
        /* 45% del ancho total de la pantalla */
        width: 45vw;
        justify-content: flex-start;
        padding-left: 0.5rem;
    }

    /*.header-titles {
        color: white;
        display: inline;
        font-weight: 400;
        text-shadow: none;
        position: relative;
        animation: mover-texto 10s linear infinite;

    }*/

    /* BANNER: altura 0.88 de la original (30vh * 0.88 = 26.4vh) */
    .carousel-container-full {
        height: 26.4vh;
    }

    /* CATEGORÍA Y SUBCATEGORÍA EN UNA SOLA LÍNEA */
    #page-index .product-card-category,
    #page-index .product-card-subcategory {
        display: inline;
        margin-right: 0.25rem;
    }

    /* CLIENT LOGOS: Reducir tamaño al 75% */
    .logo-slide-circular {
        width: 90px;
        height: 90px;
    }

    .password-container {
        position: relative;
        display: flex;
        align-items: center;
    }

    .password-container input {
        flex: 1;
        padding-right: 40px;
    }

    .toggle-password {
        position: absolute;
        right: 10px;
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
    }

    .password-container {
        position: relative;
        display: flex;
        align-items: center;
    }

    .password-container input {
        flex: 1;
        padding-right: 40px;
    }

    .toggle-password {
        position: absolute;
        right: 10px;
        background: none;
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
    }


}

/* Botones sociales */
.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.google-login {
    background-color: #db4437;
    color: white;
}

.google-login:hover {
    background-color: #c23321;
}

.facebook-login {
    background-color: #1877f2;
    color: white;
}

.facebook-login:hover {
    background-color: #1157c0;
}

/* Línea divisoria */
.divider {
    text-align: center;
    margin: 1rem 0;
    font-weight: 600;
    color: #999;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ccc;
    position: absolute;
    top: 50%;
    width: 40%;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Badges y mensajes flash (Dashboard) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.65rem;
}

th {
    padding: 2px;
    border: 1px solid #1220596e;
    border-bottom: 1px solid #12205953;
    text-align: center;
    color: white;
    font-weight: 600;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    height: 40px;
}

td {
 padding: 2px;
    border: 1px solid #12205953;
    border-bottom: 1px solid #0000006d;
    text-align: center;
    background: white;
}

.status-btn {
    border: none;
    display: inline;
}

.btn-action {
    border: outset;
    padding: 5px;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px;
}

.btn-check {
    background: #28a745;
    color: white;
}

.btn-cross {
    background: #dc3545;
    color: white;
}



.badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.80rem;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-pendiente {
    background-color: #f7ff07;
    color: #333;
}

.badge-aprobado {
    background: rgb(14, 125, 90);
    color: #ffffff;
}

.badge-info {
    background: #2b00ff;
}

.badge-observado {
    background: #dc3545;
}

.badge i {
    margin-right: 4px;
}

.flash-message {
    font-size: 0.95rem;
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-top: 12px;
    margin-bottom: -12px;
    width: auto;
}

.flash-success {
    background: linear-gradient(132deg, #2ecc71, #275aae);
    color: #ffffff;
    margin: 80px 45px -80px;
}

@media (max-width: 768px) {
    .flash-success {
        margin: 110px 10px -105px;
    }

    .flash-message {
        font-size: 0.85rem;
        padding: 10px 10px;
    }
}

.flash-error {
    background: linear-gradient(90deg, #ff6b6b, #e63946);
    color: #3a0a0a;
}

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    margin: 5px;
    padding: 10px;
    align-items: center;
}



/* =========================================
   ESTILOS DEL DASHBOARD (USUARIO.PHP)
   ========================================= */

/* Estilo del usuario logueado en el Header */
.user-logged-in {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 30px;
}

.user-avatar-small {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-white);
}

.user-info-header {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.user-info-header span {
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 500;
}

.user-info-header a {
    color: #ffcfcf;
    font-size: 0.75rem;
    text-decoration: none;
}

.user-info-header a:hover {
    text-decoration: underline;
}

/* Estructura Principal Dashboard */
.dashboard-main {
    background-color: var(--color-gray-light);
    padding: 40px 20px;
    min-height: 70vh;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* Sidebar */
.dashboard-sidebar {
    background: var(--color-white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.profile-img-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.profile-img-wrapper img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary);
}

.edit-photo-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--color-primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.rol-badge {
    background: var(--color-secondary);
    color: var(--color-dark);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
}

.dashboard-menu {
    list-style: none;
    margin-top: 30px;
    text-align: left;
}

.dashboard-menu li {
    margin-bottom: 5px;
}

.dashboard-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--color-gray);
    border-radius: 8px;
    transition: all 0.3s;
}

.dashboard-menu a:hover,
.dashboard-menu a.active {
    background: var(--color-primary);
    color: white;
}

/* Contenido Formulario */
.dashboard-content {
    background: var(--color-white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dashboard-content h2 {
    margin-bottom: 25px;
    color: var(--color-dark);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.btn-save-profile {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 25px;
    font-size: 1rem;
}

.btn-save-profile:hover {
    background-color: #1b7ac0;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}










/* --- ESTILOS PERFIL DE USUARIO --- */

.profile-container {
    max-width: 1450px;
    margin: 20px auto;
    padding: 0 10px;
    min-height: 60vh;
}

.welcome-banner {
    background: radial-gradient(#0addae91, #2393e7c9);
    color: #282a5f;
    padding: 10px;
    font-size: 0.75rem;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    margin-top: 85px;
    width: 100%;
}

@media (max-width: 768px) {
    .welcome-banner {
        margin-top: 107px;
        font-size: 0.65rem;
    }
}

.welcome-banner span {
    color: white;
    margin: 5px;
}

.role-badge {
    background: #ffc107;
    color: #333;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-top: 10px;
    display: inline-block;
}

/* Grid Layout */
.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    margin-top: 90px;
}

/* Sidebar (Tarjeta Izquierda) */
.profile-card {
    background: radial-gradient(#70b0ff80, #13a0722e);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

@media (max-width: 768px) {
    .profile-card {
        position: relative;
        top: 25px;
        margin-bottom: 20px;
    }
}

.image-upload-container {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 15px;
}

.image-upload-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #f0f0f0;
}

.camera-icon {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: #007bff;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.camera-icon:hover {
    background: #0056b3;
}

.sidebar-menu {
    margin-top: 20px;
    text-align: left;
}

.sidebar-menu a {
    display: block;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: background 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #f0f4f8;
    color: #007bff;
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
}

/* Contenido Principal (Derecha) */
.content-box {
    background: radial-gradient(#70b0ff80, #13a0722e);
    padding: 10px 20px 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
}


.content-box h2 {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
    margin-top: 10px;
    color: #333;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.disabled-input {
    background-color: #f9f9f9;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #ccc;
}

/* Header User Actions */
.user-profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    margin: 5px 0 10px 0;
    font-size: 15px;
    text-align: center;
}

.header-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-logout {
    font-size: 0.8rem;
    color: #dc3545;
    text-decoration: none;
    margin-left: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


/* Estilos para el menú lateral desplegable */
.sidebar-menu .accordion {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-menu .accordion-item {
    margin-bottom: 5px;
}

.sidebar-menu .accordion-button {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-menu .accordion-button:hover {
    background-color: #f0f0f0;
}

.sidebar-menu .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
}

.sidebar-menu .accordion-content.active {
    max-height: 200px;
}

.sidebar-menu .accordion-content a {
    display: block;
    padding: 8px 10px;
    font-size: 0.9rem;
    text-decoration: none;
}

.sidebar-menu .accordion-content a:hover {
    background-color: #eee;
}






/* checks de datos del vendedor*/


.checkbox-group label {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    margin-left: 30px;
    font-size: 0.85rem;

}

.checkbox-group input[type="checkbox"] {
    position: absolute;
    left: -35px;
    height: 20px;
    width: 20px;


}

@media (max-width: 768px) {
    .checkbox-group input[type="checkbox"] {
        height: 17px;
    }
}

.info-publico,
.info-privado {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
    border: 1px solid #ffeeba;
    text-align: center;


}









/* Estados del perfil comercial */
.perfil-estado-box {
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perfil-estado-aprobado {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.perfil-estado-observado {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.perfil-estado-pendiente {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.perfil-estado-pendiente_act {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}




/* Estilos responsivos para el logo -->*/
.logo-circle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 15px 4px #00ffe5, 0 0 25px 8px #00d4ff44;
    transition: transform .2s ease;
}

.logo-circle:hover {
    transform: scale(1.05);
}

.logo-circle.placeholder {
    background: #111;
    color: #00d4ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

/* Estilos de página de Validadción (perfiles comerciales y productos) */
.validation-container {
    max-width: 1300px;
    margin: 95px auto 20px;
    background: radial-gradient(#70b0ff80, #13a0722e);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(40, 220, 227, 0.94);
}

@media (max-width: 768px) {
    .validation-container {
        margin: 115px 20px 20px;
    }

}

.detail-row {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.detail-label {
    font-weight: bold;
    width: 200px;
    color: #555;
}

.detail-value {
    flex: 1;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-end;
    justify-content: center;
}

@media (max-width: 768px) {
    .action-buttons {
        display: flex;
        gap: 1rem;
        margin-top: 2rem;
        flex-wrap: nowrap;
        flex-direction: column;
    }
}

.btn-approve {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-observe {
    background-color: #ffc107;
    color: #333;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-pending {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}

.btn-cancel {
    background-color: #dc3545;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    display: inline-block;
    text-align: center;
}

textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-top: 10px;
}



/* Filas de detalle */
.detail-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 0rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

.detail-label {
    font-weight: bold;
    color: #555;
    width: auto;
    flex-shrink: 0;
}

.detail-value {
    flex: auto;
}


/* Botones */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.action-buttons button,
.action-buttons a {
    flex: 1 1 150px;
    max-width: 200px;
    text-align: center;
}

/* Responsivo */
@media (max-width: 600px) {
    .detail-row {
        flex-direction: column;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 0.5rem;
    }


    .action-buttons {
        flex-direction: row;
        align-items: stretch;
    }

    .action-buttons button,
    .action-buttons a {
        max-width: 100%;
    }
}


.feedback-box,
.alerta-validacion-producto {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 0.5rem;
    border: 1px solid #ffeeba;
    border-left: 6px solid;
}

















/* Mantener consistencia visual con .filter-section */
.filter-section {
    padding: 10px;
}


/* Estilos para filtros en categorías */
.filters-container {
    background: linear-gradient(135deg, #f5f7fa 0%, #f9fafb 100%);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8ecf1;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.filters-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-header h3::before {
    content: '⚙️';
    font-size: 18px;
}

.btn-clear-filters {
    background: red;
    border: 2px solid white;
    padding: 8px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-clear-filters:hover {
    background: white;
    color: red;
    border: 2px solid red;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1px;
}

.filter-section {
    background: repeating-linear-gradient(152deg, #f7f7f7, transparent 5px);
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.filter-section:hover {
    border-color: #FF6B35;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.1);
}

.filter-section-title {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-section-title::before {
    content: '▸';
    color: #FF6B35;
    font-size: 16px;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    color: #4a5568;
    transition: all 0.2s ease;
    padding: 6px 0;
    user-select: none;
}

.filter-checkbox:hover {
    color: #FF6B35;
}

.filter-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    background: #fff;
}

.filter-checkbox input[type="checkbox"]:hover {
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-checkbox input[type="checkbox"]:checked {
    background: #FF6B35;
    border-color: #FF6B35;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-label {
    font-weight: 500;
    transition: color 0.2s ease;
}

.filter-checkbox input[type="checkbox"]:checked+.filter-checkmark+.filter-label {
    color: #000000;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .filters-container {
        padding: 16px;
        margin-bottom: 24px;
    }

    .filters-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
    }

    .filters-header {
        flex-direction: row;
        align-items: flex-start;
    }

    .btn-clear-filters {
        align-self: flex-end;
    }

    .filter-section {
        padding: 12px;
    }

    .filter-section-title {
        font-size: 12px;
    }

    .filter-checkbox {
        font-size: 12px;
    }

    .filter-checkbox input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-container {
        padding: 12px;
    }
}

/* Layout de categoría con sidebar de filtros */
.category-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: start;
    margin-top: 1rem;
}


/* En pantallas pequeñas el sidebar se apila encima de los productos */
@media (max-width: 900px) {
    .category-layout {
        grid-template-columns: 1fr;
    }

    .filters-aside {
        order: -1;
        /* mostrar filtros arriba del grid (puedes cambiar) */
    }

}



/* Compactar filtros SUBCATEGORÍA y TIPO */
.filter-section {
    padding: 8px;
    /* reducido de 16px */
}

.filter-options {
    gap: 2px;
}

.filter-checkbox {
    padding: 4px 0;
    /* reducido de 6px */
    font-size: 12px;
    /* ya estaba, pero lo dejamos */
}














/* ===== SIDEBAR DE FILTROS (DE CATEGORIAS.HTML) ===== */
.filters-sidebar {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1003;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-top: -47px;
    zoom: 0.85;
}

.filters-sidebar.active {
    left: 0;
    width: min-content;
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 13px 18px 5px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.filters-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 0.25rem 1rem;
}

.btn-close-sidebar {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* BOTÓN FLOTANTE (MÓVIL) */
.btn-open-sidebar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: none;
    /* ✅ esto debe cambiar a `flex` en móvil */
}







/* ===== PC: Sidebar fijo a la izquierda ===== */
@media (min-width: 769px) {

    .btn-open-sidebar,
    .btn-close-sidebar {
        display: none !important;
    }

    .filters-sidebar {
        position: static;
        height: fit-content;
        box-shadow: none;
        border: 1px solid #eee;
        border-radius: 8px;
        margin-bottom: 0rem;
        z-index: 0;
    }

    /* Layout lateral */
    .category-layout {
        display: grid;
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
        align-items: start;
        margin-top: 40px;
    }
}

/* ===== MÓVIL: Botón flotante y sidebar deslizable ===== */
@media (max-width: 768px) {
    .btn-open-sidebar {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        z-index: 1004;
    }

    .filters-sidebar.active {
        left: 0;
    }
}

@media (max-width: 768px) {
    .filters-sidebar {
        display: none;
    }

    .filters-sidebar.active {
        display: flex;
        height: 755px;
        width: 275px;
        background: white;
        margin-top: 150px;
        background: white;
        zoom: 1;
    }
}

@media (max-width: 768px) {
    .btn-open-sidebar {
        position: fixed;
        bottom: 15px;
        right: 20px;
        background: var(--color-primary);
        color: white;
        border: none;
        padding: 12px 18px;
        border-radius: 50px;
        font-size: 0.95rem;
        font-weight: 600;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
        display: flex;
        align-items: center;
        gap: 8px;
        transition: transform 0.2s ease;
    }

    .btn-open-sidebar:hover {
        transform: scale(1.05);
    }


}


/* Corazón favorito marcado */
.product-fav-icon.favorited i {
    color: #e33 !important;
    font-weight: 900;
}



/* Viñeta de advertencia de +Publicar Nuevo Producto */
.lista-validacion {
    list-style: none;
    padding-left: 0;
    margin: 8px 0 0 0;
}

.lista-validacion li {
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lista-validacion .fa-circle-check {
    color: #28a745;
    /* verde check */
    font-size: 0.9em;
}















/* ===== Mi Lista de Compras - Estilos Responsivos ===== */
.carrito-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: whitesmoke;
    border-radius: 10px;
}

.carrito-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.carrito-img-link {
    flex-shrink: 0;
}

.carrito-img-link img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
}

.carrito-info {
    flex: 1;
    min-width: 0;
}

.carrito-info strong {
    font-size: 0.65rem;
    display: block;
    margin-bottom: 4px;
}

.carrito-info small {
    color: #555;
    display: block;
    margin-bottom: 4px;
}

.carrito-price {
    color: #007BFF;
    font-weight: bold;
    font-size: 0.75rem;
}

.carrito-controls {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
}

.carrito-controls label {
    font-size: 0.65rem;
}

.cantidad-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.cantidad-control button {
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.cantidad-control button:hover {
    background: #007BFF;
    color: #fff;
    border-color: #007BFF;
}

.cantidad-control span {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.carrito-subtotal {
    font-size: 0.65rem;
    color: #333;
}

.btn-quitar {
    margin-top: 6px;
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 0.65rem;
}

.btn-quitar:hover {
    text-decoration: underline;
}

.carrito-footer {
    margin-top: 22px;
    padding: 15px;
    background-color: #fafffb;
    border-radius: 0px;
    color: #1d8990;
    text-align: right;
}

.carrito-footer-confirma-compra {
    margin-top: 24px;
    padding: 0px;
    background-color: var(--color-white);
    border-radius: 8px;
    color: white;
    text-align: right;
    box-shadow: 0px 0px 20px cyan;
}

/* ===== Responsividad ===== */
@media (max-width: 600px) {

    .carrito-info strong,
    .product-detail-business,
    .product-detail-category,
    .carrito-price,
    .carrito-subtotal,
    .carrito-controls label,
    .btn-quitar,
    .cantidad-control button {
        font-size: 0.6rem;
    }

    .cantidad-control {
        gap: 0px;
    }

    .cantidad-control button {
        width: 15px;
        height: 18px;
    }
}






/* ===== MIS PEDIDOS REALIZADOS ===== */
.pedidos-realizados-lista {
    margin-top: 20px;
}

.pedido-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.pedido-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pedido-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #333;
}

.pedido-total {
    font-weight: bold;
    color: #007BFF;
}

.pedido-detalles {
    margin-top: 12px;
    padding-left: 16px;
    border-left: 3px solid #007BFF;
    font-size: 0.9rem;
    color: #555;
    display: none;
}

.pedido-detalles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pedido-detalles li {
    margin-bottom: 8px;
}

.btn-toggle-detalles {
    margin-top: 10px;
    font-size: 0.85rem;
    padding: 6px 12px;
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-toggle-detalles:hover {
    background-color: #e0e0e0;
}

/* Responsive */
@media (max-width: 600px) {
    .pedido-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .pedido-item {
        padding: 12px;
    }
}

.pedido-detalles li {
    font-size: 0.75rem;
}


/* ===== ESTILOS UNIFICADOS PARA CATEGORÍAS Y PRODUCTOS RELACIONADOS ===== */

.product-seller,
.product-seller-small {
    font-size: 0.55rem;
    color: #666;
    margin: 2px 0;
    padding: 3px 2px 0px;
    border-top: 1px solid #0000001c;
    text-align: left;
}

@media (max-width: 600px) {
    .product-seller-small {
        font-size: 0.45rem;
    }
}


.product-seller a,
.product-seller-small a {
    color: #007BFF;
    font-weight: 500;
    text-decoration: none;
}

.product-seller a:hover,
.product-seller-small a:hover {
    text-decoration: underline;
}

.btn-add-to-cart-grid,
.btn-add-to-cart-small {
    width: 100%;
    background-color: var(--color-primary);
    color: white;
    border: none;
    padding: 5px;
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 0px;
    transition: background-color 0.3s ease;
}

.btn-add-to-cart-grid:hover,
.btn-add-to-cart-small:hover {
    background-color: #1e7ac7;
}

/* Eliminar cualquier rastro de qty-cart-group */
.qty-cart-group,
.qty-cart-group-small {
    display: none !important;
}

.product-seller {
    pointer-events: none;
    /* ❌ desactiva clic en todo el párrafo */
}

.product-seller a {
    pointer-events: auto;
    /* ✅ activa clic solo en el enlace */
}




/* ===== MODAL CARRITO: SCROLL SIEMPRE VISIBLE ===== */

.cart-modal {
    display: flex;
    background: radial-gradient(#0addae91, #2393e7c9);
    flex-direction: column;
    height: 80%;
    /* ← importante */
}

.cart-items-list {
    height: 420px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #f0f0f0;
}

/* Webkit: Chrome, Edge, Safari */
.cart-items-list::-webkit-scrollbar {
    width: 8px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 4px;
}

/* Pie siempre visible */
.cart-footer {
    flex-shrink: 0;
    padding: 1rem 1.5rem;
    border-top: 2px solid #ffffff;
    background: currentColor;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* Ajustes para móvil */
@media (max-width: 768px) {
    .cart-items-list {
        padding: 0.75rem 1rem;
    }

    .cart-footer {
        padding: 0.75rem 1rem;
    }
}




/* Altura igual en todos los formularios*/
select,
input[type="text"],
input[type="number"],
textarea {
    height: 42px !important;
    line-height: 1.2 !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
    width: 100%;
    background-color: var(--color-gray-light);
}

textarea {
    height: auto !important;
    min-height: 42px !important;
}





/* PAUSA CARRUSELES AL HOVER */
.logo-carousel-track:hover,
#featured-products-track:hover,
#random-products-track:hover {
    animation-play-state: paused !important;
}

/* Contenedor relativo para las flechas */
.carousel-wrapper {
    position: relative;
    overflow: hidden;
}

/* Flechas */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    opacity: 0.85;
    transition: opacity .25s;
}

.carousel-wrapper:hover .carousel-arrow {
    opacity: 1;
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}








/* ===== REDUCCIÓN DE TAMAÑO CARROUSELES (0.75) ===== */

/* Aplicamos zoom: esto reduce el tamaño real y físico, 
   haciendo que el JavaScript detecte el tamaño correcto */
#logo-slider,
#featured-products-track,
#random-products-track {
    zoom: 0.65;
}

/* FIX PARA FIREFOX: 
   Firefox es el único que no entiende 'zoom', así que usamos 
   transform solo para él, compensando el ancho. */
@supports (-moz-appearance:none) {

    #logo-slider,
    #featured-products-track,
    #random-products-track {
        transform: scale(0.65);
        transform-origin: left center;
        width: 133.333%;
        /* 100% / 0.75 para recuperar el ancho */
        margin-bottom: -25px;
        /* Ajuste visual opcional */
    }
}










/* Estilos para la sección de pagos */
.payment-methods-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option input {
    display: none;
    /* Ocultamos el radio button real */
}

.option-card {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.option-card i {
    font-size: 24px;
}

/* Efecto cuando está seleccionado */
.payment-option input:checked+.option-card {
    border-color: #007bff;
    background-color: #f0f8ff;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.1);
}

.btn-pay-gateway {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    max-width: 250px;
}

.btn-pay-gateway:hover {
    background: #218838;
}

/* Estilos Billetera */
.wallet-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    background: #fff5f8;
    /* Un tono suave tipo Yape */
    padding: 20px;
    border-radius: 8px;
    border: 1px dashed #d63384;
}

.qr-section,
.upload-section {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.qr-placeholder {
    background: white;
    padding: 15px;
    border-radius: 8px;
    display: inline-block;
    border: 1px solid #ddd;
}

.form-control-file {
    width: 100%;
    padding: 8px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
}

@media (max-width: 600px) {
    .payment-methods-grid {
        grid-template-columns: 1fr;
        /* Una columna en celular */
    }
}




/* Logos de métodos de pago */
.logo-pago {
    height: 30px;
    /* tamaño uniforme */
    margin-right: 8px;
    vertical-align: middle;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15));
    /* leve sombra */
    transition: transform .2s;
}

.logo-pago:hover {
    transform: scale(1.08);
}




.header-titles {
    order: 1;
}

.categories-overview-sticky {
    order: 2;


}

.header-container-grid {
    order: 3;
}

@media (max-width: 768px) {
    .header-container-grid {
        display: flex;
        flex-wrap: wrap;
        height: 120px;
        align-items: center;
        padding-bottom: 10px;
        gap: 5px;
        margin-bottom: 0px;
        margin-top: -25px;
        padding: 5px;

    }

    .categories-overview-sticky {
        display: grid;
        height: auto;
        padding: 5px;
    }

    .logo-container {
        order: 1;
        flex-grow: 1;
        height: auto;
    }

    .user-menu {
        order: 2;
    }

    .favorito-button {
        order: 3;
    }


    .cart-button {
        order: 4;
    }

    .mobile-menu-trigger {
        order: 5;
    }


    .search-container {
        order: 6;
        width: 50%;

    }

    .header-action-btn {
        display: flex;
        gap: 5px;
        width: 65px;
        margin-top: 19px;
    }

}




/* ---------- NUEVO: menú desplegable del perfil ---------- */
.nav-link .fa-heart {
    transition: transform .2s ease, color .2s ease;
}

.nav-link:hover .fa-heart {
    transform: scale(1.2);
    color: #c0392b;
}

/* ---------- NUEVO: menú desplegable del perfil ---------- */
.user-menu {
    position: relative;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
    display: flex;
    flex-direction: row-reverse;
    padding: 5px 15px;
    background: radial-gradient(#0addae91, #2393e7c9);
    border: 2px solid #736e6e;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .user-toggle {
        font-size: 0.85rem;
        gap: 2px;
        padding: 3px 15px;
    }
}

.user-toggle img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

.user-left {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 1px 0 0 #000000;
}

@media (max-width: 768px) {
    .user-left {
        font-size: 0.85rem;
    }
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    display: none;
    min-width: 220px;
    z-index: 999;
}

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

.user-dropdown .sidebar-menu {
    display: flex;
    flex-direction: column;
    padding: .5rem 0;
    margin-top: 0px;
    background: radial-gradient(#70b0ff80, #13a0722e);
}

.user-dropdown .sidebar-link {
    padding: .55rem .9rem;
    font-size: .9rem;
}


.user-dropdown .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.user-dropdown .accordion-content.active {
    max-height: 500px;
    /* suficiente para todo el submenú */
}


/* ---------- ESTILOS DEL DROPDOWN CON ACORDEÓN ---------- */
.user-dropdown {
    max-height: 80vh;
    overflow-y: auto;
    padding-right: 0;
}

.user-dropdown .accordion-button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #333;
}

.user-dropdown .accordion-button::after {
    content: "\f107";
    /* chevron-down de FontAwesome */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.3s ease;
}

.user-dropdown .accordion-button.open::after {
    transform: rotate(180deg);
}

.user-dropdown .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 1rem;
}

.user-dropdown .accordion-content.active {
    max-height: 500px;
}





/* Botón de invitado: Iniciar Sesión */
.guest-box {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .8rem;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    color: var(--text-light);
    font-size: .75rem;
    cursor: pointer;
    transition: border-color .25s, box-shadow .25s;
}

.guest-box:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(39, 146, 227, .20);
}

.guest-box i {
    font-size: 1.05rem;
}












@media (max-width: 768px) {

    /* ---------- 1.  HEADER GLOBAL MÓVIL ---------- */
    .header {
        height: auto;
        /* deja que el contenido defina altura */
        box-shadow: 0 2px 6px rgba(0, 0, 0, .10);
    }

    /* ---------- 2.  BARRA DE TÍTULO ANIMADA ---------- */
    .header-titles {
        height: 1.25rem;

    }

    #site-title {
        font-size: 0.7rem;
        padding: 2px 0;
    }

    /* ---------- 3.  GRID MÓVIL (2 FILAS) ---------- */
    .header-container-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-areas:
            "logo logo logo user user user"
            "menu cart fav search search search";
        gap: 2px;
        padding: 0.5rem 0.25rem;
        height: auto;
        width: auto;
        justify-content: center;
        margin-top: -5px;
        align-items: center;
    }


    /* ---------- 4.  ASIGNACIÓN DE ÁREAS ---------- */
    .logo-container {
        grid-area: logo;
        justify-self: start;
    }

    .user-menu {
        grid-area: user;
    }

    .favorito-button {
        grid-area: fav;
    }

    .cart-button {
        grid-area: cart;
    }

    .mobile-menu-trigger {
        grid-area: menu;
    }

    .search-container {
        grid-area: search;
        width: 115%;
        max-width: none;
    }

    /* ---------- 5.  LOGO ---------- */
    #main-logo {
        margin: 0;
    }

    /* ---------- 6.  SEARCH ---------- */
    #search-input {
        height: 38px;
        font-size: .9rem;
        padding-right: 2.5rem;
    }

    #search-button {
        height: 38px;
        width: 38px;
        font-size: .9rem;
        left: -40px;
    }

    /* ---------- 7.  BOTONES DE ACCIÓN ---------- */
    .header-action-btn {
        padding: .4rem;
        margin: 0;
        width: auto;
        justify-content: center;

    }

    /* Ajuste del badge del carrito */
    .cart-count-badge {
        top: -10px;
        right: 5px;
        font-size: .6rem;
        width: 20px;
        height: 20px;
        position: relative;
    }

    /* ---------- 8.  MENÚ MÓVIL ---------- */
    #mobile-menu {
        top: 157px;
        /* ya lo tenías, lo respetamos */
    }

    /* ---------- 9.  CATEGORÍAS STICKY (opcional) ---------- */
    .categories-overview-sticky {
        font-size: 0.85rem;

    }
}






.close-welcome {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    z-index: 10;
}




/* BIENVENIDA DEL LOGEO */
/* FONDO OSCURO DETRÁS */
.welcome-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* BANNER CENTRADO */
.welcome-banner {
    position: relative;
    background: radial-gradient(#0addae91, #2393e7c9);
    color: #282a5f;
    padding: 30px 40px;
    border-radius: 12px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* BOTÓN CIERRE */
.close-welcome {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    line-height: 1;
}














/* =========================================
   NUEVO LAYOUT: MI LISTA DE COMPRAS (2 COLUMNAS)
   ========================================= */

.cart-layout-grid {
    display: grid;
    /* Columna 1 (Lista): Flexible (1fr) | Columna 2 (Acciones): Fijo (360px) */
    grid-template-columns: 1fr 0.8fr;
    gap: 15px;
    /* Espacio entre columnas */
    align-items: start;
    /* Para que la columna derecha no se estire hacia abajo si la lista es larga */
    margin-top: 5px;
}

/* Ajustes para el contenedor de acciones (Derecha) */
#carrito-acciones {
    /* Quitamos márgenes inline previos y aseguramos que se vea como una tarjeta limpia */
    margin-top: 0 !important;
    position: sticky;
    /* Opcional: Hace que el resumen te siga al hacer scroll */
    top: 90px;
    /* Distancia desde arriba si usas sticky */
    background: white;
    padding: 15px;
    border-radius: 10px;
}

/* RESPONSIVE: En móviles y tablets pequeñas vuelve a 1 columna */
@media (max-width: 1100px) {
    .cart-layout-grid {
        grid-template-columns: 1fr;
    }

    #carrito-acciones {
        position: static;
        /* Quita el sticky en móvil */
    }
}


/* =========================================
   Vendedor con estado pendiente_act 
   ========================================= */
.btn-disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
}








/* =========================================
   DISEÑO PROFESIONAL FICHA PRODUCTO
   ========================================= */
.opcion-tag {
    display: inline-block;
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 2px;
    margin-right: 4px;
    border: 1px solid #e0e0e0;
}

.discount-badge {
    background: #ff5252;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    width: 60px;
    position: relative;
    right: -170px;
    top: 10px;
    z-index: 100;
}

/* 1. Contenedor y Migas de Pan (Breadcrumbs) */
.product-detail-container {
    max-width: 1450px;
    display: grid;
    grid-template-columns: 1fr;
    margin: 90px auto 10px;
    padding: 30px 20px;
    font-family: 'Poppins', sans-serif;
}

.pro-breadcrumbs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pro-breadcrumbs a {
    color: #666;
    text-decoration: none;
    transition: 0.2s;
}

.pro-breadcrumbs a:hover {
    color: var(--color-primary);
}

.pro-breadcrumbs span {
    color: var(--color-primary);
    font-weight: 600;
}

.pro-breadcrumbs i.fa-chevron-right {
    font-size: 0.7rem;
    color: #ccc;
}

/* 2. Layout Principal (Grid 2 Columnas) */
.pro-main-grid {
    display: grid;
    grid-template-columns: 55% 40%;
    /* Imagen más grande, info a la derecha */
    gap: 5%;
    margin-bottom: 5px;
}

/* 3. Columna Izquierda: Galería */
.pro-gallery-wrapper {
    position: relative;
}

.pro-main-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    background: #fff;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px;
    /* Altura fija para que se vea ordenado */
}

.pro-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Los botones de corazón y compartir flotantes (reutilizamos tus estilos pero posicionados) */
.pro-overlay-btns {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

/* Reutilizamos clases de tus tarjetas para que funcione el JS */
.pro-overlay-btns .card-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #333;
    transition: all 0.2s ease;
}

.pro-overlay-btns .card-btn:hover {
    transform: scale(1.1);
    color: var(--color-danger);
}

/* Miniaturas */
.pro-thumbnails {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
}

.pro-thumb {
    border: 1px solid #eee;
    border-radius: 8px;
    height: 100px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.7;
    transition: 0.2s;
}

@media (max-width: 768px) {
    .pro-thumb {
        height: 70px;
    }

    .pro-thumbnails {
        height: auto;
        gap: 5px;
    }
}

.pro-thumb:hover {
    opacity: 1;
    border-color: var(--color-primary);
}

.pro-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 4. Columna Derecha: Información */
.pro-info-col {
    padding-top: 5px;
    margin-top: -50px;
}

@media (max-width: 768px) {
    .pro-info-col {
        margin-top: 0px;
    }
}

.pro-badge-new {
    background-color: var(--color-secondary);
    /* Celeste suave */
    color: #000;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.pro-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.2;
}

.pro-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.pro-stars {
    color: #f1c40f;
}

.pro-stock {
    color: var(--color-success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Precios */
.pro-price-box {
    display: flex;
    align-items: baseline;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.pro-price-current {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pro-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 1.2rem;
}

.pro-discount-tag {
    background: #ffebeb;
    color: var(--color-danger);
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Selectores */
.pro-selectors {
    margin: 5px;
    display: flex;
    gap: 5px;
    justify-content: space-around;
    align-items: flex-end;
}

.pro-sel-group {
    margin-bottom: 15px;
}

.pro-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #444;
    text-align: center;
}

.pro-select-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.95rem;
    background: #fff;
}

.pro-file-upload {
    border: 2px dashed #ccc;
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    background: #fafafa;
    color: #666;
    transition: 0.2s;
}

.pro-file-upload:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #f0f8ff;
}

/* Botones Compra */
.pro-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.pro-qty-box {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 120px;
}

.pro-qty-btn {
    width: 35px;
    height: 50px;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.pro-qty-val {
    flex: 1;
    text-align: center;
    border: none;
    font-weight: 600;
    font-size: 1.1rem;
    outline: none;
}

.pro-btn-cart {
    flex: 1;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
}

.pro-btn-buy {
    flex: 1;
    background: #27e3c9;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 146, 227, 0.3);
    transition: 0.2s;
}

.pro-btn-buy:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 146, 227, 0.4);
}

/* Confianza */
.pro-trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 5px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.pro-trust-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.pro-trust-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.pro-trust-text {
    font-size: 0.75rem;
    color: #555;
    font-weight: 500;
}

/* Acordeón */
.pro-accordion {
    margin: 15px 10px 25px;
}

@media (max-width: 1200px) {
    .pro-accordion {
        margin: 20px 5px 15px;
    }
}

.pro-accordion-item {
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.pro-accordion-header {
    padding: 7px 0;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    color: #333;
}

.pro-accordion-content {
    display: none;
    padding-bottom: 5px;
    color: #666;
    line-height: 1.6;
    margin-left: 15px;
}

/* Responsive móvil */
@media (max-width: 900px) {
    .pro-main-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .pro-main-image {
        height: 350px;
    }

    .pro-actions {
        flex-direction: column;
    }

    .pro-qty-box {
        width: 100%;
        margin-bottom: 10px;
    }

    .pro-btn-cart,
    .pro-btn-buy {
        padding: 15px;
    }
}



/*.reviews-container {
    display: flex;
    justify-content: space-around;

}*/




/* =========================================
   SECCIÓN DE OPINIONES (Reviews)
   ========================================= */

/* Contenedor Principal */
.reviews-section {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 0 15px;
    font-family: 'Poppins', sans-serif;
}

.reviews-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px;
    color: var(--color-dark);
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

.reviews-container {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

/* --- COLUMNA IZQUIERDA: RESUMEN --- */
.review-summary {
    flex: 0 0 400px;
    /* Ancho fijo para el resumen */
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
}

.average-rating {
    font-size: 3.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    text-align: center;
}

/* Barras de progreso de estrellas */
.rating-bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: #666;
}

.rating-bar-row span:first-child {
    width: 35px;
    /* Espacio para "5 ★" */
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bar-container {
    flex: 1;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin: 0 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background-color: #f1c40f;
    /* Color amarillo estrella */
    border-radius: 4px;
    transition: width 0.5s ease-in-out;
}

/* --- COLUMNA DERECHA: LISTA DE COMENTARIOS --- */
.review-list {
    flex: 1;
    /* Ocupa el resto del espacio */
}

.review-card {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 20px;
    margin-bottom: 10px;
}

.review-card:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reviewer-name {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
}

.review-date {
    font-size: 0.85rem;
    color: #999;
}

.review-text {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    margin-top: 10px;
}

/* --- RESPONSIVE (Móviles) --- */
@media (max-width: 768px) {
    .reviews-container {
        flex-direction: column;
        /* Apilar uno sobre otro */
        gap: 30px;
    }

    .review-summary {
        width: 100%;
        /* Ocupar todo el ancho */
        flex: none;
    }
}


/* --- NUEVOS ESTILOS PARA REVIEW CON FOTO Y BOTÓN --- */
.review-list-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    /* Círculo perfecto */
    object-fit: cover;
    border: 2px solid #f0f0f0;
}

.reviewer-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.reviewer-name {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
    line-height: 1.2;
}

/* Botón Ver Todos */
.btn-show-all {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background-color: transparent;
    border: 2px solid var(--color-primary);
    /* Usa tu variable de color */
    color: var(--color-primary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-show-all:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* Transición suave al cargar más comentarios */
#review-list-content {
    transition: opacity 0.2s ease-in-out;
}


/* Estilos para Reviews con Avatar */
.review-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    /* Asegura que la imagen no se deforme */
    border: 1px solid #ddd;
}

.reviewer-meta {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-weight: 700;
    font-size: 1rem;
    color: #333;
}

.mini-stars {
    font-size: 0.8rem;
    color: #f1c40f;
}

.btn-show-all {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background: transparent;
    border: 2px solid #2792e3;
    /* Tu color primario */
    color: #2792e3;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-show-all:hover {
    background: #2792e3;
    color: #fff;
}



/* clase que saca la animación PARA EL FUNCIONAMIENTO DE LAS FLECHAS */
.no-animation {
    animation: none !important;
}

/* Mata la animación CSS cuando JS lo pida */
.logo-carousel-track.no-animation,
.product-carousel-track.no-animation {
    animation: none !important;
}











/* =========================================
   Estilos para filtros de cascada EN CATEGORIAS.PHP
   ========================================= */
.filter-radio {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 0px 3px 10px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #555;
}

.filter-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #2792e3;
    cursor: pointer;
}

.filter-radio input[type="radio"]:checked+.filter-checkmark+.filter-label {
    color: #2792e3;
    font-weight: 600;
}

/* Estilos para precio */
.filter-price-range {
    padding: 2px 15px;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.price-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.price-input-group label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.price-input-group input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    width: 75px;
}

.price-slider-container {
    position: relative;
    height: 15px;
    margin-bottom: 5px;
}

.price-range {
    position: absolute;
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.price-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #2792e3;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 10px;
}

.btn-apply-price {
    width: 100%;
    padding: 12px;
    background: #2792e3;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-price:hover {
    background: #1a6cb3;
    transform: translateY(-2px);
}

/* Filtros especiales */
#filter-descuento:checked+.filter-checkmark {
    background: #ff6b6b;
    border-color: #ff6b6b;
}

#filter-nuevos:checked+.filter-checkmark {
    background: #ffd93d;
    border-color: #ffd93d;
}



/* Agrega esto a tu CSS */

.filter-section {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 10px;
}


/* =========================================
   ESTILOS CONSOLIDADOS DEL ACORDEÓN DE FILTROS
   ========================================= */

/* Botón del acordeón */
.filter-accordion {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 700;
    color: #2d3748;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.filter-accordion:hover {
    background: rgba(255, 107, 53, 0.06);
    color: #FF6B35;
}

/* Icono de flecha */
.filter-accordion .filter-accordion-icon {
    font-size: 14px;
    transform: rotate(0deg);
    transition: transform 0.25s ease;
}

/* Rotación cuando está expandido (usando clase 'open' del JS) */
.filter-accordion.open .filter-accordion-icon {
    transform: rotate(180deg);
}

/* Contenido del acordeón - SIEMPRE colapsado por defecto */
.filter-accordion-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
    max-height: 0 !important;
    /* Forzar colapsado inicial */
    margin-top: 4px;
}

/* CUANDO el JS aplica la clase 'open' al botón, 
   el contenido hermano siguiente se expande */
.filter-accordion.open+.filter-accordion-content {
    max-height: 1000px !important;
    /* Valor suficientemente grande */
}

/* Opciones dentro del acordeón */
.filter-options {
    padding-bottom: 2px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Checkbox y radio estilizados */
.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0 4px 10px;
    cursor: pointer;
    font-size: 0.75rem;
    color: #555;
    transition: all 0.2s ease;
}

.filter-checkbox:hover,
.filter-radio:hover {
    color: #2792e3;
    background: rgba(39, 146, 227, 0.05);
    border-radius: 4px;
}

.filter-checkbox input[type="checkbox"],
.filter-radio input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #2792e3;
    cursor: pointer;
    flex-shrink: 0;
}

/* Label activo cuando está checked */
.filter-checkbox input:checked~.filter-label,
.filter-radio input:checked~.filter-label {
    color: #2792e3;
    font-weight: 600;
}

/* Checkmark visual (opcional) */
.filter-checkmark {
    display: none;
    /* Ocultamos el checkmark por defecto, usamos el nativo */
}

/* =========================================
   FIN ESTILOS ACORDEÓN
   ========================================= */















/* --- ESTILOS NUEVOS PARA INDEX MEJORADO --- */
/* 1. Comprar por Categoría (Grid de Botones) */
.home-categories-section {
    padding: 0.5rem 3%;
    background: radial-gradient(#0addae91, #2393e7c9);
    text-align: center;
    margin: 5px 0;
    zoom: 0.95;
}

.home-categories-grid {
    gap: 1rem;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    justify-content: center;
}

@media (max-width: 768px) {
    .home-categories-section {
        zoom: 0.7;
    }

    .home-categories-grid {
        justify-content: flex-start;
    }
}


.cat-btn {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 1rem 0.25rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 110px;
    flex: 0 0 110px;
    width: 100%;
    scroll-snap-align: start;
    justify-content: center;
}

.cat-btn:hover {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
    transform: translateY(-3px);
}

.cat-btn i {
    font-size: 2rem;
    color: var(--color-primary);
}

.cat-btn span {
    font-weight: 600;
    color: var(--color-dark);
    font-size: 0.75rem;
}

/* 2. Ofertas Especiales (Fondo destacado) */
.special-offers-section {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    padding: 0.5rem 2%;
    margin: 0.5rem 0;
    border-radius: 0;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0.5rem;
}

.btn-ver-todos {
    background: var(--color-danger);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.btn-ver-todos:hover {
    background: #c82333;
}

/* 3. Grids de Productos (Novedades, Calificados, etc.) */
.product-grid-section {
    padding: 1rem 1%;
    margin-bottom: 0.5rem;
    zoom: 0.6;
    background: linear-gradient(135deg, #667eea 0%, #4ba290 100%);
}

.grid-layout-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 0.5rem;
    padding: 2.5rem 0.5rem;
}

/* Reutilizamos la tarjeta de producto, pero aseguramos que ocupe el ancho */
.grid-layout-products .product-card {
    min-width: unset;
    /* Quitar ancho fijo del carrusel */
    width: 100%;
}

/* Títulos con estilo */
.section-title-decor {
    font-size: 1.2rem;
    color: var(--color-dark);
    position: relative;
    display: inline-block;
    margin-bottom: 5px;
}

.section-title-decor::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin-top: 5px;
}

.btn-load-more {
    display: inline-block;
    margin: 1.2rem auto 0;
    padding: .6rem 1.4rem;
    background: var(--color-primary);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background .25s;
}

.btn-load-more:hover {
    background: var(--color-primary-dark);
}





/* =========================================
/* MODAL DEL CARRITO - DISEÑO PROFESIONAL */


.cart-modal {
    max-width: 500px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.cart-header {
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    height: 50px;
}

.cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-items-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0;
    background: #f8f9fa;
}

/* Estado vacío */
.cart-empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
}

.cart-empty-message {
    font-size: 1.1rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Item Moderno */
.cart-item-modern {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    position: relative;
}

.cart-item-modern:hover {
    background: #fafbfc;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fff;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    /* Para ellipsis */
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.cart-item-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #bdc3c7;
    cursor: pointer;
    padding: 4px;
    font-size: 1.2rem;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    display: none;
}

.cart-item-remove:hover {
    color: #e74c3c;
    background: #fdeaea;
    transform: scale(1.1);
}

/* Precios */
.cart-item-pricing {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 800;
    color: #2c3e50;
}

.price-original {
    font-size: 0.9rem;
    color: #95a5a6;
    text-decoration: line-through;
    font-weight: 500;
}

.price-discount-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
}

/* Footer del item: cantidad y subtotal */
.cart-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

/* Controles de cantidad */
.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 36px;
    width: 80px;
}

.qty-btn-modal {
    width: 36px;
    height: 100%;
    border: none;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 1.1rem;
    color: #555;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
}

.qty-btn-modal:hover {
    background: #e9ecef;
    color: #2c3e50;
}

.qty-btn-modal:active {
    background: #dee2e6;
}

.qty-input-modal {
    width: 40px;
    height: 100%;
    border: none;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    background: #fff;
    pointer-events: none;
}

/* Subtotal del item */
.cart-item-subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.subtotal-label {
    font-size: 0.75rem;
    color: #7f8c8d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.subtotal-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #27ae60;
}

/* SECCIÓN DE TOTALES */
.cart-totals-box {
    background: #f8f9fa;
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.totals-title {
    margin: 0 0 16px 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.totals-row.discount {
    color: #e74c3c;
    font-weight: 500;
}

.totals-row.grand-total {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 2px solid #dee2e6;
    font-size: 1.15rem;
    font-weight: 800;
    color: #2c3e50;
}

.totals-label {
    color: #5a6c7d;
}

.totals-value {
    font-weight: 600;
    color: #2c3e50;
}

.totals-row.discount .totals-value {
    color: #e74c3c;
    font-weight: 700;
}

/* Footer y botón */
.cart-footer {
    padding: 10px 20px;
    background: #fff;
    display: flex;
    gap: 12px;
    flex-direction: row;
    zoom: 0.75;
}

.btn-checkout {
    width: 100%;
    padding: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-continue-shopping {
    width: 30%;
    padding: 12px;
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-continue-shopping:hover {
    background: #667eea;
    color: white;
}

/* Scrollbar personalizada */
.cart-items-list::-webkit-scrollbar {
    width: 6px;
}

.cart-items-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.cart-items-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.cart-items-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}





/* =========================================
   ESTILOS -  Estilos para los botones toggle y Layout de dos columnas 
   ========================================= */
/* Contenedor padre - dos columnas */
.dual-blocks-container {
    display: flex;
    gap: 2rem;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
}

/* Cada bloque ocupa 50% */
.toggle-block {
    flex: 1 1 50%;
    max-width: 50%;
    background: radial-gradient(#0addae91, #2393e7c9);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Fondo diferente para el segundo bloque */
.toggle-block:nth-child(2) {
    background: linear-gradient(178deg, #2ecc71, #274eae);
}

/* Header con botones centrados */
.toggle-header {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones toggle */
.toggle-btn {
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #666;
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.toggle-btn:hover {
    border-color: #3498db;
    color: #3498db;
}

.toggle-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

/* Grid de productos - 3 columnas x 3 filas = 9 cards */
.grid-layout-products {
    display: none;
    /*grid-template-columns: repeat(3, 1fr);*/
    gap: 1rem;
}

.grid-layout-products.active-grid {
    display: flex;
    zoom: 0.65;
    flex-wrap: wrap;
}

/* Contenedor del botón cargar más */
.load-more-container {
    text-align: center;
    margin-top: -1rem;
}

.btn-load-more {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-load-more:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Responsive: en móvil se apilan */
@media (max-width: 992px) {
    .dual-blocks-container {
        flex-direction: column;
        padding: 0.5rem;
        gap: 15px;
    }

    .toggle-block {
        flex: 1 1 100%;
        max-width: 100%;
        zoom: 0.65;
    }

    .grid-layout-products.active-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-layout-products.active-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .toggle-btn {
        font-size: 0.8rem;
        padding: 0.5rem 0.8rem;
    }
}

/* =========================================
   FIN -  Estilos para los botones toggle y Layout de dos columnas 
   ========================================= */





.alert-banner.alert-warning {
    text-align: center;
    background: #ffcdcd;
    border-left: 8px solid #ffc107;
    padding: 16px;
    margin: 76px 45px -80px;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .alert-banner.alert-warning {
        font-size: 0.9rem;
        padding: 12px;
        margin: 110px 10px -110px;
    }
}



.favorites-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 15px;
    padding: 20px;

    /*display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;*/
}

@media (max-width: 768px) {
    .favorites-grid {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap;
    margin-top: 20px;
    overflow: auto;
    padding: 0;
    }
}


/* ===== FIN DE ESTILOS ===== */