/* --- Woo Native Flyout Cart V2.7 (Final Production Build) --- */

/* 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; /* Wichtig für Sticky Footer */
    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; }

/* 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; }

/* ITEMS LIST (SCROLLABLE) */
#wnfc-items-container {
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 0 25px;
    background: #fff;
}

/* --- ITEM DESIGN --- */

.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; }

.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; }

/* INFO CONTAINER */
.wnfc-item-info { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    position: relative; 
    min-height: 75px; 
}

/* HEADER (TITEL) */
.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;
    /* Schutzabstand: Text bricht um, bevor er den Mülleimer berührt */
    padding-right: 35px; 
}

/* --- LÖSCHEN BUTTON (Trash Can - Mobile Optimized) --- */
.wnfc-remove-btn {
    position: absolute;
    top: -6px;     
    right: -8px;   
    
    background: transparent !important;
    border: none !important;
    
    /* Großes Touch-Target */
    width: 44px; 
    height: 44px; 
    padding: 10px;
    
    /* Farbe #555 -> Damit es auf Mobile "aktiv" aussieht */
    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;
}

/* Hover Effekte (Nur Desktop) */
@media (hover: hover) {
    .wnfc-remove-btn:hover {
        color: #d32f2f !important; 
        background-color: rgba(0,0,0,0.04) !important;
        border-radius: 50%;
    }
}
/* Active Feedback (Mobile) */
.wnfc-remove-btn:active {
    color: #000 !important;
    transform: scale(0.9);
}

/* Varianten Info */
.wnfc-item-variation {
    font-size: 13px; color: #777; margin-bottom: 8px; line-height: 1.4;
    padding-right: 10px;
}
.wnfc-var-pill {
    display: inline-block; background-color: #f5f5f5;
    padding: 2px 6px; border-radius: 4px; margin-right: 4px; border: 1px solid #eee;
}

/* --- FOOTER (Stepper + Preis) --- */
.wnfc-item-footer {
    display: flex; 
    justify-content: space-between; /* Stepper links, Preis rechts */
    align-items: flex-end; 
    width: 100%; 
    margin-top: auto;
}

/* Preis steht ganz rechts, bündig unter dem Mülleimer */
.wnfc-price { 
    font-weight: 700; 
    color: #333; 
    font-size: 15px; 
    text-align: right;
    white-space: nowrap;
}

/* --- QUANTITY STEPPER (Mobile Friendly) --- */
.wnfc-qty-control {
    display: flex; 
    align-items: center;
    border: 1px solid #eee; /* Zarterer Rahmen */
    border-radius: 4px;
    background: #fff;
}

.wnfc-qty-control button {
    background: none; 
    border: none;
    
    /* 40px für gute Touch-Bedienung */
    width: 40px; 
    height: 40px;
    
    cursor: pointer; 
    font-size: 18px; 
    color: #555;
    
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: background-color 0.2s ease;
}

/* Hover nur Desktop */
@media (hover: hover) {
    .wnfc-qty-control button:hover { 
        background-color: #f9f9f9; 
        color: #000; 
    }
}
.wnfc-qty-control button:active {
    background-color: #f0f0f0;
}

.wnfc-qty-control span {
    font-size: 14px; 
    font-weight: 600;
    min-width: 28px; 
    text-align: center;
    color: #333;
    user-select: none;
}

/* --- FOOTER (STICKY) --- */
.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 (Optimiert) --- */
.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;
}

/* Der Balken Container */
.wnfc-progress-container {
    position: relative;
    height: 24px; 
    margin: 10px 15px 5px 15px; 
}

/* Hintergrund-Linie */
.wnfc-progress-bg {
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 6px;
    background: #f0f0f0;
    border-radius: 3px;
    transform: translateY(-50%);
    z-index: 1;
}

/* Füll-Linie */
.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);
}

/* Die Bubbles (Inaktiv) */
.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);
}

/* Active State (Grün statt Schwarz) */
.wnfc-tier.active {
    background: #67764F; /* Brand-Color */
    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;
}

/* TOTAL ROW */
.wnfc-total-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 18px; 
    margin-bottom: 20px;
    color: #67764F; /* Brand Farbe */
}

.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; 
}

/* VERSAND INFO: Clean & Minimal (Variante C) */
.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 (mit Elementor Fix) */
.wnfc-checkout-btn {
    display: block; width: 100%; padding: 18px;
    background: #67764F; 
    
    /* WICHTIG: !important überschreibt Elementor Styles */
    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; 
}

/* TRIGGER & BADGES */
.wnfc-count-badge {
    position: absolute; top: -6px; right: -6px;
    background: #d93025; color: white;
    font-size: 10px; min-width: 18px; height: 18px;
    border-radius: 9px;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; border: 2px solid #fff;
}

/* ANIMATIONEN */
.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; }

/* --- SAVINGS ROW (EURO RABATT) --- */

.wnfc-discount-row {
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 15px; 
    margin-bottom: 10px; /* Kleiner Abstand zur Gesamtsumme */
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee; /* Feine Trennlinie zur Summe */
    color: #67764F; /* Brand-Color Grün */
}

.wnfc-discount-row span:first-child { 
    font-weight: 500; 
}

.wnfc-discount-row span:last-child { 
    font-weight: 700; 
    font-size: 16px;
}