/* Belvio native variation swatches */
.variations_form {
    width: 100%;
    margin-top: 18px;
}

.variations_form table.variations,
.variations_form table.variations tbody,
.variations_form table.variations tr,
.variations_form table.variations th,
.variations_form table.variations td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0;
}

.variations_form table.variations tr {
    margin-bottom: 18px;
}

.belvio-variation-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.belvio-variation-field select {
    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;
}

.belvio-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    align-items: center;
}

.belvio-swatch {
    min-width: 46px;
    height: 46px;
    border: 1px solid var(--belvio-border, #e8e3da);
    background: var(--belvio-bg);
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--belvio-font);
    font-size: 13px;
    font-weight: 800;
    color: var(--belvio-text);
    transition: border-color var(--belvio-transition-fast), box-shadow var(--belvio-transition-fast), transform var(--belvio-transition-fast), background var(--belvio-transition-fast), color var(--belvio-transition-fast);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .035);
}

/* Colour and shadow stay ungated — they are the only feedback a tap gets. */
.belvio-swatch:hover {
    border-color: var(--belvio-primary);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .09);
}

/* The lift is hover-only. On touch it sticks after the finger lifts, and a
   raised swatch reads as "this variant is selected" — worst right after a tap
   that DESELECTED it (variation-swatches.js toggles a selected swatch back to
   an empty value), leaving a lifted swatch with nothing chosen. */
@media (hover: hover) and (pointer: fine) {
    .belvio-swatch:hover {
        transform: translateY(-2px);
    }
}

.belvio-swatch:active {
    transform: scale(.97);
    transition: transform var(--belvio-transition-press);
}

.belvio-swatch.selected {
    border-color: var(--belvio-primary);
    box-shadow: 0 0 0 3px rgba(var(--belvio-primary-rgb, 131, 183, 53), 0.18), 0 10px 22px rgba(0, 0, 0, .08);
}

.belvio-swatch.disabled,
.belvio-swatch:disabled {
    cursor: not-allowed;
    opacity: 0.35;
    transform: none;
}

.belvio-swatch.disabled::after,
.belvio-swatch:disabled::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    top: 50%;
    height: 1px;
    background: var(--belvio-error);
    transform: rotate(-35deg);
}

.belvio-swatch--color,
.belvio-swatch--image {
    width: 46px;
    min-width: 46px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    padding: 4px;
    background-clip: content-box;
}

.belvio-swatch--color .belvio-swatch-inner,
.belvio-swatch--image .belvio-swatch-inner {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.65);
}

.belvio-swatch--button {
    padding: 0 18px;
    border-radius: 999px;
    background: #fff;
}

.belvio-swatch--button.selected {
    background: var(--belvio-primary);
    color: #fff;
}

.variations .label,
.variations .value {
    display: block;
    padding: 0 0 14px;
}

.variations label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 900;
    color: var(--belvio-text);
}

.belvio-selected-option {
    color: var(--belvio-primary-dark, #7c405a);
    font-size: 13px;
    font-weight: 800;
    text-transform: none;
}

.reset_variations {
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    min-height: 30px;
    margin-top: 12px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f6f3ed;
    font-size: 13px;
    font-weight: 800;
    color: var(--belvio-text-lighter);
}

.reset_variations:hover {
    background: var(--belvio-primary);
    color: #fff;
}

.quick-view-product .variations_form {
    margin-top: 16px;
}

.quick-view-product .belvio-swatches {
    gap: 9px;
}

.quick-view-product .belvio-swatch,
.quick-view-product .belvio-swatch--color,
.quick-view-product .belvio-swatch--image {
    min-width: 40px;
    width: 40px;
    height: 40px;
}

.quick-view-product .belvio-swatch--button {
    width: auto;
    min-width: 48px;
    padding: 0 14px;
}

.woocommerce-variation {
    margin: 12px 0;
}

.woocommerce-variation-price {
    font-size: 18px;
    font-weight: 900;
    color: var(--belvio-primary-dark, #7c405a);
}

.woocommerce-variation-availability {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
}

.woocommerce-variation-availability .stock {
    margin: 0;
}

@media (max-width: 480px) {
    .belvio-swatches {
        gap: 8px;
    }

    .belvio-swatch,
    .belvio-swatch--color,
    .belvio-swatch--image {
        min-width: 40px;
        width: 40px;
        height: 40px;
    }

    .belvio-swatch--button {
        width: auto;
        padding: 0 12px;
    }
}
