/* --- Woo Native Flyout Cart V3.6 (Theme-Proof Build) --- */

/* ---------------------------------------------------------
   1. CONTAINER & OVERLAY
--------------------------------------------------------- */
#wnfc-flyout-cart {
    position: fixed;
    top: 0; right: -450px;
    width: 420px; max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    z-index: 999999;
    display: flex;
    flex-direction: column; 
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    font-family: inherit;
    color: #333;
}
#wnfc-flyout-cart.open { right: 0; }

#wnfc-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(3px);
    z-index: 999998;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
#wnfc-overlay.open { opacity: 1; pointer-events: auto; }

/* ---------------------------------------------------------
   2. HEADER
--------------------------------------------------------- */
.wnfc-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex; justify-content: space-between; align-items: center;
    background: #fff; flex-shrink: 0;
}
.wnfc-header h3 { margin: 0; font-size: 20px; font-weight: 700; color:#222; }
#wnfc-close-cart { 
    background: none; border: none; font-size: 32px; 
    cursor: pointer; color: #999; line-height: 1; padding: 0; 
    transition: color 0.2s;
}
#wnfc-close-cart:hover { color: #000; }

/* ---------------------------------------------------------
   3. ITEMS LIST
--------------------------------------------------------- */
#wnfc-items-container {
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 0 25px;
    background: #fff;
}

/* Item Wrapper */
.wnfc-cart-item {
    display: flex; gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: relative;
    width: 100%;
}
.wnfc-cart-item:last-child { border-bottom: none; }

/* Item Image */
.wnfc-item-img {
    flex-shrink: 0;
    width: 75px; height: 75px;
    border-radius: 6px;
    overflow: hidden;
    background: #f4f4f4;
}
.wnfc-item-img img { width: 100%; height: 100%; object-fit: cover; }

/* Item Info */
.wnfc-item-info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative; 
    min-height: 75px; 
}

/* Item Header */
.wnfc-item-header { 
    display: block; width: 100%; margin-bottom: 4px; 
}
.wnfc-item-name { 
    font-weight: 600; font-size: 15px; color: #222; line-height: 1.3; 
    display: block; padding-right: 35px; 
}

