/* =========================================================
   MICROLIDER BENEFICIOS
   Frontend CSS
   ========================================================= */

.mlb-benefits {
    --mlb-primary: #111;
    --mlb-columns: 3;

    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;

    margin: 0 auto;
    padding: 34px 18px 42px;

    font-family: inherit;
    color: #171717;
}

.mlb-benefits * {
    box-sizing: border-box;
}


/* =========================================================
   ENCABEZADO
   ========================================================= */

.mlb-heading {
    text-align: center;
    max-width: 790px;
    margin: 0 auto 28px;
}

.mlb-title {
    margin: 0 0 10px;

    font-size: clamp(28px, 3vw, 42px);
    line-height: 1.12;
    font-weight: 700;
    letter-spacing: -0.02em;

    color: #161616;
}

.mlb-subtitle {
    margin: 0;

    font-size: 16px;
    line-height: 1.6;

    color: #666;
}


/* =========================================================
   TOOLBAR
   ========================================================= */

.mlb-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 16px;

    margin: 0 auto 30px;
}


/* =========================================================
   BUSCADOR
   ========================================================= */

.mlb-search-wrap {
    position: relative;

    width: 100%;
    max-width: 620px;
}


/*
 * Lupa propia del plugin.
 */

.mlb-search-icon {
    position: absolute;

    left: 18px;
    top: 50%;

    width: 17px;
    height: 17px;

    border: 2px solid #777;
    border-radius: 50%;

    transform: translateY(-55%);

    pointer-events: none;

    z-index: 3;
}

.mlb-search-icon::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 2px;

    right: -5px;
    bottom: -3px;

    background: #777;

    transform: rotate(45deg);

    border-radius: 2px;
}


/*
 * Importante:
 * se utiliza una especificidad mayor para impedir que
 * el tema de MICROLIDER sobrescriba el padding del buscador.
 */

.mlb-benefits .mlb-search-wrap .mlb-search {
    display: block;

    width: 100%;
    height: 48px;

    margin: 0 !important;

    padding-top: 0 !important;
    padding-right: 16px !important;
    padding-bottom: 0 !important;
    padding-left: 52px !important;

    border: 1px solid #d7d7d7 !important;
    border-radius: 10px !important;

    background-color: #fff !important;
    background-image: none !important;
    background-position: initial !important;
    background-repeat: no-repeat !important;
    background-size: auto !important;

    color: #222 !important;

    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    line-height: normal !important;

    text-indent: 0 !important;

    outline: none !important;

    box-shadow: none !important;

    -webkit-appearance: none !important;
    appearance: none !important;

    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}


/*
 * Placeholder.
 */

.mlb-benefits .mlb-search::placeholder {
    color: #aaa !important;
    opacity: 1;
}

.mlb-benefits .mlb-search::-webkit-input-placeholder {
    color: #aaa !important;
    opacity: 1;
}

.mlb-benefits .mlb-search::-moz-placeholder {
    color: #aaa !important;
    opacity: 1;
}


/*
 * Elimina controles/iconos automáticos que algunos temas
 * y navegadores aplican a input[type="search"].
 */

.mlb-benefits .mlb-search::-webkit-search-decoration,
.mlb-benefits .mlb-search::-webkit-search-cancel-button,
.mlb-benefits .mlb-search::-webkit-search-results-button,
.mlb-benefits .mlb-search::-webkit-search-results-decoration {
    display: none !important;

    -webkit-appearance: none !important;
}


/*
 * Focus.
 */

.mlb-benefits .mlb-search-wrap .mlb-search:focus {
    border-color: var(--mlb-primary) !important;

    box-shadow:
        0 0 0 3px rgba(0, 0, 0, 0.06) !important;

    outline: none !important;
}


/* =========================================================
   FILTROS
   ========================================================= */

.mlb-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 9px;
}

.mlb-filter {
    appearance: none;
    -webkit-appearance: none;

    border: 1px solid #d7d7d7;

    background: #fff;
    color: #333;

    border-radius: 999px;

    padding: 9px 18px;

    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;

    transition: 0.2s;
}

.mlb-filter:hover {
    border-color: #888;
}

.mlb-filter.is-active {
    background: var(--mlb-primary);
    border-color: var(--mlb-primary);

    color: #fff;
}


