/* --- Woo Native Flyout Cart V13.54 (Larger Shortcode Text) --- */

/* ---------------------------------------------------------
   1. CONTAINER & OVERLAY
--------------------------------------------------------- */
#wnfc-flyout-cart {
    position: fixed; top: 0; right: -450px;
    width: 420px; max-width: 90vw;
    height: 100vh; height: 100dvh; 
    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: #674D31;
}
#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 & INFO BAR
--------------------------------------------------------- */
.wnfc-header { padding: 16px 25px 12px; 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: #674D31; }

#wnfc-close-cart { 
    background: transparent !important; border: none !important; font-size: 32px; cursor: pointer; 
    color: #674D31 !important; opacity: 1 !important; -webkit-text-fill-color: #674D31 !important; 
    -webkit-appearance: none; appearance: none; line-height: 1; padding: 0 5px; transition: color 0.2s;
}
#wnfc-close-cart:hover { color: #533E27 !important; -webkit-text-fill-color: #533E27 !important; }

/* SHIPPING BAR */
.wnfc-shipping-bar { 
    background-color: #f7f7f7; 
    color: #674D31; 
    padding: 10px 25px; 
    border-bottom: 1px solid #eee; 
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.wnfc-shipping-text-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wnfc-shipping-main {
    font-size: 15px; 
    font-weight: 600;
    color: #674D31;
    line-height: 1.4;
}

.wnfc-shipping-sub {
    font-size: 14px;
    color: #674D31; 
    font-weight: 400;
    line-height: 1.3;
}

/* ---------------------------------------------------------
   3. ITEMS LIST
--------------------------------------------------------- */
#wnfc-items-container { flex-grow: 1; overflow-y: auto; padding: 0 25px; background: #fff; }

.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; }

.wnfc-item-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; position: relative; min-height: 75px; }

