#contenedor-principal {
    display: flex;
    flex-direction: row;
    gap: 1rem;
}

#menu-izq {
    margin: 2vw 0 0 3vw;
    font-family: 'Anton', sans-serif;
    background: linear-gradient(90deg, #656565, #65ce6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    border-radius: 20px;
    font-size: 3vw;
    padding: 6vw 3vw 0 3vw;
}

#menu-izq ul {
    list-style-type: none;
    padding: 0;
}

#menu-izq ul li {
    margin: 1vw 2vw 0 0;
    cursor: pointer;
}

#showcase {
    margin: 2vw 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

#contenedor-tarjetas {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarjeta {
    position: relative;
    margin: 1vw 1vw 1vw 1vw;
    width: 17vw;
    background-image: url("../img/fondo_papel.png");
    background-size: 200% 200%;
    background-position: 100% 80%;
    display: flex;
    flex-direction: column;
    aspect-ratio: 55/34;
    /* Número áureo aproximado */
    padding: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    word-break: break-word;
    transition: background 0.5s ease, transform 0.3s ease;
}

.imagen-tarjeta img {
    background-size: cover;
    background-position: center;
    position: absolute;
    aspect-ratio: 9/14;
    justify-content: center;
    margin: 7% 0 0 7%;
    max-width: 30%;
    object-fit: cover;
    transition: 0.3s ease;
}

.info-tarjeta {
    display: flex;
    flex-direction: column;

}

.info-libro {
    display: flex;
    flex-direction: row;
    width: 90%;
}

.precio {
    text-align: center;
    background-size: 200% 200%;
    border-radius: 10px;
    margin: 0 0;
    font-size: 2em;
    transition: background 0.5s ease, transform 0.3s ease;
}

.descuento {
    position: absolute;
    margin: 36% 0 0 80%;
    transform: rotate(33deg);
    font-family: 'Anton', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0px;
    word-spacing: 0px;
    color: #a0cb44;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
}

.icono-oferta {
    position: absolute;
    margin: 27% 0 0 61%;
    width: 8vw;
    transform: rotate(50deg);
    opacity: 0.8;
}

.icono-bestseller {
    position: absolute;
    margin: 3.8% 0 0 10%;
    width: 30%;
    opacity: 0.9;
    z-index: +1;
    filter: drop-shadow(-5px 10px 10px rgba(0, 0, 0, 1));
}

.tarjeta:hover {
    background-position: 50% 15%;
    transform: scale(1.15);
}

#menu-izq ul li:hover {
    transition: 0.2s;
    transform: scale(1.2);
    background: linear-gradient(90deg, #656565, #65ce6a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0px 0px 20px rgba(8, 212, 93, 0.7);
}

.tarjeta:hover .titulo {
    transition: 0.5s ease-out;
}

.tarjeta:hover .precio {
    transform: scale(1.3);
    transition: 0.2s ease;
}

.tarjeta:hover .imagen-tarjeta img {
    transform: scale(1.15);
    box-shadow: 10px 10px 5px rgba(0, 0, 0, 0.8);
}

.tarjeta:hover .oferta {
    animation: precioRebote 1s ease infinite;
}

.tarjeta:hover .compra-oferta {
    transform: scale(0.8);
    transition: 0.2s ease;
}

.tarjeta:hover .icono-oferta {
    transition: 0.3s ease;
    transform: scale(1.2) rotate(360deg);
}

.tarjeta:hover .descuento {
    transition: 0.3s ease;
    transform: scale(1.6) rotate(-10deg);
    margin: 33% 0 0 73%;
}

.tarjeta:hover .icono-bestseller {
    margin: 3.2% 0 0 9%;
    transition: 0.3s ease;
    transform: scale(1.25);
    animation: brillo 1s ease infinite;
    filter: drop-shadow(-5px 8px 4px rgba(0, 0, 0, 1));
}

#pagination {
    display: flex;
    justify-content: center;
    margin: 2vw 0;
    gap: 0.5em;
}

.titulo {
    margin: 10% 0 0 42%;
    position: absolute;
    font-family: 'Anton', sans-serif;
    font-size: 1.5vw;
    letter-spacing: 0px;
    word-spacing: 0px;
    color: #000000;
    font-weight: normal;
    text-decoration: none;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
    z-index: +1;
}

.autor {
    margin: 7% 0 0 42%;
    position: absolute;
    font-family: Courier New;
    font-size: 0.8vw;
    letter-spacing: 0px;
    word-spacing: 0px;
    color: #2a2a2a;
    font-weight: bold;
    text-decoration: none;
    font-style: normal;
    font-variant: normal;
    text-transform: none;
}

.compra {
    position: absolute;
    margin: 40% 0 0 50%;
    font-family: 'Anton', sans-serif;
    font-size: 250%;
    letter-spacing: 0px;
    word-spacing: 0px;
    background: linear-gradient(270deg, #7baf88, #93fa91, #80d685);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
}

.compra-oferta {
    position: absolute;
    margin: 33% 0 0 41%;
    font-family: 'Anton', sans-serif;
    font-size: 1vw;
    letter-spacing: 0px;
    word-spacing: 0px;
    color: #cf4522;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
    text-decoration: line-through;
}

.oferta {
    position: absolute;
    margin: 38% 0 0 40%;
    font-family: 'Anton', sans-serif;
    font-size: 230%;
    letter-spacing: 0px;
    word-spacing: 0px;
    color: #3ac317;
    font-weight: normal;
    font-style: normal;
    font-variant: normal;
}

@keyframes precioRebote {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes brillo {
    0% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.2);
    }

    100% {
        filter: brightness(1);
    }
}

/* ========================================
   RESPONSIVE - MÓVIL
   ======================================== */

@media (max-width: 768px) {

    /* Contenedor principal en columna */
    #contenedor-principal {
        flex-direction: column;
    }

    /* Menú lateral más pequeño */
    #menu-izq {
        margin: -20vw 0 0 0;
        background: linear-gradient(90deg, #656565, #9a9a9a);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    #menu-izq ul {
        display: flex;
        flex-direction: row;
        gap: 1em;
        font-size: 6vw;
    }

    /* Tarjetas una debajo de otra */
    #showcase {
        grid-template-columns: 1fr;
        /* Una sola columna */
        gap: 2rem;
        padding: 0 2vw;
    }

    /* Tarjetas más grandes en móvil */
    .tarjeta {
        background: linear-gradient(45deg, #332b47, #464e55);
        opacity: 0.5;
        max-width: 80%;
        min-width: 70%;
        margin: auto
    }

    /* Ajustar tamaños de fuente */
    .titulo {
        font-size: 6vw;
    }

    .autor {
        font-size: 4vw;
    }

    .compra {
        font-size: 8vw;
    }

    .oferta {
        font-size: 8vw;
    }

    .compra-oferta {
        font-size: 3vw;
    }

    .icono-oferta {
        width: 30vw;
    }

    #menu-izq ul li:hover {
        transition: 0.2s;
        transform: scale(1.2);
        background: linear-gradient(90deg, #484848, #d9d9d9);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        text-shadow: 0px 0px 20px rgba(33, 24, 201, 0.7);
    }
}

/* Para pantallas muy pequeñas (móviles en vertical) */
@media (max-width: 480px) {
    #menu-izq {
        font-size: 1.5em;
    }

    .tarjeta {
        aspect-ratio: 16/10;
        /* Más horizontal en móviles pequeños */
    }
}