/* ============================================================
   WC Quantity Per Talla — Estilos del grid de tallas
   ============================================================ */

/* Contenedor principal */
.wc-qty-per-talla-wrapper {
    margin: 18px 0 22px;
    padding-top: 18px;
    border-top: 1px solid #e5e5e5;
}

/* Encabezado */
.wc-qty-per-talla-heading {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin: 0 0 14px;
}

/* Grid de tallas */
.wc-qty-per-talla-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    align-items: flex-start;
}

/* Ítem individual (talla + control) */
.wc-qty-size-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 78px;
    transition: opacity 0.2s ease;
}

.wc-qty-size-item.out-of-stock {
    opacity: 0.38;
    pointer-events: none;
}

/* Etiqueta de talla */
.size-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #444;
    line-height: 1;
}

/* ─── Control numérico ─── */
.qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid #d0d0d0;
    border-radius: 30px;
    height: 38px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.15s;
}

.qty-control:focus-within {
    border-color: #888;
}

.qty-control button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0 10px;
    font-size: 17px;
    height: 100%;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.12s;
    user-select: none;
    -webkit-user-select: none;
}

.qty-control button:hover:not([disabled]) {
    color: #111;
}

.qty-control button[disabled] {
    color: #ccc;
    cursor: not-allowed;
}

/* Input numérico */
.size-qty-input {
    width: 38px;
    text-align: center;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 700;
    color: #222;
    background: transparent;
    padding: 0;
    margin: 0;
    height: 100%;
    box-sizing: border-box;
    /* Ocultar flechas nativas */
    -moz-appearance: textfield;
}

.size-qty-input::-webkit-outer-spin-button,
.size-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Diferencial de precio / out-of-stock */
.size-price-diff {
    font-size: 10px;
    color: #888;
    line-height: 1;
    min-height: 13px;
    text-align: center;
}

.size-price-diff.oos-label {
    color: #b0b0b0;
    font-style: italic;
}

/* ─── Aviso de estado (éxito / error) ─── */
.wc-qty-per-talla-notice {
    margin-top: 14px;
    padding: 9px 14px;
    border-radius: 5px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}

.wc-qty-per-talla-notice.error {
    display: block;
    background: #fdf0ef;
    color: #c0392b;
    border: 1px solid #f5c6c2;
}

.wc-qty-per-talla-notice.success {
    display: block;
    background: #edfaf1;
    color: #1e8449;
    border: 1px solid #b7e4c7;
}

/* Enlace "Ver carrito" dentro del aviso de éxito */
.wc-qty-per-talla-notice.success .wc-qty-view-cart {
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    color: #1e8449;
    text-decoration: underline;
    white-space: nowrap;
}
.wc-qty-per-talla-notice.success .wc-qty-view-cart:hover {
    color: #145a32;
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
    .wc-qty-per-talla-grid {
        gap: 12px 14px;
    }

    .wc-qty-size-item {
        min-width: 68px;
    }

    .qty-control {
        height: 34px;
    }

    .qty-control button {
        padding: 0 8px;
        height: 100%;
    }

    .size-qty-input {
        width: 32px;
        height: 100%;
        font-size: 13px;
    }
}
