/* Reset y box-sizing global */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Barra superior */
.top {
    background-color: #000;
    color: #fff;
    height: 48px;
    width: 100vw;
    min-width: 100%;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-family: 'Segoe UI', 'Arial Rounded MT Bold', Arial, sans-serif;
    font-weight: 700;
}

.cajita {
    fill: #fff;
    width: 30px;
    height: 30px;
    display: inline-block;
    vertical-align: middle;
}

.bienvenida-con-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 100%;
    justify-content: center;
}

.top-redes {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
}

.top-redes a img {
    filter: brightness(0) invert(1);
    transition: filter 0.2s;
}

.top-redes a:hover img {
    filter: brightness(0) invert(0.7) sepia(1) hue-rotate(-20deg) saturate(5);
}

/* Header principal alineado horizontalmente */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 25px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header > div:first-child {
    display: flex;
    align-items: center;
}

.header img {
    height: 48px;
    width: auto;
    display: block;
    border-radius: 50%;
}

.header h1 {
    flex: 1;
    text-align: center;
    font-family: 'Signika', 'Segoe UI', Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #222;
}

.carrito {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 50px;
    position: relative;
}

.carrito:hover {
    transform: scale(1.1);
    transition: transform 0.2s;
}

.carrito:hover img {
    filter: brightness(0) saturate(100%) invert(54%) sepia(94%) saturate(753%) hue-rotate(1deg) brightness(103%) contrast(103%);
    transition: filter 0.3s;
}

.carrito img {
    height: 40px;
    width: 40px;
    object-fit: contain;
    margin-left: 0;
    margin-right: 0;
    display: block;
}

/* Carrito Modal */
#modal-carrito {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ocultar modal si está en display:none */
#modal-carrito[style*="display: none"] {
    display: none !important;
}

/* Contenido del modal */
.modal-carrito-contenido {
    background: #fff;
    max-width: 400px;
    width: 90vw;
    padding: 24px 16px 16px 16px;
    border-radius: 16px;
    position: relative;
    box-shadow: 0 4px 32px rgba(0,0,0,0.15);
}

.modal-carrito-contenido h2 {
    background: #000000;
    color: #fff;
    font-size: 1.18rem;
    font-weight: 500;
    border-radius: 10px;
    padding: 8px 0;
    margin: 5px auto 15px auto;
    text-align: center;
    letter-spacing: 1px;
    box-shadow: 0 2px 12px rgba(255,102,0,0.10);
    width: 60%;
    max-width: 260px;
    min-width: 140px;
    display: block;
}

/* Botón cerrar */
.cerrar-carrito {
    position: absolute;
    top: 8px; right: 12px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Items del carrito */
#carrito-items > div {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

#carrito-items img {
    width: 40px; height: 40px;
    object-fit: contain;
    margin-right: 8px;
}

#carrito-items button {
    margin-left: 8px;
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 2px 8px;
    cursor: pointer;
}

/* Total del carrito */
#carrito-total {
    margin: 16px 0;
    font-weight: bold;
}

/* Botón vaciar carrito */
.btn-vaciar {
    background: transparent;
    color: #ff6600;
    border: 1.5px solid #ff6600;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    transition: all 0.3s;
    width: auto;
}

.btn-vaciar:hover {
    background: #ff6600;
    color: white;
}

/* boton comprar*/
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    width: 100%;
    transition: background 0.3s;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

.btn-whatsapp img {
    width: 24px;
    height: 24px;
}

/* Badge del carrito */
#carrito-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ff6600;
    color: #fff;
    border-radius: 100%;
    font-size: 15px;
    padding: 2px 6px;
}

/* --- SLIDER PARA MÓVIL --- */
.slider {
    position: relative;
    width: 95vw;
    max-width: 95vw;
    height: 180px;
    margin: 20px auto 0 auto;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slide {
    width: 100%;
    height: 180px;
    left: 0;
    top: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    opacity: 0;
    transition: opacity 0.8s;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    z-index: 1;
    display: block;
    margin: 0 auto;
}

/* Flechas */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    color: #fff;
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    cursor: pointer;
    z-index: 2;
    user-select: none;
    border: none;
    outline: none;
}

.arrow-left { left: 8px; }
.arrow-right { right: 8px; }

.arrow:hover {
    background: rgba(0,0,0,0.7);
}

/* Radio buttons ocultos */
input[name="slider"] {
    display: none;
}

/* Mostrar la slide correspondiente */
#slide1:checked ~ .slider .slide1,
#slide2:checked ~ .slider .slide2,
#slide3:checked ~ .slider .slide3 {
    opacity: 1;
    position: relative;
    z-index: 2;
}

/* Botones de navegación */
.slider-nav {
    text-align: center;
    margin-top: 12px;
}

.slider-nav label {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #bbb;
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: background 0.3s;
}

#slide1:checked ~ .slider-nav label[for="slide1"],
#slide2:checked ~ .slider-nav label[for="slide2"],
#slide3:checked ~ .slider-nav label[for="slide3"] {
    background: #222;
}