/* =========================================================
   GRILLA
   ========================================================= */

.mlb-grid {
    display: grid;

    grid-template-columns:
        repeat(
            var(--mlb-columns),
            minmax(0, 1fr)
        );

    gap: 20px;
}


/* =========================================================
   TARJETAS
   ========================================================= */

.mlb-card {
    display: flex;
    flex-direction: column;

    min-height: 100%;

    background: #fff;

    border: 1px solid #e6e6e6;
    border-radius: 16px;

    padding: 24px;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.035);

    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.mlb-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.08);

    border-color: #d2d2d2;
}

.mlb-card[hidden] {
    display: none !important;
}


/* =========================================================
   LOGO DE LA ENTIDAD
   ========================================================= */

.mlb-card-logo {
    display: flex;

    align-items: center;
    justify-content: center;

    height: 82px;

    margin-bottom: 14px;
}

.mlb-logo-image {
    display: block;

    max-width: 190px !important;
    max-height: 70px !important;

    width: auto !important;
    height: auto !important;

    object-fit: contain;
}

.mlb-logo-fallback {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;

    border-radius: 14px;

    background: #f2f2f2;

    font-size: 28px;
    font-weight: 800;
}


/* =========================================================
   TÍTULO DE LA TARJETA
   ========================================================= */

.mlb-card-title {
    margin: 0 0 12px;

    text-align: center;

    font-size: 21px;
    line-height: 1.25;
    font-weight: 700;

    color: #1a1a1a;
}


/* =========================================================
   ETIQUETAS
   ========================================================= */

.mlb-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 7px;

    margin: 0 0 15px;
}

