.carousel {
    width: 500px;
    max-width: 60vw;
    aspect-ratio: 9/16;
    margin: 24px auto 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 18px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.22);
    padding: 18px 0 32px 0;
    overflow: visible;
}

.carousel-track {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 320px;
    position: relative;
}

.carousel-img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 9/16;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
    background: #232323;
    margin: 0 auto;
    display: block;
    opacity: 0;
    background-color: transparent;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    transition: opacity 0.35s;
    z-index: 0;
}

.carousel-img.active {
    opacity: 1;
    z-index: 1;
}

.carousel-img.fade-in {
    animation: carousel-fade-in 0.35s;
}

@keyframes carousel-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.carousel-arrow {
    background: #2a2e45;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    margin: 0 4px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    user-select: none;
    z-index: 3;
    outline: none;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-arrow:focus {
    border: 2px solid var(--red);
}

.carousel-arrow:hover {
    background: #242738;
    color: var(--red);
    box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}

.carousel-arrow span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
}

.carousel-indicators {
    position: absolute;
    left: 0; right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 4;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #444;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.carousel-dot.active {
    background: var(--red);
    transform: scale(1.18);
}

.carousel-gradient {
    position: absolute;
    top: 0; bottom: 0;
    width: 36px;
    pointer-events: none;
    z-index: 2;
}

.carousel-gradient-left {
    left: 0;
}

.carousel-gradient-right {
    right: 0;
}

@media (max-width: 600px) {
    .carousel {
        width: 98vw;
        max-width: 98vw;
        aspect-ratio: 9/16;
        padding: 6px 0 28px 0;
    }
    .carousel-img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: 9/16;
    }
    .carousel-track {
        width: 100%;
        height: 100%;
    }

    .carousel-gradient {
        width: 18px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}
