/* ============================================
   OFERTA ESPECIAL - Estilos aislados
   ============================================ */

/* TABLA OFERTA */
.oferta-tabla ul {
    list-style: none;
    padding: 0 0 20px 0;
}

.oferta-tabla li {
    font-size: 14px;
    color: #162316;
}

.oferta-tabla ul li {
    font-size: 16px;
    font-weight: bold;
    color: #188803;
}

/* BADGE OFERTA EN PRODUCTO */
.oferta-producto {
    background-image: url("/comp/themes/divi-child/assets/img/oferta.png");
    background-size: 100px;
    width: 100px;
    height: 50px;
    position: absolute;
    z-index: 1;
}

.products .oferta-producto {
    background-size: 100px;
    width: 100px;
    height: 50px;
}

/* TOOLTIP OFERTA */
.tooltip {
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 290px;
    background-color: #76b72a;
    color: #fff;
    text-align: left;
    padding: 30px 10px;
    position: absolute;
    z-index: 1;
    bottom: -140px;
    left: 160%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Ocultar oferta en modo escaparate */
body.modo-escaparate .oferta-tabla,
body.modo-escaparate .oferta-producto .tooltiptext {
    display: none !important;
}


/* ------------------------------------------- */
/* POPUP OFERTA (Desktop) */
/* ------------------------------------------- */
#mi-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10100;
}

#mi-popup {
    width: 60%;
    max-width: 800px;
    z-index: 10200;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0;
    background: #fff;
    border: none;
    border-radius: 8px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
}

#mi-popup .contenedor-oferta-checkout .ixoprice {
    color: red;
}

#mi-popup H2 {
    text-align: center;
    font-weight: bold;
}

.popup-close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    z-index: 10011;
    background: #e00;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    line-height: 18px;
    text-align: center;
    border: 2px solid #fff;
}

.popup-close-btn:hover {
    background: #c00;
    transform: scale(1.1);
}

@media (max-width: 767px) {
    #mi-popup {
        width: 90% !important;
        top: 50% !important;
        padding: 0 !important;
    }

    #mi-popup .texto-presentacion {
        font-size: 13px;
        line-height: 18px;
    }

    #mi-popup .ixo-custom-loop-product {

    }

    .contenedor-oferta-checkout.swiper-wrapper {
        display: flex;
    }

    #mi-popup .ixo-custom-loop-product img {
        height: auto;
        max-width: 60%;
    }
}


/* ------------------------------------------- */
/* SWIPER OFERTA - Flechas de navegación */
/* ------------------------------------------- */
.contenedor-oferta-swiper .swiper-button-prev,
.contenedor-oferta-swiper .swiper-button-next {
    background-color: #188803;
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    cursor: pointer;
    background-image: none !important;
    transition: background-color 0.3s, transform 0.3s;
    display: none;
}