.wnfc-item-header { display: block; width: 100%; margin-bottom: 4px; }
.wnfc-item-name { font-weight: 600; font-size: 15px; color: #674D31; line-height: 1.3; display: block; padding-right: 35px; }

.wnfc-remove-btn { position: absolute; top: -12px; right: -8px; background: transparent !important; border: none !important; width: 44px; height: 44px; padding: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 10; transition: all 0.2s ease; }
.wnfc-trash-img { width: 18px; height: 18px; display: block; object-fit: contain; transition: filter 0.2s ease; }
@media (hover: hover) { 
    .wnfc-remove-btn:hover { background-color: rgba(0,0,0,0.04) !important; border-radius: 50%; } 
    .wnfc-remove-btn:hover .wnfc-trash-img { filter: invert(26%) sepia(77%) saturate(2683%) hue-rotate(345deg) brightness(96%) contrast(92%); } 
}
.wnfc-remove-btn:active { transform: scale(0.9); }

.wnfc-item-variation { font-size: 13px; color: #777; margin-bottom: 8px; line-height: 1.4; padding-right: 10px; }

.wnfc-bundle-contents { 
    margin-top: 5px; 
    margin-bottom: 10px; 
    padding: 6px 10px; 
    background-color: #f9f9f9; 
    border-radius: 4px; 
    border-left: 3px solid #67764F; 
    font-size: 13px; 
    color: #674D31; 
    line-height: 1.4; 
}

.wnfc-item-footer { display: flex; justify-content: space-between; align-items: flex-end; width: 100%; margin-top: auto; }
.wnfc-price { font-weight: 700; color: #674D31; font-size: 15px; text-align: right; white-space: nowrap; }

.wnfc-qty-control { display: flex; align-items: center; border: 1px solid #674D31; border-radius: 4px; background: #fff; }
.wnfc-qty-control button { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; width: 40px; height: 40px; cursor: pointer; font-size: 18px; color: #674D31 !important; 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: #533E27 !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: #674D31; user-select: none; }

/* ---------------------------------------------------------
   4. STICKY FOOTER AREA & DISCOUNT BOX
--------------------------------------------------------- */
.wnfc-footer { 
    border-top: 1px solid #eee; 
    background: #fff; 
    flex-shrink: 0; 
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03); 
    padding: 20px 25px; 
    padding-bottom: calc(10px + env(safe-area-inset-bottom)); 
}

.wnfc-discount-box { 
    margin-bottom: 25px; 
    width: 100%;
}

/* WARENKORB-STANDARD: Mittig zentriert */
.wnfc-discount-header { 
    margin-bottom: 15px; 
    text-align: center; 
}

.wnfc-discount-title { 
    display: block; 
    font-size: 15px; 
    font-weight: 700; 
    color: #674D31; 
    margin-bottom: 4px; 
}

.wnfc-discount-msg { 
    display: block; 
    font-size: 13px; /* Standard im Cart bleibt klein */
    color: #674D31; 
    line-height: 1.4; 
}

.wnfc-discount-msg b { 
    color: #67764F; 
}

/* WARENKORB-STANDARD: Symmetrische Ränder */
.wnfc-progress-container { 
    position: relative; 
    height: 24px; 
    margin: 15px 15px 5px 15px; 
}

.wnfc-progress-bg { position: absolute; top: 50%; left: 0; right: 0; height: 9px; background: #f0f0f0; border-radius: 5px; transform: translateY(-50%); z-index: 1; }
.wnfc-progress-fill { height: 100%; background: linear-gradient(90deg, #8ba170 0%, #67764F 100%); border-radius: 5px; transition: width 0.4s cubic-bezier(0.25, 1, 0.5, 1); }

.wnfc-tier {
    position: absolute; top: 50%; 
    transform: translate(-50%, -50%) scale(1.15); 
    z-index: 2;
    background: #fff; 
    border: 1px solid #67764F; 
    color: #bbb; 
    font-size: 11px; font-weight: 700; 
    padding: 3px 6px; 
    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; }

/* WARENKORB-STANDARD: Link mittig */
.wnfc-discover-link {
    display: block;
    width: 100%;
    margin-top: 15px;
    text-align: center;
    color: #674D31;
    font-weight: 400; 
    font-size: 13px;
    text-decoration: underline;
    transition: color 0.2s ease;
    cursor: pointer;
}
.wnfc-discover-link:hover {
    color: #533E27;
    text-decoration: none;
}


/* --- OVERRIDES FÜR DEN SHORTCODE (PRODUKTSEITE) --- */
.wnfc-external-discount-container {
    position: relative;
    z-index: 1; 
}
.wnfc-external-discount-container .wnfc-discount-header { 
    text-align: left; 
}
.wnfc-external-discount-container .wnfc-discount-title { 
    display: none; 
}
/* UPDATE V13.54: Größere Schrift auf der Produktseite */
.wnfc-external-discount-container .wnfc-discount-msg { 
    font-size: 15px; 
    line-height: 1.5; 
}
.wnfc-external-discount-container .wnfc-progress-container { 
    margin-left: 0; 
    margin-right: 0;
}
.wnfc-external-discount-container .wnfc-discover-link { 
    text-align: left; 
}
/* -------------------------------------------------- */


.wnfc-discount-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; margin-bottom: 5px; padding-bottom: 5px; 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; }

.wnfc-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 18px; margin-bottom: 15px; color: #674D31; }
.wnfc-total-row span:first-child { font-weight: 500; color: #674D31; font-size: 16px; }
.wnfc-total-row span:last-child { font-weight: 800; font-size: 20px; color: #674D31; }

.wnfc-total-row.wnfc-savings-active,
.wnfc-total-row.wnfc-savings-active span {
    color: #67764F !important;
    transition: color 0.3s ease;
}

/* Streichpreis */
.wnfc-original-price {
    color: #999 !important;
    text-decoration: line-through;
    font-size: 15px;
    font-weight: 500;
    margin-right: 6px;
}
.wnfc-total-row.wnfc-savings-active .wnfc-original-price {
    color: #999 !important;
}

/* ---------------------------------------------------------
   5. BUTTONS & DELIVERY INFO
--------------------------------------------------------- */
.wnfc-buttons-container { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-top: 10px; 
    align-items: center; 
}

.wnfc-checkout-btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 12px; 
    width: 100%; 
    padding: 9px 12px; 
    background: #67764F; 
    color: #fff !important; 
    text-align: center; 
    text-decoration: none; 
    font-weight: 700; 
    font-size: 16px; 
    border-radius: 6px; 
    border: none; 
    transition: background 0.2s, transform 0.1s; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    box-sizing: border-box; 
}
.wnfc-checkout-btn:hover { background: #525E3F; color: #fff !important; }

/* DELIVERY INFO STYLING */
.pz_product_available {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    color: #674D31; 
    font-weight: 500;
}
.delivery_info_status {
    display: inline-block;
    vertical-align: middle;
}

/* ---------------------------------------------------------
   6. TRIGGER & ANIMATIONS
--------------------------------------------------------- */
.wnfc-trigger-btn { position: relative; background: transparent !important; 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:active { transform: scale(1.05); background: transparent !important; box-shadow: 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); }

.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); } }

.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; }

/* ---------------------------------------------------------
   8. SCROLL LOCK
--------------------------------------------------------- */
#wnfc-flyout-cart,
#wnfc-items-container {
    overscroll-behavior: contain; 
}

body.wnfc-body-scroll-lock {
    overflow: hidden !important;
}