/* ================================
 * Nuwkem Variant Swatches — frontend
 * ================================ */

/* ---- Loop / archive swatches ---- */
.avs-loop-swatches {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    min-height: 22px;
}

.avs-loop-swatches.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.avs-swatch-dot {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

.avs-swatch-dot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    mix-blend-mode: multiply;
}

/* ---- Single product: Also Available In ---- */
.avs-also-available {
    margin: 24px 0;
    text-align: left;
}

.avs-also-available__title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 14px;
    color: #333;
    text-align: left;
    line-height: 1.2;
}

.avs-also-available__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.avs-also-available__item,
.avs-also-available__item:hover,
.avs-also-available__item:focus,
.avs-also-available__item:active {
    /* Hard reset against theme button styles */
    all: unset;
    box-sizing: border-box;
    display: block;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
}

.avs-also-available__item:hover,
.avs-also-available__item.is-active {
    border-color: #2e7d32;
    box-shadow: 0 0 0 1px #2e7d32;
}

.avs-also-available__item img,
.avs-also-available__item:hover img {
    /* Reset and re-style */
    all: unset;
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

@media (max-width: 600px) {
    .avs-also-available__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- Triangle finish badge ---- */
.woocommerce-product-gallery,
.woo-variation-gallery-slider-wrapper {
    position: relative;
}

.avs-finish-badge--live {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 100;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.avs-finish-badge--live:empty {
    display: none;
}

.avs-finish-badge__triangle {
    width: 70px;
    height: 70px;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    background-color: #000;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
}

.avs-finish-badge__text {
    margin-top: 4px;
    color: #86A885;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: right;
    padding-right: 2px;
}

/* Hidden template that lives in the footer — must not be visible. */
.avs-finish-badge--template {
    display: none !important;
}