/* Filtro de categorías */
.filtro {
    flex: 1;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    padding: 24px 0;
    margin-left: 20px;
    margin-right: 20px;
    scrollbar-width: auto;
    scrollbar-color: #111 #000000;
    justify-content: flex-start;
    align-items: center;
    scroll-behavior: smooth;
    position: relative;
}

.filtro .item {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
    height: 170px;
    min-height: 170px;
    max-height: 170px;
}

.filtro::-webkit-scrollbar {
    height: 12px;
    background: #222;
}

.filtro::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 6px;
}

.filtro {
    scrollbar-color: #ff6600 #222;
    scrollbar-width: thick;
    position: relative;
}

/* Ocultar categorías específicas */
.filtro [data-categoria="microfono"],
.filtro [data-categoria="audifonos"],
.filtro [data-categoria="ram"] {
    display: none;
}

/* Estilo de los elementos del filtro */
.item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-width: 160px;
    max-width: 180px;
    flex: 0 0 auto;
    text-align: center;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #111;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.item img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    margin-bottom: 10px;
}

.item h3 {
    font-size: 1rem;
    margin: 0;
    color: #222;
}

.filtro .item:hover {
    border-color: #ff6600;
    box-shadow: 0 4px 16px rgba(255,102,0,0.10);
    background: #fff7f0;
}

/* Flechas del filtro */
.filtro-nav-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 32px;
    height: 32px;
    background: rgba(255, 102, 0, 0.75);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    transition: background 0.2s, color 0.2s;
    user-select: none;
    border: none;
}

.filtro-arrow-left {
    left: 16px;
    background: rgba(255, 102, 0, 0.45) !important;
}

.filtro-arrow-right {
    right: 16px;
    background: rgba(255, 102, 0, 0.45) !important;
}

/* productos */
.productos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 6px;
    background: #fafafa;
}

.producto {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 18px 12px 22px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #eee;
    transition: box-shadow 0.2s, border 0.2s;
}

.producto:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.10);
    border: 2px solid #ff6600;
}

.producto img {
    width: 80%;
    height: auto;
    object-fit: contain;
    margin-bottom: 12px;
    max-width: 190px;
    min-width: 190px;
    max-height: 190px;
    min-height: 190px;
}

.producto h4 {
    font-size: 1.08rem;
    margin: 0 0 8px 0;
    color: #222;
    text-align: center;
}

.precio {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ff6600;
    margin-bottom: 12px;
}

.btn-carrito {
    background: #ff6600;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 18px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-carrito:hover {
    background: #ff8800;
    transform: scale(1.1);
}

.btn-comprar-ahora {
    background: #ff6600;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    width: 70%;
    max-width: 250px;
    transition: background 0.3s, transform 0.2s;
}

.btn-comprar-ahora:hover {
    background: #ff8800;
    transform: scale(1.05);
}

/* footer */
.footer-accordion {
    width: 100%;
    max-width: 400px;
    margin: 0 auto 18px auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.accordion-item {
    width: 100%;
}

.accordion-title {
    width: 100%;
    height: 100px;
    background: #fff;
    color: #111;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    outline: none;
    padding: 0 32px 0 12px;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, border-bottom 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-bottom: 2.5px solid #bdbdbd;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 2px 8px rgba(180,180,180,0.10);
}

.accordion-arrow {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-left: auto;
    margin-right: 0;
    transition: transform 0.3s cubic-bezier(.4,2,.6,1), background-color 0.2s;
    background: none;
    border: none;
    mask: url('data:image/svg+xml;utf8,<svg fill="black" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6z"/></svg>') center/contain no-repeat;
    background-color: #111;
}

.accordion-title.active .accordion-arrow {
    transform: rotate(90deg);
    background-color: #111;
}

.accordion-title:hover {
    background: #f5f5f5;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    background: #fff;
    transition: max-height 0.3s ease, padding 0.3s;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-bottom: none;
}

.accordion-content.open {
    padding: 16px 0;
    border-bottom: 1.5px solid #d1d1d1;
}

.accordion-content a {
    color: #111;
    text-decoration: none;
    font-size: 0.97rem;
    padding: 6px 0 6px 16px;
    border: none;
    background: none;
    margin: 0;
    transition: background 0.2s;
    box-shadow: none;
}

.accordion-content a:hover {
    background: #f5f5f5;
}

/* Estilo mejorado para el recuadro blanco */
.footer-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 20px 18px 20px;
    padding: 32px 28px 24px 28px;
    background: #ff6600;
    border-radius: 22px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 0 0 4px #fff;
    border: 2.5px solid #f3f3f3;
    max-width: 420px;
    min-width: 240px;
    position: relative;
    z-index: 2;
}

.footer-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 0 0 4px #fff;
}

.footer-copy {
    width: 100%;
    text-align: center;
    margin-top: 12px;
}

.footer-bottom {
    display: none;
}

#btn-arriba {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    background: #ff6600;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#btn-arriba span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

#notificacion-carrito {
    display: none;
    position: fixed;
    bottom: 12px;
    left: 8px;
    right: 8px;
    background: rgba(255, 102, 0, 0.80); /* Color con transparencia */
    color: #fff;
    padding: 10px 8px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 9999;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    max-width: calc(100vw - 16px);
}

