/* Zdrowotka Nowa 1.9.95: przeniesione z inc/legacy-functions.php (linia 744), drukowane w tym samym miejscu przez zdn_inline_asset(). */
    /* Ukryj "Zobacz koszyk" po dodaniu produktu */
    .added_to_cart.wc-forward {
        display: none !important;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       UKRYJ WOOCOMMERCE NOTICES (baner "Nie możesz dodać...")
       Tylko na stronach z produktami — NIE na My Account, checkoucie
       ═══════════════════════════════════════════════════════════════ */
    .woocommerce.archive .woocommerce-notices-wrapper,
    .single-product .woocommerce-notices-wrapper,
    .home .woocommerce-notices-wrapper,
    .wc-block-components-notice-banner,
    .wc-block-store-notices {
        display: none !important;
    }
    
    /* Stabilna wysokość karty produktu - bez skakania */
    .products .product,
    ul.products li.product {
        display: flex;
        flex-direction: column;
    }
    
    .products .product .button,
    ul.products li.product .add_to_cart_button {
        margin-top: auto;
    }
    
    /* Przycisk zachowuje stały rozmiar po dodaniu */
    .products .product .add_to_cart_button.added {
        min-width: auto;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       NIEDOSTĘPNE PRODUKTY - CAŁE SZARE (włącznie z tekstem i ceną)
       ═══════════════════════════════════════════════════════════════ */
    
    /* Całe okienko produktu szare gdy niedostępny */
    .products .product.outofstock,
    ul.products li.product.outofstock {
        opacity: 1 !important;
        filter: grayscale(100%) !important;
        transition: all 0.3s ease;
    }
    
    /* Wszystkie elementy wewnątrz - też szare */
    .products .product.outofstock *,
    ul.products li.product.outofstock * {
        filter: grayscale(100%) !important;
    }
    
    /* Przy hover lekko przywróć kolory */
    .products .product.outofstock:hover,
    ul.products li.product.outofstock:hover {
        filter: grayscale(60%) !important;
    }
    
    .products .product.outofstock:hover *,
    ul.products li.product.outofstock:hover * {
        filter: grayscale(60%) !important;
    }
    
    /* Przyciemnij tekst i cenę */
    .products .product.outofstock .woocommerce-loop-product__title,
    .products .product.outofstock .price,
    ul.products li.product.outofstock .woocommerce-loop-product__title,
    ul.products li.product.outofstock .price {
        opacity: 0.6 !important;
    }
    
    /* Badge "Niedostępny" - WYJĄTEK - ma być kolorowy (czerwony) */
    .products .product.outofstock .product-badge-outofstock,
    ul.products li.product.outofstock .product-badge-outofstock,
    .product-badge-outofstock {
        position: absolute;
        top: 10px;
        left: 10px;
        background: #ef4444 !important;
        color: #fff !important;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        padding: 6px 12px;
        border-radius: 4px;
        z-index: 10;
        letter-spacing: 0.5px;
        filter: none !important;
        opacity: 1 !important;
    }
    
    /* Przycisk "Niedostępny" - szary */
    .products .product.outofstock .button,
    .products .product.outofstock .add_to_cart_button,
    ul.products li.product.outofstock .button,
    ul.products li.product.outofstock .add_to_cart_button {
        background: #9ca3af !important;
        color: #fff !important;
        cursor: not-allowed !important;
        pointer-events: none;
        filter: none !important;
        opacity: 0.8 !important;
    }
    
    /* ═══════════════════════════════════════════════════════════════
       MAX STOCK REACHED - ZABLOKOWANY PRZYCISK
       ═══════════════════════════════════════════════════════════════ */
    
    .add_to_cart_button.max-stock-reached,
    .single_add_to_cart_button.max-stock-reached {
        background: #9ca3af !important;
        color: #fff !important;
        cursor: not-allowed !important;
        pointer-events: none;
        opacity: 0.7;
    }
    
    .add_to_cart_button.max-stock-reached::after {
        content: " (max)";
    }
    
    /* ═══════════════════════════════════════════════════════════════
       KOMUNIKAT O LIMICIE STOCKU W KOSZYKU
       ═══════════════════════════════════════════════════════════════ */
    
    .zd-stock-notice {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border: 1px solid #f59e0b;
        border-radius: 12px;
        padding: 16px;
        margin: 0 0 16px 0;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        animation: zdSlideIn 0.3s ease-out;
    }
    
    @keyframes zdSlideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .zd-stock-notice-icon {
        flex-shrink: 0;
        width: 24px;
        height: 24px;
        background: #f59e0b;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: bold;
        font-size: 14px;
    }
    
    .zd-stock-notice-content {
        flex: 1;
    }
    
    .zd-stock-notice-title {
        font-weight: 600;
        color: #92400e;
        margin: 0 0 4px 0;
        font-size: 14px;
    }
    
    .zd-stock-notice-text {
        color: #a16207;
        font-size: 13px;
        margin: 0;
        line-height: 1.4;
    }
    
    .zd-stock-notice-close {
        background: none;
        border: none;
        color: #92400e;
        cursor: pointer;
        padding: 4px;
        font-size: 18px;
        line-height: 1;
        opacity: 0.7;
        transition: opacity 0.2s;
    }
    
    .zd-stock-notice-close:hover {
        opacity: 1;
    }
    
    /* ═══ TOAST — DODANO DO KOSZYKA ═══ */
    .zd-toast {
        position: fixed;
        top: -150px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999999;
        background: #fff;
        border: 1px solid #c8e6c9;
        border-radius: 16px;
        padding: 16px 20px;
        box-shadow: 0 8px 32px rgba(0,0,0,0.12);
        max-width: 360px;
        width: calc(100% - 32px);
        transition: top 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .zd-toast.zd-toast-visible { top: 20px; }
    .zd-toast-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
    .zd-toast-check {
        width: 28px; height: 28px;
        background: #4CAF50; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    }
    .zd-toast-check svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 3; }
    .zd-toast-title { font-family: "Inter", sans-serif; font-size: 15px; font-weight: 700; color: #1a1a1a; }
    .zd-toast-urgency { font-size: 13px; color: #2E7D32; font-weight: 600; margin-bottom: 12px; padding-left: 38px; }
    .zd-toast-actions { display: flex; gap: 8px; }
    .zd-toast-btn {
        flex: 1; padding: 12px 16px; border-radius: 10px;
        font-family: "Inter", sans-serif; font-size: 14px; font-weight: 700;
        text-align: center; text-decoration: none; cursor: pointer; border: none; transition: all 0.2s ease;
    }
    .zd-toast-btn-cart {
        background: linear-gradient(135deg, #2E7D32 0%, #2E7D32 100%);
        color: #fff; box-shadow: 0 2px 8px rgba(76,175,80,0.3);
    }
    .zd-toast-btn-cart:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(76,175,80,0.4); }
    .zd-toast-btn-continue { background: #f5f5f5; color: #374151; }
    .zd-toast-btn-continue:hover { background: #e5e7eb; }
    @media (max-width: 480px) {
        .zd-toast { max-width: 100%; width: calc(100% - 24px); padding: 14px 16px; }
        .zd-toast-urgency { padding-left: 0; }
    }
    