/**
 * Estilos Frontend para Banner Slider con HTML y Fotos
 */

:root {
    --bsh-height-desktop: 400px;
    --bsh-height-mobile: 260px;
    --bsh-max-width: 1920px;
    --bsh-object-fit: cover;
    --bsh-border-radius: 0px;
    --bsh-transition-speed: 500ms;
}

/* Reseteo para aislar de temas FSE como Twenty Twenty-Five */
.bsh-slider-wrapper,
.bsh-slider-wrapper *,
.bsh-slider-wrapper *::before,
.bsh-slider-wrapper *::after {
    box-sizing: border-box;
}

.bsh-slider-wrapper h1,
.bsh-slider-wrapper h2,
.bsh-slider-wrapper h3,
.bsh-slider-wrapper p,
.bsh-slider-wrapper figure {
    margin-block-start: 0;
    margin-block-end: 0;
}

/* Contenedor principal con tamaño fijo y responsive */
.bsh-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: var(--bsh-max-width, 1920px);
    height: var(--bsh-height-desktop, 400px);
    margin: 0 auto 20px auto;
    overflow: hidden;
    border-radius: var(--bsh-border-radius, 0px);
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.25;
}

/* Adaptación a dispositivos móviles */
@media (max-width: 768px) {
    .bsh-slider-wrapper {
        height: var(--bsh-height-mobile, 260px);
    }
}

/* Pista que contiene todas las diapositivas */
.bsh-slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform var(--bsh-transition-speed, 500ms) cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

/* Cada diapositiva individual */
.bsh-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    cursor: pointer;
}

/* Diapositivas de Imagen */
.bsh-slide-image-wrapper,
.bsh-slide-image-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.bsh-slide-img {
    width: 100%;
    height: 100%;
    object-fit: var(--bsh-object-fit, cover);
    display: block;
    border: 0;
    pointer-events: none;
}

/* Diapositivas de Código HTML Personalizado */
.bsh-slide-html {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.bsh-slide-html-inner {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    max-width: 100% !important;
    display: block !important;
    position: relative !important;
    z-index: 3;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    pointer-events: auto !important;
}

/* El elemento contenedor que pegue el usuario (sea .banner, main, div, section) se expande al 100% del slider */
.bsh-slide-html-inner > * {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.bsh-slide-html-inner > .banner {
    box-shadow: none !important;
    aspect-ratio: auto !important;
}

/* Botones o enlaces específicos dentro del HTML siguen siendo interactivos */
.bsh-slide-html-inner a,
.bsh-slide-html-inner button,
.bsh-slide-html-inner input,
.bsh-slide-html-inner select,
.bsh-slide-html-inner textarea {
    pointer-events: auto;
}

/* =======================================================
 * DISEÑO ESPECÍFICO: BANNER CALENDARIOS 2027
 * ======================================================= */
.bsh-cal-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 30px;
    box-sizing: border-box;
    background-color: #f1f4f9;
    background-image: radial-gradient(circle at 45% 50%, rgba(220, 230, 245, 0.8) 0%, rgba(241, 244, 249, 1) 75%);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Columna Izquierda: Textos y Tipografías */
.bsh-cal-left {
    flex: 1.1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 3;
}

.bsh-cal-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #e65100;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.bsh-cal-dash {
    display: inline-block;
    width: 22px;
    height: 3px;
    background-color: #e65100;
    border-radius: 2px;
}

.bsh-cal-main-title {
    font-size: 44px !important;
    font-weight: 900 !important;
    font-style: italic !important;
    color: #0252cf !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    line-height: 1 !important;
    letter-spacing: -0.5px !important;
}

.bsh-cal-stroke-title {
    font-size: 38px !important;
    font-weight: 900 !important;
    font-style: italic !important;
    color: #ffffff !important;
    -webkit-text-stroke: 2px #111111;
    text-shadow: 3px 3px 0px #111111;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin: 4px 0 12px 0 !important;
    line-height: 1 !important;
}

.bsh-cal-subtitle {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0252cf !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

/* Columna Derecha: Las 3 hojas de Calendario */
.bsh-cal-right {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    z-index: 3;
}

.bsh-cal-cards {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    position: relative;
    padding-right: 15px;
}

.bsh-cal-sheet {
    width: 140px;
    height: 185px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

/* Inclinación y rotación de cada hoja */
.bsh-cal-sheet-1 {
    transform: rotate(-6deg) translateY(6px);
    z-index: 1;
}

.bsh-cal-sheet-2 {
    transform: rotate(0deg) translateY(-4px);
    z-index: 2;
}

.bsh-cal-sheet-3 {
    transform: rotate(6deg) translateY(6px);
    z-index: 1;
}

.bsh-cal-sheet:hover {
    transform: scale(1.06) translateY(-8px) !important;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
    z-index: 10 !important;
}

.bsh-cal-sheet-body {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
}

.bsh-cal-sheet-body img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.bsh-cal-sheet-foot {
    border-top: 2px solid #0252cf;
    padding: 6px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
}

.bsh-cal-month {
    font-size: 11px;
    font-weight: 800;
    color: #0252cf;
    text-transform: uppercase;
}

.bsh-cal-year {
    font-size: 9px;
    font-weight: 700;
    color: #334155;
}

/* Adaptación responsive para Calendarios */
@media (max-width: 768px) {
    .bsh-cal-banner {
        padding: 0 15px;
        gap: 10px;
    }

    .bsh-cal-main-title {
        font-size: 24px !important;
    }

    .bsh-cal-stroke-title {
        font-size: 20px !important;
        -webkit-text-stroke: 1.5px #111111;
        text-shadow: 2px 2px 0px #111111;
        margin-bottom: 6px !important;
    }

    .bsh-cal-subtitle {
        font-size: 11px !important;
    }

    .bsh-cal-sheet {
        width: 75px;
        height: 105px;
    }

    .bsh-cal-cards {
        gap: 6px;
        padding-right: 0;
    }

    .bsh-cal-sheet-foot {
        padding: 3px 4px;
    }

    .bsh-cal-month {
        font-size: 8px;
    }

    .bsh-cal-year {
        font-size: 7px;
    }
}

/* =======================================================
 * DIAPOSITIVAS DE PRODUCTO WOOCOMMERCE
 * ======================================================= */
.bsh-slide-product {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
}

/* Enlace envolvente que cubre toda la diapositiva del producto */
.bsh-product-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
    box-sizing: border-box;
}

.bsh-product-card-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    height: 100%;
    padding: 0 clamp(24px, 5vw, 90px);
    box-sizing: border-box;
    gap: clamp(20px, 4vw, 60px);
}

.bsh-product-details {
    flex: 1.2;
    min-width: 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
    pointer-events: auto;
}

.bsh-product-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff7ed !important;
    border: 1px solid #fed7aa !important;
    color: #ea580c !important;
    padding: 6px 14px !important;
    border-radius: 9999px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(11px, 0.85vw, 13px) !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    margin-bottom: 14px !important;
    width: fit-content !important;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.08) !important;
}

