/**
 * ITC Variation Price Replacer – styles v1.7.3
 * Matches user reference: Strikethrough + "Out of stock" label below.
 */

/* 1. Hide duplicate price blocks */
.woocommerce-variation-price span.price,
.woocommerce-variation-price>.price,
.single_variation_wrap .price,
.itc-vp-hide {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

/* 2. Notice text */
.itc-notice--select {
    display: block;
    font-size: 1em;
    font-style: italic;
    color: #777;
    font-weight: normal;
    line-height: 1.5;
}

/* 3. Stock colors */
.stock.itc-stock--instock,
p.stock.itc-stock--instock {
    color: #2e7d32 !important;
}

.stock.itc-stock--oos,
p.stock.itc-stock--oos {
    color: #cc0000 !important;
}

.itc-oos-label {
    color: #cc0000;
    font-weight: 600;
}

/* 4. SWATCH BUTTON BASE (Supports ST Swatch & standard) */
li.variable-item,
li.type-label,
.variable-item {
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    padding: 8px 12px !important;
    min-width: 80px !important;
    min-height: 50px !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 4px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    position: relative !important;
}

/* Hover */
li.variable-item:not(.out-of-stock):not(.itc-oos-swatch):hover,
li.type-label:not(.out-of-stock):not(.itc-oos-swatch):hover {
    border-color: #333 !important;
}

/* Selected state - Dark background per image */
li.variable-item.selected,
li.variable-item.active,
li.type-label.selected,
li.type-label.active {
    background: #333 !important;
    border-color: #333 !important;
    color: #fff !important;
}

li.variable-item.selected span,
li.type-label.selected span {
    color: #fff !important;
}

/* 5. OUT OF STOCK DESIGN (Matches Image) */
li.variable-item.out-of-stock,
li.variable-item.itc-oos-swatch,
li.type-label.out-of-stock,
li.type-label.itc-oos-swatch {
    opacity: 0.6 !important;
    cursor: pointer !important;
    border-color: #ddd !important;
    background: #fcfcfc !important;
}

/* Strikethrough on text */
li.variable-item.out-of-stock span,
li.variable-item.itc-oos-swatch span,
li.type-label.out-of-stock span,
li.type-label.itc-oos-swatch span,
li.type-label.out-of-stock .st-custom-attribute,
li.type-label.itc-oos-swatch .st-custom-attribute {
    text-decoration: line-through !important;
    color: #999 !important;
}

/* "Out of stock" small label below */
li.variable-item.out-of-stock::after,
li.variable-item.itc-oos-swatch::after,
li.type-label.out-of-stock::after,
li.type-label.itc-oos-swatch::after {
    content: "Out of stock" !important;
    display: block !important;
    font-size: 10px !important;
    color: #aaa !important;
    margin-top: 2px !important;
    text-decoration: none !important;
}

/* 6. Fix for big issue: Selection on load */
.summary .price {
    min-height: 1.4em;
}

/* 7. Related products / Loops duplication fix */
/* Targets any price element that is a 3rd sibling price (Price + Price + Price) */
.product .price+.price+.price,
.product-grid-item .price+.price+.price,
.related.products .product .price+.price+.price,
.products .product .price+.price+.price,
li.product .price+.price+.price,
.content-product .price+.price+.price,
.content-product .product-details>.price~.price,
.price-cloned {
    display: none !important;
}

@keyframes itc-vp-flash {
    0% {
        background-color: rgba(255, 220, 50, 0.35);
    }

    100% {
        background-color: transparent;
    }
}

.itc-vp-updated {
    animation: itc-vp-flash 0.7s ease-out forwards;
}