/**
 * Discount Architect Frontend Styles
 * Premium Discount Labels
 */

/* Container relative positioning for absolute badge */
.woocommerce ul.products li.product,
.woocommerce div.product,
.da-image-container {
    position: relative !important;
    display: block !important;
    overflow: visible !important;
}

.da-discount-badge {
    position: absolute !important;
    z-index: 99999 !important;
    pointer-events: none;
}

.da-badge-top_left {
    top: 15px !important;
    left: 15px !important;
}

.da-badge-top_right {
    top: 15px !important;
    right: 15px !important;
}

.da-badge-bottom_left {
    bottom: 15px !important;
    left: 15px !important;
}

.da-badge-bottom_right {
    bottom: 15px !important;
    right: 15px !important;
}

.da-discount-badge span {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5);
    display: inline-block;
    letter-spacing: 0.03em;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

/* Hover effect on product propagates to badge */
.product:hover .da-discount-badge span {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.6);
}

/* Specific positioning for Single Product Page (Extra Padding) */
.single-product .da-badge-top_left { top: 25px !important; left: 25px !important; }
.single-product .da-badge-top_right { top: 25px !important; right: 25px !important; }
.single-product .da-badge-bottom_left { bottom: 25px !important; left: 25px !important; }
.single-product .da-badge-bottom_right { bottom: 25px !important; right: 25px !important; }

/* Premium Animation */
@keyframes da-badge-glow {
    0% { box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5); }
    50% { box-shadow: 0 10px 30px 2px rgba(168, 85, 247, 0.6); }
    100% { box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.5); }
}

.da-discount-badge span {
    animation: da-badge-glow 3s infinite ease-in-out;
}

/* Hide default WooCommerce Sale Flash if our badge is present */
.product:has(.da-discount-badge) .onsale {
    display: none !important;
}
