/*=====================================
    PIEZAS DESTACADAS (carrusel redondo 3D)
    El aro y el giro se calculan en js/carrusel-redondo.js
======================================*/

.destacadas[hidden] {
    display: none;
}

.destacadas {
    overflow: hidden;
    background:
        radial-gradient(ellipse at 50% 60%, rgba(154, 115, 34, 0.12), transparent 60%),
        var(--color-white);
}

.aro {
    --aro-ancho: 220px;
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0 0;
}

.aro__escena {
    position: relative;
    height: 380px;
    perspective: 1400px;
    perspective-origin: 50% 40%;
}

.aro__anillo {
    --aro-radio: 400px;
    position: absolute;
    top: 20px;
    left: 50%;
    width: var(--aro-ancho);
    height: 320px;
    margin: 0 0 0 calc(var(--aro-ancho) / -2);
    padding: 0;
    list-style: none;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
}

.aro__anillo:active {
    cursor: grabbing;
}

.aro__anillo.is-sin-transicion {
    transition: none;
}

.aro__item {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
}

.aro__tarjeta {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    text-align: left;
    cursor: pointer;
    opacity: 0.55;
    filter: saturate(0.7);
    transition: opacity 0.6s ease, filter 0.6s ease, box-shadow 0.6s ease, border-color 0.6s ease;
}

.aro__item.is-frente .aro__tarjeta {
    border-color: var(--color-secondary);
    box-shadow: 0 20px 45px rgba(20, 20, 22, 0.22);
    opacity: 1;
    filter: none;
}

.aro__tarjeta img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    background: var(--color-bg-alt);
    pointer-events: none;
}

.aro__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 14px 14px;
}

.aro__info strong {
    overflow: hidden;
    color: var(--color-primary-dark);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.aro__info small {
    color: var(--color-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

.aro__tarjeta:focus-visible {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

/* Flechas */
.aro__flecha {
    position: absolute;
    top: 190px;
    z-index: 5;
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background var(--transition), color var(--transition);
}

.aro__flecha:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.aro__flecha--prev {
    left: 0;
}

.aro__flecha--next {
    right: 0;
}

.aro__leyenda {
    margin: 14px 0 0;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 767.98px) {

    .aro {
        --aro-ancho: 170px;
    }

    .aro__escena {
        height: 300px;
        perspective: 900px;
    }

    .aro__anillo {
        height: 250px;
    }

    .aro__flecha {
        top: 150px;
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .aro__anillo,
    .aro__tarjeta {
        transition: none;
    }
}
