/**
 * WooCommerce 10.10 Sneak Peek & Sale Reveal Styles
 */

/* Fallback card positioning: ensures absolute badge anchors to product card */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product,
.wc-block-grid__product,
.wp-block-woocommerce-all-products .wc-block-product,
.products .product {
    position: relative;
}

/* Ensure single product gallery image has relative positioning for badge placement */
.woocommerce-product-gallery__image,
.wc-1010-promo .woocommerce-product-gallery__image {
    position: relative !important;
}

/* Badge Outer Drop Shadow Wrapper (Anchors to top-right corner, default top:0, right:0) */
.wc-1010-badge-wrap {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    z-index: 30 !important;
    pointer-events: none !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
}

/* 10.10 Corner Ribbon Badge (Flush to top: 0; right: 0;) */
.wc-1010-badge {
    padding: 6px 14px 6px 18px !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    box-sizing: border-box !important;
    clip-path: polygon(12px 0%, 100% 0%, 100% 100%, 0% 100%, 6px 50%);
    -webkit-clip-path: polygon(12px 0%, 100% 0%, 100% 100%, 0% 100%, 6px 50%);
    animation: wc1010Shimmer 3.5s ease-in-out infinite;
}

/* Gold sparkle symbol */
.wc-1010-badge .wc-1010-badge-sparkle {
    font-size: 11px;
    color: #ffd700;
    line-height: 1;
}

/* Single Product Page Ribbon Size */
.wc-1010-badge.wc-1010-badge-single {
    font-size: 13px !important;
    padding: 7px 16px 7px 20px !important;
}

/* Subtle, readability-friendly shimmer */
@keyframes wc1010Shimmer {
    0%, 100% {
        opacity: 0.96;
    }
    50% {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wc-1010-badge {
        animation: none !important;
    }
}

/* Teaser Price List Display with enhanced spacing and visibility */
.wc-1010-teaser-wrap {
    display: block !important;
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(255, 75, 43, 0.4) !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
    clear: both !important;
}

/* Single product page teaser spacing */
.single-product .price .wc-1010-teaser-wrap,
.single-product .summary .wc-1010-teaser-wrap {
    margin-top: 14px !important;
}

.wc-1010-teaser-label {
    display: block !important;
    font-size: 0.8em !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #444444 !important;
    margin-bottom: 2px !important;
    line-height: 1.2 !important;
}

.wc-1010-teaser-price {
    display: block !important;
    font-family: inherit !important;
    font-size: 1.1em !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    color: #ff4b2b; /* dynamically styled via get_inline_custom_css() */
}

/* Single product & variable variations match the main price typography */
.single-product .price .wc-1010-teaser-price,
.product-type-variable .woocommerce-variation-price .wc-1010-teaser-price {
    font-size: 1.15em !important;
    font-weight: 800 !important;
}

/* Suppress default Sale flash badge ONLY on promo products */
.wc-1010-promo .onsale,
body.wc-1010-promo-single .woocommerce-product-gallery .onsale {
    display: none !important;
}