/* Mostrar notificación con la clase visible */
#notificacion-carrito.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.modal-descarga {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
}
.modal-descarga.activo {
    display: flex;
}
.modal-contenido {
    background: #fff;
    padding: 2rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    text-align: center;
    min-width: 250px;
}
.modal-contenido h3 {
    margin-top: 0;
    color: #ff6600;
}
#aceptar-descarga, #cerrar-modal {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
}
#aceptar-descarga {
    background: #ff6600;
    color: #fff;
}
#aceptar-descarga:hover {
    background: #ff6600;
}
#cerrar-modal {
    background: #ccc;
    color: #333;
}
#cerrar-modal:hover {
    background: #999;
}

/* --- RESPONSIVE PARA PC --- */
@media (min-width: 601px) {
    .modal-carrito-contenido {
        max-width: 600px;
        padding: 32px 24px 24px 24px;
    }
    #carrito-items img {
        width: 48px;
        height: 48px;
    }
    #carrito-badge {
        font-size: 17px;
        padding: 3px 8px;
    }
    .slider {
        display: flex;
        position: static;
        max-width: 1600px;
        height: 460px;
        margin: 20px auto;
        overflow: visible;
        justify-content: center;
        align-items: center;
    }
    .slide {
        position: static;
        opacity: 1 !important;
        width: 33.33%;
        min-width: 0;
        height: 420px;
        margin: 0 1%;
        transition: none;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        box-shadow: 0 4px 24px rgba(0,0,0,0.06);
        border-radius: 24px;
    }
    .slide img {
        width: 100%;
        height: 100%;
        border-radius: 16px;
        object-fit: contain;
        background: #fff;
        display: block;
        padding: 24px;
        box-sizing: border-box;
        margin: 0;
    }
    .arrow,
    .slider-nav {
        display: none !important;
    }
    input[name="slider"] {
        display: none !important;
    }
    .filtro .item {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        height: 180px;
        min-height: 180px;
        max-height: 180px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .filtro [data-categoria="microfono"],
    .filtro [data-categoria="audifonos"],
    .filtro [data-categoria="ram"] {
        display: none;
    }
    .filtro-nav-arrow {
        display: none !important;
    }
    .filtro::-webkit-scrollbar {
        height: 12px;
        background: #222;
    }
    .filtro::-webkit-scrollbar-thumb {
        background: #ff6600;
        border-radius: 6px;
    }
    .filtro {
        scrollbar-color: #ff6600 #ffffff !important;
        scrollbar-width: thick;         
        position: relative;
    }
    .item img {
        width: 100px;
        height: 100px;
    }
    .item h3 {
        font-size: 1.1rem;
    }
    .productos {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 28px;
        padding: 32px 20px;
        background: #fafafa;
    }
    .producto img {
        width: 80%;
        height: auto;
        object-fit: contain;
        margin-bottom: 12px;
        max-width: 250px;
        min-width: 250px;
        max-height: 250px;
        min-height: 250px;
    }
    .footer-accordion {
        max-width: 100%;
        flex-direction: row;
        justify-content: space-around;
        align-items: flex-start;
        gap: 40px;
    }
    .accordion-item {
        width: auto;
    }
    .accordion-title {
        all: unset;
        font-weight: 700;
        font-size: 1.1rem;
        color: #fff;
        margin-bottom: 12px;
        cursor: default;
    }
    .accordion-arrow {
        display: none;
    }
    .accordion-content {
        all: unset;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .accordion-content a {
        color: #ffffff;
        text-decoration: none;
        font-size: 0.97rem;
        padding: 6px 10px 6px 10px;
        border: none;
        background: none;
        margin: 0;
        transition: background 0.2s, color 0.2s, border-radius 0.2s, padding-left 0.2s;
        box-shadow: none;
    }
    .accordion-content a:hover {
        color: #000000;
        border-radius: 10px;
    }
    .accordion-title:hover {
        background: #111;
    }
    .footer {
        background: #111;
        padding: 40px 60px;
        color: #fff;
    }
    .footer-copy {
        color: #ccc;
        font-size: 0.85rem;
        margin-top: 20px;
    }
    .footer-card {
        display: none;
    }
    .footer-bottom {
        display: block;
        width: 100%;
        text-align: left;
        margin-top: 24px;
        color: #ccc;
        font-size: 0.85rem;
    }
    #btn-arriba {
        display: none !important;
    }
    #notificacion-carrito {
        left: auto;
        right: 20px;
        bottom: 20px;
        max-width: 350px;
        padding: 12px 16px;
        font-size: 1.08rem;
    }
}

@media (min-width: 900px) and (max-width: 1200px) {
    .productos {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 24px !important;
        padding: 28px 12px !important;
    }
}

@media (min-width: 601px) and (max-width: 899px) {
    .productos {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 20px 8px !important;
    }
}

/* Limitar altura del modal del carrito y permitir scroll interno */
.modal-carrito-contenido {
    max-height: 75vh;
    overflow-y: auto;
}