
/* =========================================================
   TARJETAS DE PERIÓDICO
========================================================= */

.card-periodico {
    position: relative;
    isolation: isolate;

    flex: 0 1 285px;
    width: 285px;
    max-width: 100%;
    min-width: 0;

    padding: 15px;

    background: linear-gradient(145deg, #fffdf5 0%, #eee5d2 100%);
    color: #29251f;
    border: 1px solid #d4c8b3;
    border-radius: 2px 5px 3px 4px;

    box-shadow:
        0 12px 0 #d5cbb9,
        0 16px 0 #24211d,
        0 25px 38px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255, 255, 255, .9);

    transform: rotate(-1deg);
    transition: transform .25s ease, box-shadow .25s ease;
}

.card-periodico::before {
    content: "";
    position: absolute;
    z-index: 4;
    pointer-events: none;

    top: -10px;
    left: 50%;

    width: 82px;
    height: 23px;

    background: linear-gradient(90deg, #fffefa, #eee5d4 55%, #fffdf7);
    border: 1px solid #d2c8b7;
    border-radius: 1px 2px 1px 3px;
    box-shadow: 1px 2px 3px rgba(0, 0, 0, .2);

    transform: translateX(-50%) rotate(-3deg);
}

.card-periodico:nth-child(2) {
    transform: rotate(1.5deg);
}

.card-periodico:nth-child(3) {
    transform: rotate(-1.7deg);
}

.card-periodico:nth-child(6n+1) {
    transform: rotate(-2deg) scale(.96);
}

.card-periodico:nth-child(6n+2) {
    transform: rotate(1.5deg) scale(1);
}

.card-periodico:nth-child(6n+3) {
    transform: rotate(-.8deg) scale(.97);
}

.card-periodico:nth-child(6n+4) {
    transform: rotate(2deg) scale(1);
}

.card-periodico:nth-child(6n+5) {
    transform: rotate(-1.5deg) scale(.96);
}

.card-periodico:nth-child(6n) {
    transform: rotate(1deg) scale(1);
}

.card-periodico:nth-child(3n) {
    margin-top: 17px;
}

.card-periodico:nth-child(4n) {
    margin-top: -8px;
}

.card-periodico:nth-child(5n) {
    margin-top: 22px;
}

.card-periodico:hover {
    z-index: 5;
    transform: translateY(-6px) rotate(0deg) scale(1.025);

    box-shadow:
        0 12px 0 #d5cbb9,
        0 16px 0 #24211d,
        0 30px 45px rgba(0, 0, 0, .5),
        inset 0 1px 0 rgba(255, 255, 255, .95);
}

/* =========================================================
   IMÁGENES Y TEXTO
========================================================= */

.img-portada {
    display: block;
    width: 100%;
    height: 220px;

    object-fit: cover;
    aspect-ratio: 1 / 1;

    background: #d8cebd;
    border: 1px solid rgba(48, 39, 27, .2);
    border-radius: 2px;

    box-shadow: 0 3px 8px rgba(0, 0, 0, .17);
}

.info-disco {
    min-width: 0;
    margin-top: 14px;
    font-family: 'Special Elite', cursive;
}

.nombre-audio {
    margin-bottom: 8px;

    color: #27221d;
    font-family: 'Bowlby One SC', Impact, sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: uppercase;

    overflow-wrap: anywhere;
}

.descripcion-audio {
    color: #51483d;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.tag {
    display: inline-block;
    max-width: 100%;

    margin-top: 10px;
    padding: 6px 11px;

    color: #3c3020;
    background: #e4d7b8;
    border: 1px dashed #a69a7f;
    border-radius: 2px;

    font-family: 'Special Elite', cursive;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.cat-badge {
    position: relative;

    display: inline-flex;
    align-items: center;
    gap: 4px;

    width: max-content;
    max-width: 100%;

    margin-top: 7px;
    padding: 4px 9px;

    color: #3a2716;
    background: linear-gradient(135deg, #f6d67c, #e8b84a);
    border: 1px solid rgba(105, 70, 23, .28);
    border-radius: 2px;

    font-size: 10px;
    font-weight: 700;

    box-shadow:
        0 3px 6px rgba(0, 0, 0, .16),
        inset 0 1px 0 rgba(255, 255, 255, .35);

    transform: rotate(-1deg);
    overflow-wrap: anywhere;
}

.cat-badge::before {
    content: "";
    position: absolute;

    top: 50%;
    left: -5px;

    width: 8px;
    height: 4px;

    background: rgba(255, 255, 255, .65);
    border-radius: 1px;
    transform: translateY(-50%) rotate(10deg);
}

.footer-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;

    margin-top: 15px;
    padding-top: 10px;

    border-top: 1px dashed rgba(83, 65, 42, .35);

    color: #51483d;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 12px;
}


/* =========================================================
   MODAL DEL DISCO
========================================================= */

.modal-disco {
    position: fixed;
    inset: 0;
    z-index: 999999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(10, 9, 8, .88);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-box {
    position: relative;
    isolation: isolate;

    display: flex;
    gap: 25px;

    width: min(1100px, 95%);
    height: 600px;
    padding: 28px;

    overflow: hidden;

    background:
        linear-gradient(135deg, rgba(28, 25, 21, .96), rgba(10, 10, 9, .98)),
        url("periodico.jpg");

    background-size: cover;
    background-position: center;

    border: 1px solid rgba(237, 221, 188, .22);
    border-radius: 4px;

    box-shadow:
        0 30px 80px rgba(0, 0, 0, .9),
        inset 0 0 40px rgba(255, 170, 80, .08);
}

.modal-box::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;

    background:
        radial-gradient(circle at 20% 10%, rgba(255, 200, 100, .08), transparent 60%),
        radial-gradient(circle at 80% 90%, rgba(255, 80, 0, .05), transparent 60%),
        repeating-linear-gradient(
            0deg,
            transparent 0,
            transparent 5px,
            rgba(255, 255, 255, .012) 6px
        );
}

.modal-left {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;

    width: 40%;
    min-width: 0;
}

.modal-left img,
#modalImg {
    display: block;
    width: 100%;
    height: 360px;
    max-height: 400px;

    object-fit: contain;

    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 3px;

    box-shadow: 0 0 25px rgba(0, 0, 0, .8);
}

.disco-modal {
    position: absolute;
    right: -35px;
    bottom: 30px;

    width: 170px;
    height: 170px;

    background-size: cover;
    background-position: center;
    border-radius: 50%;

    animation: girar 8s linear infinite;
    box-shadow: 0 0 25px rgba(0, 0, 0, .9);
}

@keyframes girar {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.modal-right {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    gap: 6px;

    width: 60%;
    min-width: 0;

    color: #fffaf0;
}

.modal-right h2 {
    margin-bottom: 10px;

    color: #fff3d9;
    font-family: 'Bowlby One SC', Impact, sans-serif;
    font-size: 38px;
    font-weight: 400;
    line-height: 1.1;
    text-transform: uppercase;

    text-shadow: 2px 2px 0 #8e2424;
    overflow-wrap: anywhere;
}

.modal-desc {
    margin-bottom: 15px;

    color: #ddd2bd;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 13px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.extra-box {
    padding: 9px 12px;

    color: #e6ddce;
    background: rgba(255, 255, 255, .06);
    border: 1px dashed rgba(230, 210, 175, .18);
    border-radius: 3px;

    font-size: 12px;
    box-shadow: inset 0 0 8px rgba(255, 255, 255, .05);
}

.cerrar {
    position: absolute;
    z-index: 10;

    top: 18px;
    right: 18px;

    width: 45px;
    height: 45px;

    color: white;
    background: linear-gradient(145deg, #ff3b3b, #b80000);
    border: 2px solid #f8e7d2;
    border-radius: 2px;

    font-size: 20px;
    cursor: pointer;

    box-shadow: 0 6px 15px rgba(0, 0, 0, .45);
    transition: transform .2s ease;
}

.cerrar:hover {
    transform: rotate(5deg) scale(1.06);
}

/* =========================================================
   COMPRA Y VALORACIONES
========================================================= */

.buy-btn {
    width: 130px;
    height: 38px;
    margin-top: 20px;
    padding: 0;

    color: #fff;
    background: linear-gradient(135deg, #a92a2a, #d43d3d);
    border: 1px solid #f1cfc2;
    border-radius: 3px;

    font-size: 13px;
    font-weight: 800;
    cursor: pointer;

    box-shadow: 0 4px 0 #691b1b, 0 7px 12px rgba(0, 0, 0, .25);
    transition: transform .2s ease, background .2s ease;
}

.buy-btn:hover {
    background: linear-gradient(135deg, #c93636, #ed4b4b);
    transform: translateY(-2px);
}

.modal-buttons {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.rating-selector {
    position: relative;
    margin-top: 20px;
}

.rating-open {
    width: 130px;
    height: 38px;
    padding: 0;

    color: #29251f;
    background: linear-gradient(145deg, #fffdf6, #e8dfca);
    border: 1px dashed #a69a7f;
    border-radius: 3px;

    font-family: 'Special Elite', cursive;
    font-size: 13px;
    cursor: pointer;

    box-shadow: 0 5px 12px rgba(0, 0, 0, .3);
    transition: .2s ease;
}

.rating-open:hover {
    background: #fffdf6;
    transform: translateY(-2px);
}

.review-box {
    position: relative;
}

.rating-menu {
    position: absolute;
    z-index: 999;

    top: auto;
    bottom: 45px;
    left: 0;

    display: none;
    width: 100%;
    padding: 12px;

    color: #fff;
    background: #201e1a;
    border: 1px solid rgba(245, 210, 122, .3);
    border-radius: 3px;

    box-shadow: 0 20px 45px rgba(0, 0, 0, .6);
}

.rating-menu.show {
    display: block;
}

.rating-menu label {
    display: block;

    margin-bottom: 8px;
    padding: 12px;

    color: #f5eedf;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 2px;

    font-size: 15px;
    cursor: pointer;
    transition: background .2s ease;
}

.rating-menu label:hover {
    background: #8e2424;
}

.rating-menu input {
    display: none;
}

.rating-menu label:last-child {
    margin-bottom: 0;
}
