.cp-tour-carousel {
    --cp-tc-arrow-space: 64px;
    --cp-tc-page-gutter: 32px;

    padding-top: 16px;
    padding-bottom: 32px;
    overflow-x: clip;
}

/* Soporte para ambas versiones del render:
   - la vieja con .cp-tour-shell
   - la nueva con .cp-tour-carousel__inner */
.cp-tour-carousel > .cp-tour-shell,
.cp-tour-carousel__inner {
    width: min(1240px, calc(100% - (var(--cp-tc-arrow-space) * 2) - var(--cp-tc-page-gutter)));
    margin-right: auto;
    margin-left: auto;
}

/* Si el carrusel cae dentro de un bloque de contenido más angosto,
   no fuerces un shell externo */
.cp-entry .cp-tour-carousel > .cp-tour-shell,
.cp-entry .cp-tour-carousel__inner,
.cp-content-card__body .cp-tour-carousel > .cp-tour-shell,
.cp-content-card__body .cp-tour-carousel__inner {
    width: calc(100% - (var(--cp-tc-arrow-space) * 2));
    margin-right: auto;
    margin-left: auto;
}

.cp-tour-carousel__head {
    padding: 0 0 18px;
}

.cp-tour-carousel__head-copy {
    display: grid;
    gap: 6px;
}

.cp-tour-carousel__head-copy h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.12;
    color: #111827;
}

.cp-tour-carousel__subtitle {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #6b7280;
}

.cp-tour-carousel__container {
    position: relative;
    padding-right: 0;
    padding-left: 0;
}

.cp-tour-carousel__viewport {
    overflow: hidden;
}

.cp-tour-carousel__track {
    display: flex;
    gap: 24px;
    transition: transform 0.45s ease;
    will-change: transform;
}

.cp-tour-carousel__track > .cp-tour-card {
    flex: 0 0 calc((100% - 72px) / 4);
    min-width: 0;
    max-width: none;
    margin-inline: 0;
}

.cp-tour-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: transparent !important;
    border: none;
    border-radius: 0;
    color: transparent;
    cursor: pointer;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.cp-tour-carousel__arrow--prev {
    left: calc(var(--cp-tc-arrow-space) * -1);
}

.cp-tour-carousel__arrow--next {
    right: calc(var(--cp-tc-arrow-space) * -1);
}

.cp-tour-carousel__arrow span {
    display: none;
}

.cp-tour-carousel__arrow::before {
    content: "";
    display: block;
    background: rgba(0, 0, 0, 0.75);
    transform-origin: center;
    transition: transform 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
}

/* Prev: triángulo alto y angosto, parecido a "\23F4" */
.cp-tour-carousel__arrow--prev::before {
    width: 12px;
    height: 60px;
    clip-path: polygon(100% 0, 0 50%, 100% 100%);
    -webkit-clip-path: polygon(100% 0, 0 50%, 100% 100%);
}

/* Next: triángulo alto y angosto, parecido a "\23F5" */
.cp-tour-carousel__arrow--next::before {
    width: 12px;
    height: 60px;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    -webkit-clip-path: polygon(0 0, 100% 50%, 0 100%);
}


.cp-tour-carousel__arrow:hover::before {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.06);
}

.cp-tour-carousel__arrow.is-disabled {
    opacity: 1;
    cursor: not-allowed;
}

.cp-tour-carousel__arrow.is-disabled::before {
    background: rgba(0, 0, 0, 0.35);
}

.cp-tour-carousel__arrow.is-disabled:hover::before {
    background: rgba(0, 0, 0, 0.35);
    transform: none;
}

.cp-tour-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.cp-tour-carousel__dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: #d1d5db;
    cursor: pointer;
    padding: 0;
}

.cp-tour-carousel__dot.is-active {
    background: #111827;
}

@media (max-width: 1200px) {
    .cp-tour-carousel__track > .cp-tour-card {
        flex: 0 0 calc((100% - 48px) / 3);
    }
}

@media (max-width: 992px) {
    .cp-tour-carousel__track > .cp-tour-card {
        flex: 0 0 calc((100% - 24px) / 2);
    }
}

@media (max-width: 768px) {
    .cp-tour-carousel {
        --cp-tc-arrow-space: 45px;
        --cp-tc-page-gutter: 20px;
    }

    .cp-tour-carousel > .cp-tour-shell,
    .cp-tour-carousel__inner {
        width: calc(100% - (var(--cp-tc-arrow-space) * 2));
    }

    .cp-entry .cp-tour-carousel > .cp-tour-shell,
    .cp-entry .cp-tour-carousel__inner,
    .cp-content-card__body .cp-tour-carousel > .cp-tour-shell,
    .cp-content-card__body .cp-tour-carousel__inner {
        width: calc(100% - (var(--cp-tc-arrow-space) * 2));
        margin-right: auto;
        margin-left: auto;
    }

    .cp-tour-carousel__container {
        padding-right: 0;
        padding-left: 0;
    }

    .cp-tour-carousel__arrow {
        display: flex;
    }

    .cp-tour-carousel__arrow--prev::before,
    .cp-tour-carousel__arrow--next::before {
        width: 12px;
        height: 60px;
    }

    .cp-tour-carousel__head-copy h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .cp-tour-carousel {
        --cp-tc-arrow-space: 40px;
        --cp-tc-page-gutter: 16px;
    }

    .cp-tour-carousel__track > .cp-tour-card {
        flex: 0 0 100%;
    }

    .cp-tour-carousel__arrow--prev::before,
    .cp-tour-carousel__arrow--next::before {
        width: 10px;
        height: 50px;
    }
}