/**
 * ZD Selector Múltiple — estilos de la tabla/matriz de talles y colores.
 */

.woocommerce-message.success-message {
    background-color: #f0f8f0;
    border-left-color: #46b450;
    color: #46b450;
    padding: 15px;
    margin-bottom: 20px;
    border-left: 4px solid;
}
/* OCULTAR LABEL DE TALLES */
.woo-variation-swatches.wvs-show-label .variations td .woo-selected-variation-item-name,
.woo-variation-swatches.wvs-show-label .variations td label,
.woo-variation-swatches.wvs-show-label .variations th .woo-selected-variation-item-name,
.woo-variation-swatches.wvs-show-label .variations th label {
    display: none !important;
}
/* OCULTAR TABLE DE TALLES ORIGINAL */
.woo-variation-swatches .variable-items-wrapper {
    display: none !important;
}
/* OCULTAR SELECTOR DE CANTIDAD ORIGINAL */
.single-product div.ux-quantity.quantity.buttons_added.form-flat {
    display: none !important;
}
.talle-table .quantity {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    line-height: 0;
}
.talle-table .quantity .qty,
.talle-table .quantity input.input-text.qty {
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    height: 34px;
    line-height: 34px;
    font-weight: 600;
    color: #333;
}
.talle-table .quantity input.input-text.qty:focus {
    box-shadow: none;
    outline: none;
    background: #fafafa;
}
.talle-table .quantity input[type="number"]::-webkit-outer-spin-button,
.talle-table .quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.talle-table .quantity input[type="number"] {
    -moz-appearance: textfield;
}
.talle-table .quantity .quantity-btn {
    position: relative;
    flex: 0 0 auto;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: #f4f4f4;
    color: #333;
    font-size: 0;
    line-height: 0;
    letter-spacing: 0;
    text-indent: 0;
    box-shadow: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .15s ease;
}
.talle-table .quantity .quantity-btn:hover {
    background: #e9e9e9;
}
.talle-table .quantity .quantity-btn:active {
    background: #dedede;
}
.talle-table .quantity .quantity-btn::before,
.talle-table .quantity .quantity-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    margin: -1px 0 0 -7px;
    background: currentColor;
    border-radius: 1px;
}
.talle-table .quantity .quantity-btn.minus::after {
    display: none;
}
.talle-table .quantity .quantity-btn.plus::after {
    width: 2px;
    height: 14px;
    margin: -7px 0 0 -1px;
}
.talle-table .quantity .quantity-btn.minus {
    border-right: 1px solid #e6e6e6;
}
.talle-table .quantity .quantity-btn.plus {
    border-left: 1px solid #e6e6e6;
}
.talle-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.talle-table th,
.talle-table td {
    padding: 10px;
    text-align: center;
    border: 0;
}
/* Flatsome pone una línea punteada entre filas (.product-summary table tr+tr) */
.product-summary .talle-table tr {
    border: 0;
}
/* Línea punteada sólo debajo del encabezado */
.product-summary .talle-table thead tr {
    border-bottom: 1px dashed #ddd;
}
.talle-table th {
    background: #f8f8f8;
    font-weight: bold;
}
.talle-table.talle-matrix {
    table-layout: fixed;
    max-width: 100%;
}
.talle-table.talle-matrix thead th {
    background: #e8e8e8;
    border: 0;
    padding: 12px 8px;
    font-size: 0.95em;
}
.talle-table.talle-matrix thead th:first-child {
    background: transparent;
    border: none;
}
.talle-table.talle-matrix tbody th {
    background: #f5f5f5;
    border: 0;
    font-weight: 600;
    width: 80px;
}
.talle-table.talle-matrix tbody td {
    border: 0;
    vertical-align: middle;
}
.talle-table.talle-matrix .no-combo {
    color: #bbb;
}
.talle-table.talle-matrix tbody td .quantity {
    margin: 0 auto;
}
/* Mismo alto que el control de cantidad, para que todas las filas midan igual */
.talle-table .agotado-label {
    color: #b6251c;
    display: inline-flex;
    align-items: center;
    height: 36px;
}
/* ---- Tabla de talles: scroll horizontal + columna fija ---- */
.talle-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 20px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    /* form.cart de Flatsome es flex: sin esto el ancho de la tabla empuja a los contenedores y el scroll no se activa */
    contain: inline-size;
}
/* Barra de desplazamiento visible (sólo aparece si la tabla no entra). iOS no permite estilizarla. */
.talle-table-wrap::-webkit-scrollbar {
    height: 6px;
}
.talle-table-wrap::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}
.talle-table-wrap::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 3px;
}
/* Firefox (y Chrome ignora ::-webkit-scrollbar si se definen estas, por eso van aparte) */
@supports not selector(::-webkit-scrollbar) {
    .talle-table-wrap {
        scrollbar-width: thin;
        scrollbar-color: #bbb #f0f0f0;
    }
}
.talle-table-wrap .talle-table {
    margin: 0;
}
/* Tabla simple (sin colores): angosta, para que el control quede cerca del talle */
.talle-table:not(.talle-matrix) {
    max-width: 400px;
}
.talle-table.talle-matrix {
    table-layout: auto;
    width: 100%;
    max-width: none;
}
.talle-table.talle-matrix thead th,
.talle-table.talle-matrix tbody td {
    min-width: 104px;
    white-space: nowrap;
}
/* Columna de talles siempre visible al hacer scroll */
.talle-table.talle-matrix thead th:first-child,
.talle-table.talle-matrix tbody th {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    z-index: 2;
}
.talle-table.talle-matrix thead th:first-child {
    background: #fff;
    box-shadow: none;
}
.talle-table.talle-matrix tbody th {
    background: #f5f5f5;
    box-shadow: none;
}
.talle-table .quantity {
    flex-wrap: nowrap;
    white-space: nowrap;
}
.talle-table .quantity input.input-text.qty {
    width: 3.2em;
    min-width: 0;
    text-align: center;
    padding-left: 2px;
    padding-right: 2px;
}
@media (max-width: 849px) {
    .talle-table-wrap {
        margin: 15px 0;
        /* sombra lateral que indica que hay mas columnas */
        background:
            linear-gradient(to right, #fff 30%, rgba(255,255,255,0)) left center / 24px 100% no-repeat,
            linear-gradient(to left, #fff 30%, rgba(255,255,255,0)) right center / 24px 100% no-repeat,
            radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) left center / 10px 100% no-repeat,
            radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.14), rgba(0,0,0,0)) right center / 10px 100% no-repeat;
        background-attachment: local, local, scroll, scroll;
    }
    .talle-table {
        margin: 0;
        font-size: 14px;
    }
    .talle-table th,
    .talle-table td {
        padding: 6px 5px;
    }
    .talle-table.talle-matrix thead th {
        padding: 8px 5px;
        font-size: 13px;
    }
    .talle-table.talle-matrix tbody th {
        width: 52px;
        min-width: 52px;
        padding: 6px 4px;
        font-size: 13px;
    }
    .talle-table.talle-matrix thead th,
    .talle-table.talle-matrix tbody td {
        min-width: 92px;
    }
    .talle-table .quantity .quantity-btn {
        width: 32px;
        min-width: 32px;
        height: 34px;
    }
    .talle-table .quantity .quantity-btn::before,
    .talle-table .quantity .quantity-btn::after {
        width: 12px;
        margin: -1px 0 0 -6px;
    }
    .talle-table .quantity .quantity-btn.plus::after {
        width: 2px;
        height: 12px;
        margin: -6px 0 0 -1px;
    }
    .talle-table .quantity input.input-text.qty {
        width: 36px;
        height: 34px;
        padding: 0;
        font-size: 14px;
        line-height: 34px;
    }
    .product-talles-subtotal {
        margin-top: 12px;
        font-size: 15px;
    }
}
