/**
 * Opções de variações - Swatches (botões)
 *
 * @package Zhf_Ecommerce
 * @since 3.62.0
 */

.zhf-variation-swatches-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.zhf-variation-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.zhf-swatch-btn {
    position: relative;
    border: 1px solid #ccc;
    background: #fff;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    font-size: 14px;
    min-width: 45px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zhf-swatch-btn:hover:not(.disabled):not(.out-of-stock) {
    border-color: #000;
    background-color: #000;
    color: #fff;
}

.zhf-swatch-btn.selected {
    border-color: #000;
    background-color: #000;
    color: #fff;
}

.zhf-swatch-btn.out-of-stock::after {
    content: "×";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8em;
    font-weight: bold;
    line-height: 1;
    color: #c00;
    background: rgba(255, 255, 255, 0.75);
    border-radius: inherit;
    pointer-events: none;
}

/* Esconde o select original mantendo acessibilidade (leitores de tela, teclado) */
.zhf-variation-swatches-wrapper .zhf-variation-select-wrap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