.mlb-badge {
    display: inline-flex;

    align-items: center;

    min-height: 26px;

    padding: 5px 9px;

    border-radius: 999px;

    background: #f2f3f5;
    color: #494949;

    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.mlb-badge-main {
    background: #ececec;
    color: #171717;
}


/* =========================================================
   RESUMEN
   ========================================================= */

.mlb-card-summary {
    margin: 0 0 18px;

    text-align: center;

    font-size: 14px;
    line-height: 1.55;

    color: #666;
}


/* =========================================================
   BENEFICIO DESTACADO
   ========================================================= */

.mlb-highlight {
    margin-top: auto;

    padding: 16px 12px;

    border-radius: 12px;

    background: #f6f6f6;

    text-align: center;

    font-size: 18px;
    line-height: 1.3;
    font-weight: 750;

    color: #181818;
}


/* =========================================================
   PIE DE TARJETA
   ========================================================= */

.mlb-card-footer {
    padding-top: 17px;
}


/* =========================================================
   BOTÓN VER DETALLES
   ========================================================= */

.mlb-details-button {
    display: block;

    width: 100%;
    min-height: 44px;

    border: 1px solid var(--mlb-primary);
    border-radius: 9px;

    background: var(--mlb-primary);
    color: #fff;

    font: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        opacity 0.2s,
        transform 0.2s;
}

.mlb-details-button:hover {
    opacity: 0.9;
}

.mlb-details-button:active {
    transform: translateY(1px);
}


/* =========================================================
   SIN RESULTADOS
   ========================================================= */

.mlb-empty {
    margin: 34px 0;

    padding: 18px;

    text-align: center;

    border: 1px dashed #ccc;
    border-radius: 12px;

    color: #666;
    background: #fafafa;
}


/* =========================================================
   AVISO LEGAL
   ========================================================= */

.mlb-disclaimer {
    max-width: 930px;

    margin: 28px auto 0;

    text-align: center;

    font-size: 12px;
    line-height: 1.6;

    color: #777;
}


/* =========================================================
   MODAL
   ========================================================= */

.mlb-modal {
    position: fixed;

    z-index: 999999;

    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 24px;
}

.mlb-modal.is-open {
    display: flex;
}

.mlb-modal-backdrop {
    position: absolute;

    inset: 0;

    background:
        rgba(0, 0, 0, 0.58);
}

.mlb-modal-panel {
    position: relative;

    z-index: 1;

    width: 100%;
    max-width: 680px;
    max-height: 86vh;

    overflow: auto;

    border-radius: 18px;

    background: #fff;

    padding: 30px;

    box-shadow:
        0 24px 90px rgba(0, 0, 0, 0.3);
}


/* =========================================================
   CERRAR MODAL
   ========================================================= */

.mlb-modal-close {
    position: absolute;

    right: 13px;
    top: 10px;

    width: 38px;
    height: 38px;

    border: 0;

    background: transparent;
    color: #555;

    font-size: 30px;
    line-height: 1;

    cursor: pointer;
}


/* =========================================================
   LOGO MODAL
   ========================================================= */

.mlb-modal-logo {
    text-align: center;

    margin-bottom: 10px;
}

.mlb-modal-logo-image {
    display: inline-block;

    max-width: 190px !important;
    max-height: 75px !important;

    width: auto !important;
    height: auto !important;

    object-fit: contain;
}


/* =========================================================
   TÍTULO MODAL
   ========================================================= */

.mlb-modal-title {
    margin: 6px 35px 10px;

    text-align: center;

    font-size: 28px;
    line-height: 1.2;
}


/* =========================================================
   BENEFICIO DESTACADO MODAL
   ========================================================= */

.mlb-modal-highlight {
    margin: 0 auto 22px;

    padding: 11px 14px;

    max-width: 430px;

    border-radius: 10px;

    background: #f5f5f5;

    text-align: center;

    font-size: 16px;
    font-weight: 700;
}

.mlb-modal-highlight:empty {
    display: none;
}


/* =========================================================
   CONTENIDO MODAL
   ========================================================= */

.mlb-modal-content {
    font-size: 15px;
    line-height: 1.65;

    color: #3f3f3f;
}

.mlb-modal-content ul,
.mlb-modal-content ol {
    padding-left: 22px;
}

.mlb-modal-content li {
    margin: 5px 0;
}

.mlb-modal-content p:first-child {
    margin-top: 0;
}


/* =========================================================
   ENLACE EXTERNO MODAL
   ========================================================= */

.mlb-modal-external {
    margin-top: 22px;
}

.mlb-modal-external:empty {
    display: none;
}

.mlb-modal-external a {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 42px;

    padding: 0 16px;

    border: 1px solid #ddd;
    border-radius: 8px;

    color: #222;

    text-decoration: none;

    font-weight: 700;
}

.mlb-modal-external a:hover {
    border-color: #999;
}


/*
 * Evita scroll de la página detrás del modal.
 */

.mlb-modal-open {
    overflow: hidden;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .mlb-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 680px) {

    .mlb-benefits {
        padding: 26px 12px 32px;
    }

    .mlb-grid {
        grid-template-columns: 1fr;
    }

    .mlb-card {
        padding: 20px;
    }

    .mlb-filters {
        width: 100%;
    }

    .mlb-filter {
        flex: 1 1 auto;
    }

    .mlb-modal {
        padding: 12px;
    }

    .mlb-modal-panel {
        padding: 26px 18px;
    }

    .mlb-modal-title {
        font-size: 23px;
    }

}


/* =========================================================
   FIX ESPECÍFICO PARA EL TEMA DE MICROLIDER
   ========================================================= */

/*
 * Algunos estilos antiguos del theme pueden aplicar
 * padding, background o iconos a input[type="search"].
 *
 * Estas reglas están deliberadamente al final del archivo
 * para tener prioridad en la cascada CSS.
 */

.mlb-benefits
.mlb-toolbar
.mlb-search-wrap
input.mlb-search[type="search"] {

    width: 100% !important;

    height: 48px !important;

    margin: 0 !important;

    padding:
        0
        16px
        0
        52px !important;

    border:
        1px solid
        #d7d7d7 !important;

    border-radius:
        10px !important;

    background:
        #fff !important;

    background-image:
        none !important;

    color:
        #222 !important;

    font-size:
        15px !important;

    line-height:
        normal !important;

    text-indent:
        0 !important;

    box-shadow:
        none !important;

    -webkit-appearance:
        none !important;

    appearance:
        none !important;
}


.mlb-benefits
.mlb-toolbar
.mlb-search-wrap
input.mlb-search[type="search"]:focus {

    border-color:
        var(--mlb-primary) !important;

    box-shadow:
        0 0 0 3px
        rgba(0, 0, 0, 0.06) !important;

    outline:
        none !important;
}


.mlb-benefits
.mlb-search-wrap
.mlb-search-icon {

    left: 18px !important;

    top: 50% !important;

    z-index: 5 !important;
}