.mwp-grupo-modelo {
    width: 100%;
    max-width: none;

    margin: 14px 0 0 0;
    padding: 0;

    box-sizing: border-box;

    font-family: inherit;
}


/*
 * Refuerzo para que el bloque Gama de producto
 * use todo el ancho disponible.
 */

.single-product .summary .mwp-grupo-modelo,
.woocommerce div.product .summary .mwp-grupo-modelo,
.woocommerce div.product div.summary .mwp-grupo-modelo {
    width: 100%;
    max-width: none;

    box-sizing: border-box;
}


/* ==========================================================
   CABECERA
   ========================================================== */

.mwp-grupo-modelo-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

    margin: 0 0 10px 0;
}


.mwp-grupo-modelo-titulo {
    display: block;

    margin: 0;

    color: #102f4a;

    font-family: inherit;

    font-size: 17px;

    font-weight: 900;

    line-height: 1.25;
}
/* ==========================================================
   BOTÓN AÑADIR AL CARRITO
   ========================================================== */

.mwp-grupo-modelo-add-all-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    min-height: 36px;

    margin: 0;

    padding: 0 14px;

    background: var(--mm-color-principal-oscuro);

    border: 1px solid var(--mm-color-principal-oscuro);

    border-radius: 8px;

    color: #ffffff;

    font-family: inherit;

    font-size: 13px;

    font-weight: 900;

    line-height: 1;

    cursor: pointer;

    box-shadow: none;

    text-decoration: none;

    white-space: nowrap;

    box-sizing: border-box;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}


.mwp-grupo-modelo-add-all-btn i {
    color: #ffffff;

    font-size: 14px;

    line-height: 1;
}


.mwp-grupo-modelo-add-all-btn:hover,
.mwp-grupo-modelo-add-all-btn:focus {
    background: var(--mm-color-principal);

    border-color: var(--mm-color-principal);

    color: #ffffff;

    outline: none;
}


.mwp-grupo-modelo-add-all-btn.is-loading {
    opacity: 0.75;

    cursor: wait;
}


.mwp-grupo-modelo-add-all-btn.is-added {
    background: var(--mm-color-principal-oscuro);

    border-color: var(--mm-color-principal-oscuro);

    color: #ffffff;
}
/* ==========================================================
   SCROLL
   ========================================================== */

.mwp-grupo-modelo-scroll {
    width: 100%;

    max-height: 330px;

    overflow-y: auto;
    overflow-x: hidden;

    padding-right: 4px;
}


.mwp-grupo-modelo-scroll::-webkit-scrollbar {
    width: 6px;
}


.mwp-grupo-modelo-scroll::-webkit-scrollbar-track {
    background: #f2f4f7;

    border-radius: 999px;
}


.mwp-grupo-modelo-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;

    border-radius: 999px;
}


/* ==========================================================
   LISTA
   ========================================================== */

.mwp-grupo-modelo-lista {
    display: flex;

    flex-direction: column;

    gap: 8px;

    list-style: none;

    margin: 0;

    padding: 0;
}


/* ==========================================================
   TARJETA PRODUCTO
   ========================================================== */

.mwp-grupo-modelo-item {
    display: grid;

    grid-template-columns:
        56px
        minmax(0, 1fr);

    gap: 10px;

    align-items: center;

    margin: 0;

    padding: 8px;

    background: #ffffff;

    border: 1px solid #dde5ec;

    border-radius: 10px;

    box-sizing: border-box;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}


.mwp-grupo-modelo-item:hover {
    border-color: #aebdca;

    box-shadow:
        0 4px 12px
        rgba(16, 47, 74, 0.08);
}


/* ==========================================================
   IMAGEN
   ========================================================== */

.mwp-grupo-modelo-imagen-link {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 56px;

    height: 56px;

    text-decoration: none;

    background: #ffffff;

    border: 1px solid #edf1f7;

    border-radius: 8px;

    box-sizing: border-box;
}


