:root {
    --rojo: #d52b32;
    --rojo-oscuro: #8f1219;
    --blanco: #ffffff;
    --gris: #b9b9b9;
    --fondo-oscuro: rgba(0, 0, 0, 0.75);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
    background-color: #0a0000;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.85)),
        url("../imagenes/tiendaI.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--blanco);
    display: flex;
    flex-direction: column;
}

button {
    font-family: inherit;
    cursor: pointer;
}

.encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 6%;
    background: linear-gradient(rgba(0, 0, 0, 0.9), transparent);
}

.logo {
    color: var(--blanco);
    text-decoration: none;
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 6px;
}

.logo span {
    color: var(--rojo);
    font-size: 0.6em;
    vertical-align: middle;
}

.navegacion {
    display: flex;
    gap: clamp(20px, 4vw, 50px);
}

.navegacion a {
    position: relative;
    color: var(--blanco);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.navegacion a::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    bottom: -8px;
    height: 2px;
    background: var(--rojo);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.navegacion a:hover,
.navegacion a.activo {
    color: var(--rojo);
}

.navegacion a:hover::after,
.navegacion a.activo::after {
    transform: scaleX(1);
}

.acciones {
    display: flex;
    align-items: center;
    gap: 18px;
}

.icono {
    position: relative;
    display: inline-block;
    background: none;
    border: none;
    color: var(--blanco);
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.icono:hover {
    color: var(--rojo);
}

.separador {
    width: 1px;
    height: 24px;
    background: var(--rojo);
}

.disco-volando {
    position: fixed;
    z-index: 1000;
    object-fit: cover;
    border: 2px solid var(--rojo);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.7);
    pointer-events: none;
}

.icono.rebote {
    animation: rebote 0.5s ease;
}

.icono.rebote .contador {
    animation: contador-pop 0.5s ease;
}

@keyframes rebote {
    0% { transform: scale(1); }
    35% { transform: scale(1.35) rotate(-10deg); color: var(--rojo); }
    65% { transform: scale(0.9) rotate(6deg); }
    100% { transform: scale(1); }
}

@keyframes contador-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.6); box-shadow: 0 0 14px var(--rojo); }
    100% { transform: scale(1); }
}

.contador {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 50%;
    background: var(--rojo);
    color: var(--blanco);
    font-size: 0.65rem;
    font-weight: 800;
    display: grid;
    place-items: center;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tienda-hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 30px;
}

.title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: clamp(3px, 0.6vw, 8px);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
}

.title span {
    color: var(--rojo);
    font-size: 0.5em;
    vertical-align: middle;
}

.subtitle {
    margin-top: 10px;
    font-size: clamp(0.75rem, 1.6vw, 1rem);
    letter-spacing: clamp(3px, 0.7vw, 7px);
    color: #e6e6e6;
}

.linea {
    width: 70px;
    height: 2px;
    margin: 18px auto 10px;
    background: var(--rojo);
    box-shadow: 0 0 10px var(--rojo);
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel {
    position: relative;
    width: 100%;
    height: clamp(280px, 40vw, 440px);
    perspective: 1500px;
}

.card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: clamp(160px, 22vw, 250px);
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%) scale(0.8) rotateY(25deg);
    transition: all 0.5s ease;
    opacity: 0.4;
    cursor: pointer;
}

.card::before {
    content: "";
    position: absolute;
    inset: 4%;
    border-radius: 50%;
    background:
        radial-gradient(circle, var(--rojo) 0 10%, #111 11% 13%, transparent 14%),
        repeating-radial-gradient(circle, #111 0 2px, #1c1c1c 3px 4px);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
    z-index: -1;
    transition: transform 0.5s ease;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, #2a0306, #000);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.card.active {
    opacity: 1;
    z-index: 10;
}

.card.active img {
    border-color: var(--rojo);
    box-shadow:
        0 0 30px rgba(255, 0, 0, 0.6),
        0 0 70px rgba(213, 43, 50, 0.3);
}

.card.active::before {
    transform: translateX(28%);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--rojo);
    background: rgba(0, 0, 0, 0.6);
    color: var(--blanco);
    font-size: 1rem;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.nav-btn:hover {
    background: var(--rojo);
    box-shadow: 0 0 20px var(--rojo);
}

.prev {
    left: 10px;
}

.next {
    right: -30px;
}

.product-info {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#album-title {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 900;
    letter-spacing: 5px;
}

#album-artist {
    font-size: 0.85rem;
    letter-spacing: 4px;
    color: var(--gris);
}

#album-price {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--rojo);
}

.btn-buy {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 36px;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid var(--rojo);
    border-radius: 4px;
    color: var(--rojo);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 3px;
    transition: all 0.3s ease;
}

.btn-buy:hover {
    background: var(--rojo);
    color: var(--blanco);
    box-shadow: 0 0 25px rgba(213, 43, 50, 0.7);
}

.indicators {
    margin-top: 22px;
    display: flex;
    gap: 12px;
}

.indicators button {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--gris);
    background: transparent;
    transition: all 0.3s ease;
}

.indicators button.active {
    background: var(--rojo);
    border-color: var(--rojo);
    box-shadow: 0 0 8px var(--rojo);
}

@media (max-width: 900px) {
    .beneficios {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    .encabezado {
        flex-wrap: wrap;
        justify-content: center;
        padding: 16px;
    }

    .navegacion {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .nav-btn {
        width: 38px;
        height: 38px;
    }

    .beneficios {
        grid-template-columns: 1fr;
        padding: 24px 16px;
    }
}

@media (max-width: 480px) {
    .encabezado {
        gap: 12px;
        padding: 14px 12px;
    }

    .logo {
        letter-spacing: 2px;
        font-size: 1rem;
    }

    .navegacion {
        gap: 12px;
        flex-wrap: wrap;
    }

    .navegacion a {
        font-size: 0.68rem;
        letter-spacing: 1px;
    }

    .acciones {
        gap: 10px;
    }

    .icono {
        font-size: 1rem;
    }

    .title {
        letter-spacing: 2px;
    }

    .subtitle {
        letter-spacing: 2px;
    }

    .carousel-container {
        padding: 0 8px;
    }

    .carousel {
        height: 220px;
    }

    .card {
        width: 140px;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
    }

    .next {
        right: 0;
    }

    .prev {
        left: 0;
    }

    .product-info {
        margin-top: 6px;
    }

    #album-title {
        letter-spacing: 2px;
        font-size: 1rem;
    }

    #album-artist {
        letter-spacing: 2px;
    }

    .btn-buy {
        width: 100%;
        max-width: 280px;
        padding: 12px 16px;
        font-size: 0.7rem;
        letter-spacing: 1.5px;
    }

    .indicators {
        margin-top: 18px;
    }
}
