/**
 * Widget: Carrusel de Experiencias — BajoNalón
 * Diseño clonado del mockup aprobado (.carousel-wrapper section).
 * 6 productos, máximo 3 visibles, flechas, auto-scroll.
 */

/* ── Cabecera de sección ─────────────────────────────────── */

.bn-products-carousel-section {
    position: relative;
    padding: 48px 0;
    isolation: isolate;
    overflow: visible;
}

.bn-products-carousel-section::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    z-index: -1;
}

.bn-products-section-header {
    text-align: center;
    margin-bottom: 44px;
}

.bn-products-section-title {
    font-family: "Space Grotesk", Space, sans-serif;
    font-size: 2em;
    font-weight: 600;
    color: var(--e-global-color-secondary, var(--color-secondary));
    margin: 0 0 14px;
    line-height: 1.2;
}

.bn-products-section-subtitle {
    font-family: "Space Grotesk", Space, sans-serif;
    font-size: 1.17em;
    font-weight: 500;
    color: #666666;
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.65;
}

/* ── Carousel wrapper ────────────────────────────────────── */

.bn-exp-carousel-wrapper {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: visible;
}

/* Botones de control: centrados verticalmente sobre las cards */
.bn-exp-carousel__controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-60%); /* compensa el padding-bottom del viewport */
    display: flex;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 10;
    pointer-events: none;
}

/* ── Viewport (overflow oculto) ─────────────────────────── */

.bn-exp-carousel__viewport {
    width: 100%;
    overflow: hidden;
    padding: 10px 0 30px;
}

/* ── Track (tira scrolleable) ───────────────────────────── */

.bn-exp-carousel__track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bn-exp-carousel__track::-webkit-scrollbar {
    display: none;
}

/* ── Card ────────────────────────────────────────────────── */

.bn-exp-card {
    flex: 0 0 calc((100% - 50px) / 3); /* 3 visibles */
    scroll-snap-align: start;
    border-radius: 24px;       /* sobreescrito por control Elementor */
    overflow: hidden;
    position: relative;
    height: 420px;             /* sobreescrito por control Elementor */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.bn-exp-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.bn-exp-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.6s ease;
}

.bn-exp-card:hover img {
    transform: scale(1.08);
}

/* Placeholder sin imagen */
.bn-exp-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8f0f5 0%, #c8d8e4 100%);
}

/* Badge de descuento */
.bn-exp-card__badge-discount {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #e74c3c;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 3;
    line-height: 1;
}

/* ── Overlay degradado inferior ─────────────────────────── */

.bn-exp-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.90) 0%,
        rgba(0, 0, 0, 0.45) 60%,
        transparent 100%
    );
    padding: 30px 22px 22px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 60%;
    z-index: 2;
}

/* Categoría */
.bn-exp-card__cat {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    color: #e86a10;
    font-weight: 600;
}

/* Título */
.bn-exp-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 14px;
}

.bn-exp-card__title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bn-exp-card__title a:hover {
    color: #e86a10;
}

/* Footer del overlay: precio + botón */
.bn-exp-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

/* Precio */
.bn-exp-card__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    line-height: 1.2;
    min-width: 0;
}

.bn-exp-card__price-prefix {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.bn-exp-card__price-value {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    min-width: 0;
}

.bn-exp-card__price-value,
.bn-exp-card__price-value .price,
.bn-exp-card__price-value .woocommerce-Price-amount,
.bn-exp-card__price-value .woocommerce-Price-currencySymbol {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.bn-exp-card__price-value .price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
}

.bn-exp-card__price-value ins {
    text-decoration: none;
}

.bn-exp-card__price-value del {
    flex-basis: 100%;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
}

.bn-exp-card__price-value del .woocommerce-Price-amount,
.bn-exp-card__price-value del .woocommerce-Price-currencySymbol {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

/* Botón */
.bn-exp-card__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.bn-exp-card__btn:hover {
    background: rgba(255, 255, 255, 0.30);
    border-color: #fff;
}

.bn-exp-card__btn:focus-visible {
    outline: 3px solid #e86a10;
    outline-offset: 3px;
    border-radius: 20px;
}

/* ── Botones de navegación ───────────────────────────────── */

.bn-exp-carousel__btn {
    pointer-events: auto;
    background: var(--color-primary);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: var(--color-background-light);
    font-size: 1.2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.bn-exp-carousel__btn:hover {
    background: var(--color-primary);
    color: #fff;
    transform: scale(1.1);
}

.bn-exp-carousel__btn:focus-visible {
    outline: 3px solid #e86a10;
    outline-offset: 3px;
}

/* ── Responsive: tablet ≤ 900px — mostrar 2 cards ────────── */

@media (max-width: 900px) {
    .bn-exp-card {
        flex: 0 0 calc((100% - 25px) / 2);
    }

    .bn-exp-carousel__controls {
        padding: 0 10px;
    }
}

/* ── Responsive: móvil ≤ 540px — mostrar 1 card ──────────── */

@media (max-width: 540px) {
    .bn-products-carousel-section {
        padding: 36px 0;
    }

    .bn-products-section-header {
        margin-bottom: 28px;
    }

    .bn-exp-card {
        flex: 0 0 calc(100% - 40px);
    }

    .bn-exp-carousel__btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .bn-exp-carousel__controls {
        padding: 0 5px;
    }
}

/* ── Responsive: pantallas muy anchas ≥ 1400px ───────────── */

@media (min-width: 1400px) {
    .bn-exp-carousel__controls {
        padding: 0 12px;
        width: 100%;
        left: 0;
    }
}

/* ── Accesibilidad: reduced motion ───────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .bn-exp-card,
    .bn-exp-card img,
    .bn-exp-card__btn,
    .bn-exp-card__title a {
        transition: none;
    }

    .bn-exp-card:hover {
        transform: none;
    }

    .bn-exp-card:hover img {
        transform: none;
    }

    .bn-exp-carousel__track {
        scroll-behavior: auto;
    }
}
