*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Georgia, 'Times New Roman', Times, serif;
}

body {
    min-height: 100vh;
    background-color: #eece5a;
    padding: 0 0 40px 0;
}
@media (min-width: 901px) {
    body {
        background-image: url("IMAGENES/fondoconnenas.png");
        background-repeat: no-repeat;
        background-position: right 0 top 160px;
        background-size: 100% auto;
        background-color: #eece5a;
    }
}
header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background-color: #fdf3d0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    gap: 20px;
}
h1 {
  font-size: 3rem; color: #ff1493; margin: 0;
}
h2 {
  font-size: 24px; color: blueviolet; 
}
.imagen-nenas {
    display: none;
}

@media screen and (max-width: 900px) and (orientation: landscape) {

    .logo-titulo {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 15px;
    }

    .logo-titulo div {
        text-align: left;
    }

    .imagen-nenas {
        display: block;
        width: 120px;
        height: auto;
    }

    .redes {
        display: flex;
        flex-direction: column;
    }
}

.redes { display: flex; gap: 15px; align-items: center; }
.redes a { font-size: 22px; color: #555; text-decoration: none; }
.fa-whatsapp { font-size: 28px; color: #25d366; }
.redes a:hover { color: #9b59b6; }
.redes a:nth-child(1):hover { color: #e1306c; }
.redes a:nth-child(2):hover { color: #ff0000; }
.redes a:nth-child(3):hover { color: #ff6b35; }
.redes a:nth-child(4):hover { color: #25d366; }

#carrito {
    background-color: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    width: 220px;
    text-align: left;
}

#lista-carrito { list-style: none; padding: 0; }
#lista-carrito li { padding: 6px 0; border-bottom: 1px solid #eee; font-size: 0.85rem; }
#total { font-weight: bold; font-size: 1rem; margin-top: 10px; }

#vaciar-carrito {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 10px;
    width: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.libro {
    width: 200px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.2);
    text-align: center;
    flex-shrink: 0;
}

.libro img {
    width: 100%;
    height: 260px;
    object-fit: contain;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.95);
}

.titulo { font-weight: bold; margin-top: 10px; font-size: 0.95rem; color: #333; }
.precio { color: #9400d3; font-size: 1.1rem; font-weight: bold; margin: 5px 0; }

.btn-agregar {
    background-color: #9400d3;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-top: 8px;
    width: 100%;
    font-size: 0.9rem;
}

.btn-agregar:hover { background-color: #ff1493; }

.contenedor-principal {
    display: flex;
    flex-direction: column;
    gap: 30px;
    padding: 20px;
    align-items: flex-start;
}

.fila-arriba {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    align-items: flex-start;
    border-radius: 10px;
    padding: 40px 20px;
    min-height: 600px;
    width: 100%;
}

.fila-abajo {
    display: flex;
    gap: 60px;
    justify-content: flex-start;
    align-items: flex-start;
}

.tapa-libro { cursor: pointer; transition: transform 0.2s; }
.tapa-libro:hover { transform: scale(1.05); }
#video-popup { height: 500px; width: 360px; }

#audio-btn {
    display: none;
    background: #9400d3;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    margin-top: 10px;
}

.btn-audio {
    display: block;
    background: #ff1493;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    margin-top: 8px;
    font-size: 0.9rem;
    text-align: center;
    border: none;
    cursor: pointer;
    width: 100%;
}

.btn-audio:hover { background: #9400d3; }
.libro audio { width: 100%; margin-top: 8px; }
.tapa-ancha { height: 400px; object-fit: contain; }

.img-nenas-mobile { display: none; }


/* ===== MOBILE VERTICAL ===== */
@media (max-width: 768px) and (orientation: portrait) {
    body { background: none; background-color: #eece5a; }
    header { display: flex; flex-direction: row; flex-wrap: nowrap;  justify-content: space-between; align-items: center; padding: 12px 15px; }
    h1 { font-size: 1.6rem; }
    .redes { flex-wrap: wrap; gap: 10px; }
    #carrito { width: 180px; max-width: 180%; margin-left: auto; margin-right: 10px; text-align: center; padding: 10px;}
    .contenedor-principal { padding: 10px; gap: 20px; align-items: center; }
    .fila-arriba { flex-direction: column; align-items: center; background: none; padding: 20px 10px; min-height: unset; gap: 15px; width: 100%; }
    .fila-abajo { flex-direction: column; align-items: center; gap: 15px; width: 100%; }
    .libro { width: 90%; max-width: 320px; }
    .libro img { height: 220px; }
    .tapa-ancha { height: 220px; }
    #video-popup { width: 95vw; height: 60vw; min-height: 200px; }
    .img-nenas-mobile { display: block; width: 90%; max-width: 320px; border-radius: 10px; margin: 0 auto 10px auto; }
    .img-nenas-header { display: none; }
}


@media (max-width: 900px) and (orientation: landscape) {

    body {
        background: none;
        background-color: #eece5a;
    }

    /* ===== HEADER ===== */
    header {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
        padding: 8px 15px;
        gap: 10px;
    }

    h1, h2 {
        margin: 0;
        flex-shrink: 0;
    }

    h1 {
        font-size: 1.4rem;
    }

    h2 {
        font-size: 0,8rem;
        white-space: nowrap;
    }

    .img-nenas-header {
        height: 80px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    /* ===== REDES ===== */
    .redes {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        align-items: center;
    }

    /* ===== CARRITO ===== */
    #carrito {
        width: 220px;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    #carrito button,
    #carrito .boton,
    #carrito .pagar {
        width: 100%;
        max-width: 180px;
        font-size: 0.9rem;
        padding: 10px;
    }

    /* ===== LIBROS ===== */
    .fila-arriba {
        display: flex;
        flex-wrap: wrap;
        gap: 25px;
        padding: 10px;
        min-height: unset;
        align-items: flex-start;
    }

    .fila-abajo {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }

    /* ===== CONTENEDOR ===== */
    .contenedor-principal {
        gap: 8px;
        padding: 10px;
    }

}
.firma {
    font-size: 0.90rem;
    color: #ff1493;
    text-align: center;
    width: 100%;
    margin-top: 10px;
}