.mwp-grupo-modelo-img {
    display: block;

    max-width: 46px;

    max-height: 46px;

    width: auto;

    height: auto;

    object-fit: contain;

    border: 0;

    background: transparent;

    padding: 0;

    box-sizing: border-box;
}


.mwp-grupo-modelo-sin-imagen {
    display: flex;

    align-items: center;

    justify-content: center;

    width: 46px;

    height: 46px;

    color: #6c7588;

    font-family: inherit;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.1;

    text-align: center;
}


/* ==========================================================
   INFORMACIÓN PRODUCTO
   ========================================================== */

.mwp-grupo-modelo-info {
    min-width: 0;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        150px;

    gap: 10px;

    align-items: center;
}


.mwp-grupo-modelo-datos {
    min-width: 0;
}


.mwp-grupo-modelo-nombre-linea {
    min-width: 0;

    width: 100%;

    display: flex;

    align-items: center;

    gap: 8px;

    flex-wrap: nowrap;
}


/* ==========================================================
   NOMBRE
   ========================================================== */

.mwp-grupo-modelo-nombre {
    display: block;

    flex: 1 1 auto;

    min-width: 0;

    color: #000000;

    font-family: inherit;

    font-size: 13px;

    font-weight: 800;

    line-height: 1.25;

    text-decoration: none;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


.mwp-grupo-modelo-nombre:hover {
    color: #102f4a;

    text-decoration: none;
}


/* ==========================================================
   CÓDIGO PRODUCTO
   ========================================================== */

.mwp-grupo-modelo-codigo {
    display: inline-flex;

    flex: 0 0 auto;

    align-items: center;

    padding: 2px 6px;

    background: #f4f7fb;

    border: 1px solid #edf1f7;

    border-radius: 999px;

    color: #6c7588;

    font-family: inherit;

    font-size: 11px;

    font-weight: 800;

    line-height: 1.1;

    white-space: nowrap;
}


/* ==========================================================
   STOCK
   ========================================================== */

.mwp-grupo-modelo-stock {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 5px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.mwp-grupo-modelo-stock-label {
    font-weight: 600;
}

.mwp-grupo-modelo-stock-value {
    font-weight: 900;
}

.mwp-grupo-modelo-stock.is-stock {
    color: #238636;
}

.mwp-grupo-modelo-stock.is-no-stock {
    color: #dc3545;
}


/* ==========================================================
   CONTROL DE CANTIDAD
   ========================================================== */

.mwp-grupo-modelo-qty-control {
    display: grid;

    grid-template-columns:
        30px
        84px
        30px;

    height: 34px;

    overflow: hidden;

    background: var(--mata-qty-control-bg);

    border: 1px solid var(--mata-qty-control-border);

    border-radius: 8px;

    box-sizing: border-box;
}


/* ==========================================================
   BOTONES - / +
   ========================================================== */

.mwp-grupo-modelo-qty-btn {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 30px;

    height: 34px;

    margin: 0;

    padding: 0;

    background: var(--mata-qty-control-bg);

    border: 0;

    color: var(--mata-qty-control-color);

    font-family: inherit;

    font-size: 17px;

    font-weight: 900;

    line-height: 1;

    cursor: pointer;

    box-shadow: none;

    border-radius: 0;

    box-sizing: border-box;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.mwp-grupo-modelo-minus {
    border-right:
        1px solid var(--mata-qty-control-border);
}


.mwp-grupo-modelo-plus {
    border-left:
        1px solid var(--mata-qty-control-border);
}


.mwp-grupo-modelo-qty-btn:hover,
.mwp-grupo-modelo-qty-btn:focus {
    background: var(--mata-qty-control-hover-bg);

    color: var(--mata-qty-control-color);

    outline: none;
}


/* ==========================================================
   INPUT CANTIDAD
   ========================================================== */

.mwp-grupo-modelo-qty-number {
    width: 84px;

    min-width: 84px;

    height: 34px;

    margin: 0;

    padding: 0 4px;

    background: #ffffff;

    border: 0;

    border-radius: 0;

    color: #102f4a;

    font-family: inherit;

    font-size: 14px;

    font-weight: 900;

    line-height: 34px;

    text-align: center;

    box-shadow: none;

    outline: none;

    box-sizing: border-box;

    appearance: textfield;

    -moz-appearance: textfield;
}


.mwp-grupo-modelo-qty-number::-webkit-outer-spin-button,
.mwp-grupo-modelo-qty-number::-webkit-inner-spin-button {
    -webkit-appearance: none;

    margin: 0;
}


/* ==========================================================
   SIN STOCK
   ========================================================== */

.mwp-grupo-modelo-sin-stock {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 28px;

    padding: 4px 8px;

    background: #fff5f5;

    border: 1px solid #ffd7d7;

    border-radius: 999px;

    color: #dc3545;

    font-family: inherit;

    font-size: 11px;

    font-weight: 900;

    line-height: 1;

    white-space: nowrap;
}


/* ==========================================================
   FOOTER
   ========================================================== */

.mwp-grupo-modelo-footer {
    display: none;

    margin-top: 10px;
}


/* ==========================================================
   ESTADO LOADING
   ========================================================== */

.mwp-grupo-modelo.is-loading {
    opacity: 0.92;
}


.mwp-grupo-modelo.is-loading
.mwp-grupo-modelo-item {
    pointer-events: none;
}


/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 768px) {

    .mwp-grupo-modelo {
        max-width: 100%;
    }


    .mwp-grupo-modelo-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .mwp-grupo-modelo-header
    .mwp-grupo-modelo-add-all-btn {
        width: 100%;
    }


    .mwp-grupo-modelo-info {
        grid-template-columns:
            1fr;

        gap: 8px;
    }


    .mwp-grupo-modelo-nombre-linea {
        flex-wrap: wrap;

        align-items: baseline;
    }


    .mwp-grupo-modelo-nombre {
        white-space: normal;

        overflow: visible;

        text-overflow: clip;
    }


    .mwp-grupo-modelo-qty-control {
        grid-template-columns:
            34px
            84px
            34px;

        width: 152px;
    }


    .mwp-grupo-modelo-qty-btn {
        width: 34px;
    }


    .mwp-grupo-modelo-qty-number {
        width: 84px;

        min-width: 84px;
    }


    .mwp-grupo-modelo-footer {
        display: block;
    }


    .mwp-grupo-modelo-footer
    .mwp-grupo-modelo-add-all-btn {
        width: 100%;
    }

}

/* ==========================================================
   AVISOS DE LA GAMA
   ========================================================== */

.mwp-grupo-modelo-notice {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    box-sizing: border-box;
}

.mwp-grupo-modelo-notice.is-success,
.mwp-grupo-modelo-notice.is-warning,
.mwp-grupo-modelo-notice.is-error {
    display: flex;
}

.mwp-grupo-modelo-notice.is-success {
    background: #f2f8f4;
    border-color: #d3e8da;
    color: #347554;
}

.mwp-grupo-modelo-notice.is-warning {
    background: #fff8e8;
    border-color: #f1dfae;
    color: #72551a;
}

.mwp-grupo-modelo-notice.is-error {
    background: #fff4f3;
    border-color: #efd3d0;
    color: #963d36;
}

.mwp-grupo-modelo-notice-link {
    flex: 0 0 auto;
    color: inherit;
    font-weight: 900;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ==========================================================
   ERROR EN UNA LINEA CONCRETA
   ========================================================== */

.mwp-grupo-modelo-item.has-error {
    border-color: #e3aaa5;
    background: #fffafa;
}

.mwp-grupo-modelo-item-error {
    grid-column: 1 / -1;
    margin: 0;
    padding: 7px 9px;
    background: #fff4f3;
    border: 1px solid #efd3d0;
    border-radius: 6px;
    color: #963d36;
    font-family: inherit;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

@media (max-width: 768px) {
    .mwp-grupo-modelo-notice {
        align-items: flex-start;
        flex-direction: column;
    }
}
