/* Zdrowotka Nowa 1.9.95: przeniesione z inc/legacy-functions.php (linia 7194), drukowane w tym samym miejscu przez zdn_inline_asset(). */
    /* FLOATING KOSZYK */
    .zd-floating-cart {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
        z-index: 998;
        transition: all 0.3s ease;
        border: none;
        cursor: pointer;
    }
    
    .zd-floating-cart:hover {
        transform: scale(1.1);
        box-shadow: 0 6px 25px rgba(76, 175, 80, 0.5);
    }
    
    .zd-floating-cart-icon {
        font-size: 26px;
    }
    
    .zd-floating-cart-count {
        position: absolute;
        top: -4px;
        right: -4px;
        background: #e53935;
        color: #fff;
        min-width: 22px;
        height: 22px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }
    
    /* SIDEBAR KOSZYKA */
    .zd-cart-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        visibility: hidden;
        opacity: 0;
        transition: visibility 0s 0.2s, opacity 0.2s ease;
        pointer-events: none;
    }
    
    .zd-cart-sidebar.open {
        visibility: visible;
        opacity: 1;
        transition: visibility 0s, opacity 0.15s ease;
        pointer-events: auto;
    }
    
    .zd-cart-sidebar-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }
    
    .zd-cart-sidebar-content {
        position: absolute;
        top: 0;
        right: -100%;
        width: 400px;
        max-width: 90%;
        height: 100%;
        background: #fff;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        display: flex;
        flex-direction: column;
    }
    
    .zd-cart-sidebar.open .zd-cart-sidebar-content {
        right: 0;
    }
    
    /* PROGRESS BAR DARMOWEJ DOSTAWY */
    .zd-free-shipping-bar {
        padding: 14px 18px;
        background: #f0faf0;
        border-bottom: 1px solid #e8e8e8;
    }
    .zd-fs-text {
        font-size: 15px;
        color: #333;
        margin-bottom: 8px;
        text-align: center;
        font-family: "Inter", sans-serif;
        line-height: 1.4;
    }
    .zd-fs-text strong {
        color: #2E7D32;
        font-weight: 700;
        font-size: 16px;
    }
    .zd-fs-note {
        margin: 8px 0 0;
        color: #444;
        font-size: 14px;
        line-height: 1.5;
        text-align: center;
    }
    .zd-fs-note a { color: #245c30; text-decoration: underline; }
    .zd-fs-note a:focus-visible { outline: 2px solid #245c30; outline-offset: 3px; }
    .zd-fs-success {
        color: #2E7D32;
        font-weight: 700;
        font-size: 16px;
    }
    .zd-fs-track {
        height: 8px;
        background: #e0e0e0;
        border-radius: 4px;
        overflow: hidden;
        position: relative;
    }
    .zd-fs-marker {
        /* Pionowa kreska na 60% paska = próg 150 zł z 250 zł */
        position: absolute;
        left: 60%;
        top: 0;
        bottom: 0;
        width: 2px;
        background: #fff;
        z-index: 2;
        transform: translateX(-1px);
    }
    .zd-fs-progress {
        height: 100%;
        background: linear-gradient(90deg, #81C784, #2E7D32);
        border-radius: 4px;
        transition: width 0.5s ease;
        position: relative;
        z-index: 1;
    }
    

    /* CROSS-SELL W KOSZYKU — horyzontalny slider */
    .zd-cart-cross-sell {
        padding: 10px 0 10px 15px;
        border-top: 1px solid #eee;
        background: #fafafa;
    }
    .zd-cs-header {
        font-size: 13px;
        font-weight: 600;
        color: #555;
        margin-bottom: 8px;
        font-family: "Inter", sans-serif;
        padding-right: 15px;
    }
    .zd-cs-items {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 6px;
        padding-right: 15px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .zd-cs-items::-webkit-scrollbar {
        display: none;
    }
    .zd-cs-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 100px;
        max-width: 100px;
        padding: 8px 6px;
        background: #fff;
        border-radius: 8px;
        border: 1px solid #eee;
        transition: border-color 0.2s;
        flex-shrink: 0;
    }
    .zd-cs-item:hover {
        border-color: #ccc;
    }
    .zd-cs-item-img {
        width: 56px;
        height: 56px;
        flex-shrink: 0;
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 4px;
    }
    .zd-cs-item-img img {
        width: 100%;
        height: 100%;
        object-fit: scale-down;
    }
    .zd-cs-item-info {
        width: 100%;
        text-align: left;
    }
    .zd-cs-item-name {
        font-size: 10px;
        font-weight: 500;
        color: #333;
        text-decoration: none;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        line-height: 1.25;
    }
    .zd-cs-item-name:hover {
        color: #2E7D32;
    }
    .zd-cs-item-price {
        font-size: 12px;
        font-weight: 700;
        color: #2E7D32;
        display: block;
        margin-top: 2px;
        white-space: nowrap;
    }
    .zd-cs-item-price del {
        color: #6B7280;
        font-weight: 400;
        font-size: 10px;
    }
    .zd-cs-item-price ins {
        text-decoration: none;
    }
    .zd-cs-item-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        margin-top: 4px;
    }
    .zd-cs-item-atc {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
        border: none;
        background: #2E7D32;
        color: #fff;
        border-radius: 50%;
        font-size: 16px;
        font-weight: 500;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
        margin-top: 4px;
    }
    .zd-cs-item-atc:hover {
        background: #388E3C;
    }
    .zd-cs-item-atc.loading {
        opacity: 0.6;
        pointer-events: none;
    }
    .zd-cs-item-atc.added {
        background: #388E3C;
    }

    /* HEADER */
    .zd-cart-sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        border-bottom: 1px solid #eee;
        background: #f8f9fa;
    }
    
    .zd-cart-sidebar-header h3 {
        font-size: 18px;
        font-weight: 600;
        margin: 0;
        color: #1a1a1a;
    }
    
    .zd-cart-sidebar-close {
        width: 36px;
        height: 36px;
        border: none;
        background: #fff;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .zd-cart-sidebar-close:hover {
        background: #f0f0f0;
    }
    
    .zd-cart-sidebar-close svg {
        width: 18px;
        height: 18px;
        stroke: #666;
    }
    
    /* ITEMS */
    .zd-cart-sidebar-items {
        flex: 1;
        overflow-y: auto;
        padding: 15px;
    }
    
    .zd-cart-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 12px;
        margin-bottom: 10px;
        position: relative;
        transition: opacity 0.2s ease;
    }
    
    /* Animacja wejścia nowego produktu - ULTRA SZYBKA */
    .zd-cart-item-new,
    .zd-cart-item-adding {
        animation: zdSlideIn 0.15s ease-out;
        background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    }
    
    @keyframes zdSlideIn {
        from { 
            opacity: 0; 
            transform: translateX(15px); 
        }
        to { 
            opacity: 1; 
            transform: translateX(0); 
        }
    }
    
    .zd-cart-item-loading-dot {
        color: #2E7D32;
        animation: zdDots 1s ease-in-out infinite;
        margin-left: 5px;
    }
    
    @keyframes zdDots {
        0%, 100% { opacity: 0.3; }
        50% { opacity: 1; }
    }
    
    .zd-cart-item-image {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
    }
    
    .zd-cart-item-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .zd-cart-item-details {
        flex: 1;
        min-width: 0;
    }
    
    .zd-cart-item-title {
        font-size: 14px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0 0 5px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .zd-cart-item-meta {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
    }
    
    /* QUANTITY CONTROLS w sidebarze */
    .zd-cart-qty-wrapper {
        display: inline-flex;
        align-items: center;
        gap: 0;
        background: #f5f5f5;
        border-radius: 6px;
        overflow: hidden;
    }
    
    .zd-cart-qty-btn {
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        color: #666;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
        padding: 0;
        line-height: 1;
    }
    
    .zd-cart-qty-btn:hover {
        background: #e0e0e0;
        color: #333;
    }
    
    .zd-cart-qty-btn:active {
        background: #d0d0d0;
    }
    
    .zd-cart-qty-btn.loading {
        opacity: 0.5;
        pointer-events: none;
    }
    
    .zd-cart-item-qty {
        color: #333;
        font-weight: 600;
        min-width: 24px;
        text-align: center;
        padding: 0 2px;
    }
    
    .zd-cart-item-price {
        color: #2E7D32;
        font-weight: 600;
    }
    
    .zd-cart-item-remove {
        width: 40px;
        height: 40px;
        border: none;
        background: #fff;
        border-radius: 50%;
        cursor: pointer;
        font-size: 18px;
        color: #6B7280;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }
    
    .zd-cart-item-remove:hover {
        background: #e53935;
        color: #fff;
    }
    
    /* EMPTY CART */
    .zd-cart-empty {
        text-align: center;
        padding: 60px 20px;
    }
    
    .zd-cart-empty-icon {
        font-size: 64px;
        display: block;
        margin-bottom: 15px;
        opacity: 0.5;
    }
    
    .zd-cart-empty p {
        font-size: 16px;
        color: #666;
        margin: 0 0 20px 0;
    }
    
    .zd-cart-empty-btn {
        display: inline-block;
        padding: 12px 25px;
        background: #2E7D32;
        color: #fff;
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .zd-cart-empty-btn:hover {
        background: #2E7D32;
        color: #fff;
    }
    
    /* FOOTER */
    .zd-cart-sidebar-footer {
        padding: 20px;
        border-top: 1px solid #eee;
        background: #f8f9fa;
    }
    
    .zd-cart-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        font-size: 16px;
    }
    
    .zd-cart-total strong {
        font-size: 20px;
        color: #1a1a1a;
    }
    
    .zd-cart-btn {
        display: block;
        width: 100%;
        padding: 14px;
        text-align: center;
        border-radius: 10px;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.3s ease;
        margin-bottom: 10px;
    }
    
    .zd-cart-btn:last-child {
        margin-bottom: 0;
    }
    
    .zd-cart-btn-view {
        background: #fff;
        color: #2E7D32;
        border: 2px solid #4CAF50;
    }
    
    .zd-cart-btn-view:hover {
        background: #f0fdf4;
        color: #2E7D32;
    }
    
    .zd-cart-btn-checkout {
        background: linear-gradient(135deg, #2E7D32 0%, #2E7D32 100%);
        color: #fff;
    }
    
    .zd-cart-btn-checkout:hover {
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
        color: #fff;
    }
    
    /* MOBILE */
    @media (max-width: 768px) {
        .zd-floating-cart {
            bottom: 80px;
            right: 15px;
            width: 56px;
            height: 56px;
        }
        
        .zd-floating-cart-icon {
            font-size: 24px;
        }
        
        .zd-cart-sidebar-content {
            width: 100%;
            max-width: 100%;
        }
    }
    