/* ==========================================================================
   Woo Blocks — Sale Badge "Oszczędzasz X zł"
   Theme-wide premium styling: gold/amber accent, ornamental, builds desire.
   Targets default Woo Blocks markup; appears in cart, mini-cart,
   single product, listings, checkout summary.
   ========================================================================== */

.wc-block-components-product-badge.wc-block-components-sale-badge {
    /* Layout */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px 8px 32px;
    margin: 6px 0;
    position: relative;
    isolation: isolate;

    /* Typography — premium, readable, slightly larger than Woo default */
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.02em;
    color: #4a3617;
    text-transform: none;
    white-space: nowrap;

    /* Background — warm cream → soft amber gradient */
    background: linear-gradient(135deg, #fbf3dd 0%, #f4e4b8 55%, #e9d28a 100%);

    /* Ornamental gold border + dual shadow (depth + warm glow) */
    border: 1px solid #c9a84c;
    border-radius: 999px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.6) inset,
        0 0 0 1px rgba(212, 168, 83, 0.18),
        0 4px 14px rgba(201, 168, 76, 0.22);

    /* Soft entrance — subtle, no fake urgency */
    animation: zoriana-sale-badge-fade 0.5s ease-out both;
}

/* Diamond/sparkle ornament before the text — communicates "skarb/odkrycie" */
.wc-block-components-product-badge.wc-block-components-sale-badge::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translateY(-50%) rotate(45deg);
    background: linear-gradient(135deg, #d4a853 0%, #c9a84c 100%);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.45) inset,
        0 0 6px rgba(212, 168, 83, 0.55);
    border-radius: 2px;
    z-index: 1;
}

/* Tiny inner highlight on the diamond — gives it a gem-like pop */
.wc-block-components-product-badge.wc-block-components-sale-badge::after {
    content: "";
    position: absolute;
    left: 14px;
    top: calc(50% - 4px);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    z-index: 2;
    pointer-events: none;
}

/* Amount — bolder, larger, deep gold for instant readability */
.wc-block-components-product-badge.wc-block-components-sale-badge
.wc-block-formatted-money-amount,
.wc-block-components-product-badge.wc-block-components-sale-badge
.wc-block-components-formatted-money-amount {
    font-weight: 800;
    font-size: 14px;
    color: #8a6a1a;
    letter-spacing: 0.01em;
}

/* Hover — subtle warm lift, no flicker, no agressive pulse */
.wc-block-components-product-badge.wc-block-components-sale-badge:hover {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 0 0 1px rgba(212, 168, 83, 0.28),
        0 6px 20px rgba(201, 168, 76, 0.32);
    transform: translateY(-1px);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

/* --- Entrance animation (one-shot, 0.5s) --- */
@keyframes zoriana-sale-badge-fade {
    0%   { opacity: 0; transform: translateY(4px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* --- Mobile adjustments — keep readable, tighter padding --- */
@media (max-width: 480px) {
    .wc-block-components-product-badge.wc-block-components-sale-badge {
        font-size: 12px;
        padding: 7px 14px 7px 28px;
        gap: 6px;
    }

    .wc-block-components-product-badge.wc-block-components-sale-badge::before {
        left: 10px;
        width: 10px;
        height: 10px;
    }

    .wc-block-components-product-badge.wc-block-components-sale-badge::after {
        left: 12px;
        top: calc(50% - 3px);
        width: 3px;
        height: 3px;
    }

    .wc-block-components-product-badge.wc-block-components-sale-badge
    .wc-block-formatted-money-amount,
    .wc-block-components-product-badge.wc-block-components-sale-badge
    .wc-block-components-formatted-money-amount {
        font-size: 13px;
    }
}

/* --- Reduced motion preference --- */
@media (prefers-reduced-motion: reduce) {
    .wc-block-components-product-badge.wc-block-components-sale-badge {
        animation: none;
    }
    .wc-block-components-product-badge.wc-block-components-sale-badge:hover {
        transform: none;
    }
}