@media (max-width: 767px) {
    .contenedor-oferta-swiper .swiper-button-prev,
    .contenedor-oferta-swiper .swiper-button-next {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.contenedor-oferta-swiper .swiper-button-prev {
    left: 10px;
}

.contenedor-oferta-swiper .swiper-button-next {
    right: 10px;
}

.contenedor-oferta-swiper .swiper-button-prev:hover,
.contenedor-oferta-swiper .swiper-button-next:hover {
    background-color: #188803;
    transform: translateY(-50%) scale(1.1);
}

.contenedor-oferta-swiper .swiper-button-prev::after,
.contenedor-oferta-swiper .swiper-button-next::after {
    font-family: swiper-icons;
    font-size: 16px;
    color: white;
    line-height: 1;
}

.contenedor-oferta-swiper .swiper-button-prev::after {
    content: 'prev';
}

.contenedor-oferta-swiper .swiper-button-next::after {
    content: 'next';
}


/* ------------------------------------------- */
/* MODAL OFERTA (shortcode ds-modal-container) */
/* ------------------------------------------- */
.ds-modal-container {
    width: 100%;
    border: none;
    box-shadow: none;
}

.ds-modal-container .ds-modal-content {
    padding: 40px 30px;
    text-align: center;
}

.ds-modal-container .ds-icon-box {
    font-size: 40px;
    margin-bottom: 15px;
    display: block;
}

.ds-modal-container .ds-modal-title {
    color: #333 !important;
    font-weight: 800 !important;
    font-size: 22px !important;
    letter-spacing: 1px;
    margin: 0 0 15px 0 !important;
    text-transform: uppercase;
    line-height: 1.2;
}

.ds-modal-container .ds-divider {
    height: 3px;
    width: 50px;
    background-color: #82b440;
    margin: 0 auto 20px;
}

.ds-modal-container .ds-modal-text {
    color: #555;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.ds-modal-container .ds-highlight-price {
    color: #82b440;
    font-weight: 700;
    font-size: 1.1em;
    border-bottom: 2px dashed #82b440;
    padding-bottom: 2px;
}

.ds-modal-container .ds-action-area {
    margin-top: 10px;
}

.ds-modal-container .ds-btn-main {
    background-color: #82b440;
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 14px;
    text-transform: uppercase;
    border: none;
}

.ds-modal-container .ds-btn-main:hover {
    background-color: #6a9334;
    text-decoration: none !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(130, 180, 64, 0.3);
}

.ds-modal-container .ds-secondary-text {
    font-size: 12px;
    color: #999;
    margin-top: 18px;
    font-style: italic;
}

/* Modal con productos activos */
.ds-modal-oferta-activa {
    max-width: 800px;
}

.ds-modal-oferta-activa .ds-modal-content {
    padding: 0px 0px;
}

.ds-modal-oferta-activa .ds-urgency-tag {
    color: #e33;
    font-weight: bold;
    background: #ffebeb;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin: 10px 0;
}

.ds-modal-oferta-activa form.cart {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    width: 100% !important;
    margin: 10px 0 !important;
}

.ds-modal-oferta-activa .quantity.buttons_added {
    width: auto !important;
    min-width: 0 !important;
    display: flex !important;
    flex: 0 0 auto !important;
}

.ds-modal-oferta-activa .quantity input.qty {
    width: 30px !important;
    height: 32px !important;
    padding: 0 !important;
    text-align: center !important;
    border: 1px solid #ddd !important;
    flex: 0 0 auto !important;
}

.ds-modal-oferta-activa .quantity input.minus,
.ds-modal-oferta-activa .quantity input.plus {
    width: 28px !important;
    height: 32px !important;
    line-height: 1 !important;
    padding: 0 !important;
    background-color: #82b440 !important;
    color: white !important;
    border: none !important;
}

.ds-modal-oferta-activa .single_add_to_cart_button {
    flex: 0 1 auto !important;
    height: 32px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
    background-color: #82b440 !important;
}


/* ------------------------------------------- */
/* BOTÓN LATERAL FIJO - Promo oferta */
/* ------------------------------------------- */
#ixo-oferta-lateral {
    position: fixed;
    right: 0;
    top: auto;
    bottom: 80px;
    z-index: 9999;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    background-color: #e63e2f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    padding: 20px 10px;
    border-radius: 0 20px 20px 0;
    box-shadow: -2px 2px 8px rgba(0,0,0,0.25);
    letter-spacing: 0.04em;
    transition: background-color 0.2s;
    line-height: 1.2;
}

#ixo-oferta-lateral:hover {
    background-color: #c0321f;
    color: #fff;
    text-decoration: none;
}

#ixo-oferta-lateral .ixo-oferta-lat-desktop { display: inline; }
#ixo-oferta-lateral .ixo-oferta-lat-mobile  { display: none; }

@media (max-width: 767px) {
    #ixo-oferta-lateral {
        writing-mode: horizontal-tb;
        transform: none;
        font-size: 13px;
        padding: 10px 14px;
        border-radius: 20px 0 0 20px;
    }
    #ixo-oferta-lateral .ixo-oferta-lat-desktop { display: none; }
    #ixo-oferta-lateral .ixo-oferta-lat-mobile  { display: inline; }
}