/* ===========================
   MODAL SMN / TEMPERATURA
=========================== */

.smn-modal {
    position: fixed;
    inset: 0;
    z-index: 4700;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(35, 35, 35, 0);
    opacity: 0;
    transition: opacity 0.32s ease, background 0.32s ease;
}

.smn-modal.is-visible {
    display: flex;
}

.smn-modal.show {
    opacity: 1;
    background: rgba(35, 35, 35, 0.35);
}

.smn-modal.closing {
    opacity: 0;
    background: rgba(35, 35, 35, 0);
}

.smn-inner {
    width: 80vw;
    height: 82vh;
    max-width: 1100px;
    background: #f7eee7;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    transform: translateY(22px) scale(0.97);
    opacity: 0;
    transition: transform 0.32s ease, opacity 0.32s ease;
}

.smn-modal.show .smn-inner {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.smn-modal.closing .smn-inner {
    transform: translateY(22px) scale(0.97);
    opacity: 0;
}

.smn-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 92px;
    background: #ead8c8;
    border-bottom: 1px solid rgba(150, 61, 86, 0.18);
}

.smn-tab {
    min-height: 78px;
    border: none;
    border-right: 1px solid rgba(150, 61, 86, 0.12);
    background: #ead8c8;
    color: #963d56;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    padding: 12px 14px;
}

.smn-tab.active {
    background: #963d56;
    color: #ffffff;
}

.smn-close {
    border: none;
    background: #f7eee7;
    color: #963d56;
    font-size: 56px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
}

.smn-body {
    height: calc(82vh - 78px);
    overflow-y: auto;
    padding: 26px 34px 36px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #963d56 #ead8c8;
}

.smn-body::-webkit-scrollbar {
    width: 12px;
}

.smn-body::-webkit-scrollbar-track {
    background: #ead8c8;
    border-radius: 20px;
}

.smn-body::-webkit-scrollbar-thumb {
    background: #963d56;
    border-radius: 20px;
    border: 3px solid #ead8c8;
}

.smn-body::-webkit-scrollbar-thumb:hover {
    background: #7d2f46;
}

.smn-tab-panel {
    display: none;
}

.smn-tab-panel.active {
    display: block;
}

.smn-intro {
    margin: 0 0 18px;
    color: #963d56;
    font-size: 29px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.25;
}

.smn-main-img {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    object-fit: contain;
    background: #ffffff;
}

.smn-section-separator {
    height: 1px;
    background: rgba(150, 61, 86, 0.18);
    margin: 34px 0 26px;
}

.smn-section-title {
    margin: 0 0 22px;
    color: #963d56;
    font-size: 27px;
    font-style: italic;
    font-weight: 500;
    line-height: 1.25;
}

/* Carousel */
.smn-carousel-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.smn-carousel-track {
    position: relative;
    width: 100%;
}

.smn-carousel-slide {
    display: none;
    width: 100%;
    animation: smnFade 0.28s ease;
}

.smn-carousel-slide.active {
    display: block;
}

.smn-carousel-slide img {
    display: block;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #ffffff;
}

.smn-carousel-btn {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    transform: translateY(-50%);
    border: none;
    border-radius: 999px;
    background: rgba(150, 61, 86, 0.92);
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.smn-carousel-btn.prev {
    left: 12px;
}

.smn-carousel-btn.next {
    right: 12px;
}

.smn-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.smn-carousel-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    border: none;
    background: #d8bca7;
    cursor: pointer;
}

.smn-carousel-dot.active {
    background: #963d56;
}

@keyframes smnFade {
    from {
        opacity: 0;
        transform: translateX(10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Móvil */
@media (max-width: 768px) {
    .smn-modal {
        padding: 14px;
    }

    .smn-inner {
        width: 94vw;
        height: 84vh;
        max-width: 430px;
        border-radius: 14px;
    }

    .smn-tabs {
        grid-template-columns: repeat(4, minmax(145px, 1fr)) 74px;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: #963d56 #ead8c8;
    }

    .smn-tabs::-webkit-scrollbar {
        height: 8px;
    }

    .smn-tabs::-webkit-scrollbar-track {
        background: #ead8c8;
    }

    .smn-tabs::-webkit-scrollbar-thumb {
        background: #963d56;
        border-radius: 12px;
    }

    .smn-tab {
        min-height: 76px;
        font-size: 14px;
        white-space: normal;
    }

    .smn-close {
        position: sticky;
        right: 0;
        font-size: 48px;
    }

    .smn-body {
        height: calc(84vh - 76px);
        padding: 22px 28px 32px;
    }

    .smn-intro {
        font-size: 27px;
    }

    .smn-section-title {
        font-size: 26px;
    }

    .smn-carousel-btn {
        width: 38px;
        height: 38px;
        font-size: 30px;
    }
}


/* ===========================
   FANCYBOX SOBRE MODALES
=========================== */

/* Fancybox v5 */
.fancybox__container {
    z-index: 999999 !important;
}

/* Fancybox v3 */
.fancybox-container {
    z-index: 999999 !important;
}

/* Asegurar que el contenido quede visible */
.fancybox__slide,
.fancybox__content,
.fancybox__image {
    z-index: 1;
}

/* ===========================
   VISOR AUTOMÁTICO SMN
=========================== */

.smn-auto-viewer {
    width: 100%;
    background: #ffffff;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(150, 61, 86, 0.18);
}

.smn-auto-viewer img {
    width: 100%;
    display: block;
    object-fit: contain;
    opacity: 1;
    /*transition: opacity 0.01s ease;*/
}

/*.smn-auto-viewer img.fade-out {
    opacity: 0;
}*/

.smn-texto-json {
    margin-top: 22px;
    background: #ead8c8;
    border-left: 6px solid #963d56;
    border-radius: 14px;
    padding: 18px 22px;
    color: #963d56;
    font-size: 18px;
    line-height: 1.55;
    font-weight: 600;
}

.smn-texto-json.error {
    background: #f7eee7;
    border: 1px solid rgba(150, 61, 86, 0.25);
    color: #963d56;
}

@media (max-width: 768px) {
    .smn-texto-json {
        font-size: 15px;
        line-height: 1.45;
        padding: 15px 16px;
    }
}

.smn-aviso-empty {
    margin-top: 18px;
    background: #ead8c8;
    border-left: 6px solid #963d56;
    border-radius: 14px;
    padding: 22px 24px;
    color: #963d56;
    font-size: 20px;
    line-height: 1.45;
    font-weight: 800;
    text-align: center;
}

@media (max-width: 768px) {
    .smn-aviso-empty {
        font-size: 16px;
        padding: 18px 16px;
    }
}