/* Texto oscuro y fondo blanco para tallas */
.mas-size-swatch {
    color: #222 !important;
    background: #fff !important;
    border: 1px solid #bbb !important;
}
/**
 * Estilos modernos para variaciones de WooCommerce (Color / Talla)
 * No dependen del tema y se aplican sólo en la ficha de producto.
 */

.mas-attr-wrapper {
    margin: 0 0 1.5rem;
}

.mas-attr-label {
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.mas-attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Botones genéricos */
.mas-attr-option {
    position: relative;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    cursor: pointer;
    font-size: 13px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    line-height: 1.2;
    transition: all 0.18s ease-out;
    min-width: 2.4rem;
    text-align: center;
    outline-width: 0px;
}

.mas-attr-option:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

.mas-attr-option:hover:not(.mas-disabled) {
    box-shadow: 0 0 0 1px #11182726, 0 2px 4px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

/* Estado seleccionado (solo borde negro, sin fondo) */
.mas-attr-option.mas-selected {
    border-color: var(--mas-color-variations-border) !important;
    box-shadow: 0 0 0 1px var(--mas-color-variations-border) !important;
    /* No tocar background ni color */
}

/* Deshabilitado */
.mas-attr-option.mas-disabled {
    opacity: 0.35;
    cursor: not-allowed;
    box-shadow: none;
}

/* Swatches de color con imagen: perfectamente circulares */
.mas-color-swatch {
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border-width: 1px;
    overflow: hidden;
    text-indent: -9999px;
    background: #e5e7eb;
    background-image: var(--mas-color-img);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: all 0.18s ease-out;
    aspect-ratio: 1/1;
}

/* Hover y seleccionado: solo borde negro, sin fondo */
.mas-color-swatch:hover:not(.mas-disabled),
.mas-color-swatch.mas-selected {
    border-color: var(--mas-color-variations-border) !important;
    box-shadow: 0 0 0 1px var(--mas-color-variations-border) !important;
    filter: none;
}

/* Swatches de talla */
.mas-size-swatch {
    min-width: 2.4rem;
    border-radius: 0.5rem;
}

/* Evitar parpadeo: ocultar variaciones hasta que carguen los swatches */
.variations_form:not(.mas-variations-ready) .variations {
    opacity: 0;
}
.variations_form.mas-variations-ready .variations {
    opacity: 1;
    transition: opacity 0.15s ease-in;
}

.variations .label, .variations .value {
    padding: 0;
    vertical-align: baseline;
}

.variations tr {
    background-color: inherit !important;
}

/* Responsive */
@media (max-width: 600px) {
    .mas-attr-options {
        gap: 0.25rem;
    }
    .mas-attr-option {
        font-size: 12px;
        padding: 0.3rem 0.6rem;
    }
    .mas-color-swatch {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        aspect-ratio: 1/1;
    }
}