/* Título de producto ultra legible, moderno y protegido contra fugas de CSS */
.bsh-product-name,
.bsh-slide-product .bsh-product-name {
    all: revert !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-weight: 700 !important;
    font-size: clamp(22px, 2.6vw, 38px) !important;
    line-height: 1.24 !important;
    color: #0f172a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.015em !important;
    -webkit-text-stroke: 0px transparent !important;
    text-shadow: none !important;
    paint-order: normal !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.bsh-product-price-box,
.bsh-slide-product .bsh-product-price-box {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-style: normal !important;
    font-size: clamp(22px, 2.2vw, 32px) !important;
    font-weight: 800 !important;
    color: #0284c7 !important;
    margin-bottom: 22px !important;
    display: flex !important;
    align-items: baseline !important;
    gap: 10px !important;
    line-height: 1 !important;
    letter-spacing: -0.01em !important;
}

.bsh-product-price-box del {
    font-size: 0.7em !important;
    color: #94a3b8 !important;
    font-weight: 500 !important;
    text-decoration: line-through !important;
}

.bsh-product-price-box ins {
    text-decoration: none !important;
    color: #16a34a !important;
    font-weight: 800 !important;
}

.bsh-product-price-box .woocommerce-Price-amount {
    color: inherit !important;
}

.bsh-product-action {
    display: block;
    margin-top: 4px;
}

.bsh-product-button {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #0284c7 !important;
    color: #ffffff !important;
    padding: 13px 28px !important;
    border-radius: 8px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    font-weight: 700 !important;
    font-size: clamp(13px, 1vw, 15px) !important;
    letter-spacing: 0.02em !important;
    width: fit-content !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28) !important;
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease !important;
}

/* Efectos hover en toda la tarjeta enlazada */
.bsh-product-card-link:hover .bsh-product-button {
    background: #0369a1 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.4) !important;
}

.bsh-product-thumbnail-col {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.bsh-product-img-wrap {
    width: clamp(200px, 24vw, 320px);
    height: clamp(200px, 24vw, 320px);
    background: #ffffff;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s ease;
}

.bsh-product-photo {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 0;
}

.bsh-product-card-link:hover .bsh-product-img-wrap {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
}

.bsh-product-card-link:hover .bsh-product-photo {
    transform: scale(1.06);
}

@media (max-width: 768px) {
    .bsh-product-card-wrap {
        padding: 0 20px;
        gap: 15px;
    }
    .bsh-product-badge {
        font-size: 10px !important;
        padding: 4px 10px !important;
        margin-bottom: 8px !important;
    }
    .bsh-product-name {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    .bsh-product-price-box {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    .bsh-product-button {
        padding: 8px 18px !important;
        font-size: 12px !important;
    }
    .bsh-product-img-wrap {
        width: 120px;
        height: 120px;
        padding: 10px;
        border-radius: 10px;
    }
}

/* Flechas de navegación Anterior / Siguiente */
.bsh-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.85);
    color: #1d2327;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    padding: 0;
    opacity: 0;
}

.bsh-slider-wrapper:hover .bsh-arrow {
    opacity: 1;
}

.bsh-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.bsh-arrow-prev {
    left: 15px;
}

.bsh-arrow-next {
    right: 15px;
}

@media (max-width: 768px) {
    .bsh-arrow {
        width: 36px;
        height: 36px;
        opacity: 0.7;
    }
    .bsh-arrow-prev { left: 8px; }
    .bsh-arrow-next { right: 8px; }
}

/* Puntos de Paginación (Dots exactamente como Ciclos Mallorca) */
.bsh-slider-dots {
    position: absolute;
    bottom: 8px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    z-index: 10;
    padding: 6px 12px;
}

.bsh-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: rgba(80, 80, 80, 0.7);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    outline: none;
}

.bsh-dot:hover {
    background: rgba(40, 40, 40, 0.95);
    transform: scale(1.15);
}

.bsh-dot.is-active {
    background: #222222;
    transform: scale(1.25);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