/* Remove Button (SVG) */
.wnfc-remove-btn {
    position: absolute; top: -6px; right: -8px;   
    background: transparent !important; border: none !important;
    width: 44px; height: 44px; padding: 10px;
    color: #555 !important; 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 10; transition: all 0.2s ease;
}
.wnfc-remove-btn svg { width: 18px; height: 18px; display: block; stroke-width: 2; }
@media (hover: hover) {
    .wnfc-remove-btn:hover { 
        color: #d32f2f !important; 
        background-color: rgba(0,0,0,0.04) !important; 
        border-radius: 50%; 
    }
}
.wnfc-remove-btn:active { color: #000 !important; transform: scale(0.9); }

/* Variation Data */
.wnfc-item-variation { 
    font-size: 13px; color: #777; margin-bottom: 8px; 
    line-height: 1.4; padding-right: 10px; 
}

/* Item Footer */
.wnfc-item-footer {
    display: flex; justify-content: space-between; align-items: flex-end; 
    width: 100%; margin-top: auto;
}
.wnfc-price { 
    font-weight: 700; color: #333; font-size: 15px; 
    text-align: right; white-space: nowrap; 
}

/* Quantity Stepper (FIXED VISIBILITY) */
.wnfc-qty-control {
    display: flex; align-items: center;
    border: 1px solid #eee; border-radius: 4px; background: #fff;
}
.wnfc-qty-control button {
    /* THEME OVERRIDES KILLEN */
    background: transparent !important; 
    border: none !important; 
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    
    /* UNSER STYLING ERZWINGEN */
    width: 40px; height: 40px;
    cursor: pointer; 
    font-size: 18px; 
    color: #555 !important; /* WICHTIG: Farbe erzwingen */
    
    display: flex; align-items: center; justify-content: center; 
    transition: background-color 0.2s ease;
}
@media (hover: hover) { 
    .wnfc-qty-control button:hover { 
        background-color: #f9f9f9 !important; 
        color: #000 !important; 
    } 
}
.wnfc-qty-control button:active { background-color: #f0f0f0 !important; }

.wnfc-qty-control span { 
    font-size: 14px; font-weight: 600; min-width: 28px; 
    text-align: center; color: #333; user-select: none; 
}

/* ---------------------------------------------------------
   4. STICKY FOOTER AREA
--------------------------------------------------------- */
.wnfc-footer {
    padding: 25px; border-top: 1px solid #eee; background: #fff; flex-shrink: 0;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

/* Discount Progress Bar */
.wnfc-discount-box {
    margin-bottom: 25px; padding: 15px 20px;
    border: 1px solid #eee; border-radius: 8px; background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.wnfc-discount-header { margin-bottom: 15px; text-align: center; }
.wnfc-discount-title { 
    display: block; font-size: 15px; font-weight: 700; 
    color: #222; margin-bottom: 4px; 
}
.wnfc-discount-msg { display: block; font-size: 13px; color: #666; line-height: 1.4; }
.wnfc-discount-msg b { color: #67764F; }

.wnfc-progress-container { 
    position: relative; height: 24px; margin: 10px 15px 5px 15px; 
}
.wnfc-progress-bg { 
    position: absolute; top: 50%; left: 0; right: 0; 
    height: 6px; background: #f0f0f0; border-radius: 3px; 
    transform: translateY(-50%); z-index: 1; 
}
.wnfc-progress-fill { 
    height: 100%; 
    background: linear-gradient(90deg, #8ba170 0%, #67764F 100%); 
    border-radius: 3px; 
    transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
}

/* Bubbles */
.wnfc-tier {
    position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 2;
    background: #fff; border: 2px solid #e0e0e0; color: #bbb;
    font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    white-space: nowrap; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.wnfc-tier.active {
    background: #67764F; border-color: #67764F; color: #fff;
    transform: translate(-50%, -50%) scale(1.15); 
    box-shadow: 0 4px 10px rgba(103, 118, 79, 0.4); z-index: 3;
}

/* "Du sparst" Row */
.wnfc-discount-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px dashed #eee; color: #67764F;
}
.wnfc-discount-row span:first-child { font-weight: 500; }
.wnfc-discount-row span:last-child { font-weight: 700; font-size: 16px; }

/* Total Row */
.wnfc-total-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 18px; margin-bottom: 20px; color: #67764F;
}
.wnfc-total-row span:first-child { font-weight: 500; color: #67764F; font-size: 16px; }
.wnfc-total-row span:last-child { font-weight: 800; font-size: 20px; color: #67764F; }

/* Shipping Info */
.wnfc-shipping-info {
    display: flex; gap: 12px; align-items: flex-start;
    background: transparent; border: none; 
    padding: 0 5px; margin-bottom: 25px; text-align: left;
}
.wnfc-shipping-icon { font-size: 22px; color: #67764F; margin-top: -2px; }
.wnfc-shipping-text { font-size: 13px; line-height: 1.4; color: #666; }
.wnfc-shipping-text strong { color: #222; }

/* Checkout Button */
.wnfc-checkout-btn {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%; padding: 16px;
    background: #67764F; 
    color: #fff !important; 
    text-align: center; text-decoration: none; 
    font-weight: 700; font-size: 16px; 
    border-radius: 6px; 
    transition: background 0.2s, transform 0.1s;
    text-transform: uppercase; letter-spacing: 0.5px;
}
.wnfc-checkout-btn:hover { background: #525E3F; color: #fff !important; }

/* Injected Icon */
.wnfc-btn-icon { width: 22px; height: auto; fill: currentColor; margin-top: -2px; }


/* ---------------------------------------------------------
   5. TRIGGER BUTTON (SHORTCODE)
--------------------------------------------------------- */
.wnfc-trigger-btn {
    position: relative;
    background: transparent !important; /* Theme fix */
    border: none !important; 
    box-shadow: none !important;
    cursor: pointer; 
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.wnfc-trigger-btn:hover,
.wnfc-trigger-btn:focus,
.wnfc-trigger-btn:active {
    transform: scale(1.05); 
    background: transparent !important; 
    background-color: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    outline: none !important;
}

.wnfc-trigger-icon { width: 32px; height: auto; display: block; }

.wnfc-count-badge {
    position: absolute; top: -5px; right: -8px;
    background: #8CA66B; color: white;
    font-size: 12px; font-weight: 700;
    min-width: 20px; height: 20px; 
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    border: 2px solid #fff; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ---------------------------------------------------------
   6. ANIMATIONEN & STATES
--------------------------------------------------------- */
.shake-anim { animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both; }
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

.wnfc-spinner { display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

.wnfc-state-msg { text-align: center; color: #999; margin-top: 60px; }