/* ==========================================================
   SMOOTH SIDE CART STYLES
========================================================== */
.marbo-cart-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 999998;
    opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.marbo-cart-overlay.active { opacity: 1; visibility: visible; }

.marbo-side-cart {
    position: fixed; top: 0; right: 0; width: 420px; max-width: 90vw; height: 100vh;
    background: #fff; z-index: 999999;
    /* This is the secret to 0 lag animations: */
    transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex; flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
}
.marbo-side-cart.active { transform: translateX(0); }

/* Header */
.luxury-cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 25px 30px; border-bottom: 1px solid #eaeaea;
}
.luxury-cart-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 20px; font-weight: 500; margin: 0; color: #111;
}
.luxury-cart-close {
    background: none; border: none; color: #111; cursor: pointer; padding: 0;
}

/* Body / Items */
.widget_shopping_cart_content { flex: 1; display: flex; flex-direction: column; overflow: hidden; transition: opacity 0.3s ease;}
.luxury-cart-inner { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.luxury-cart-body { padding: 30px; overflow-y: auto; flex: 1; }

.lux-cart-item { display: flex; gap: 15px; margin-bottom: 25px; }
.lux-item-img img { width: 80px; height: 100px; object-fit: cover; }
.lux-item-content { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.lux-item-title { font-family: 'Jost', sans-serif; font-size: 15px; font-weight: 500; color: #111; text-decoration: none; margin-bottom: 5px; }
.lux-item-price { font-family: 'Jost', sans-serif; font-size: 14px; color: #555; margin-bottom: 15px; }

/* Actions (Qty + Remove) */
.lux-item-actions { display: flex; align-items: center; gap: 20px; }
.lux-qty-wrap {
    display: flex; align-items: center; border: 1px solid #ddd; border-radius: 20px; padding: 4px 10px;
}
.lux-qty-btn { background: none; border: none; font-size: 16px; color: #111; cursor: pointer; padding: 0 5px; }
.lux-qty-val { font-family: 'Jost', sans-serif; font-size: 14px; margin: 0 10px; min-width: 15px; text-align: center; }

.lux-remove { font-family: 'Jost', sans-serif; font-size: 12px; color: #888; text-decoration: underline; background: none; border: none; cursor: pointer; padding: 0; }
.lux-remove:hover { color: #d00000; }

/* Empty Cart */
.lux-empty-msg { font-family: 'Jost', sans-serif; font-size: 16px; color: #555; text-align: center; margin-top: 40px; }
.lux-return-shop { display: block; text-align: center; font-family: 'Jost', sans-serif; font-size: 14px; color: #111; text-decoration: underline; margin-top: 20px; }

/* Footer / Checkout Button */
.luxury-cart-footer { padding: 25px 30px; border-top: 1px solid #eaeaea; background: #fafafa; }
.lux-summary-line { display: flex; justify-content: space-between; font-family: 'Poppins', sans-serif; font-size: 18px; font-weight: 600; color: #111; margin-bottom: 10px; }
.lux-shipping-note { font-family: 'Jost', sans-serif; font-size: 13px; color: #666; text-align: center; margin-bottom: 20px; }

.lux-checkout-btn {
    display: flex; justify-content: center; align-items: center; width: 100%; height: 54px;
    background: #111; color: #fff; font-family: 'Jost', sans-serif; font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; border-radius: 30px; text-decoration: none; transition: background 0.3s ease;
}
.lux-checkout-btn:hover { background: #333; color: #fff; }


/* ==========================================================
   MOBILE-FRIENDLY 100VH SLIDE CART & LOCKED HEADER/FOOTER
========================================================== */
/* 1. LOCK THE OUTER SHELL */
.marbo-side-cart {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100% !important; 
    max-height: 100dvh !important; 
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; /* Prevents the whole cart from scrolling */
}

/* 2. LOCK THE HEADER TO THE TOP */
.luxury-cart-header {
    flex: 0 0 auto !important; /* 0 grow, 0 shrink, fixed height */
    width: 100% !important;
    padding: 15px 20px !important;
    min-height: 60px !important;
    border-bottom: 1px solid #eaeaea !important;
    background: #fff !important; /* Ensure it stays solid */
    z-index: 10 !important;
}

.luxury-cart-header h2 {
    font-size: 20px !important; 
    margin: 0 !important;
}

/* 3. FORCE WRAPPERS TO FILL MIDDLE SPACE */
.widget_shopping_cart_content,
.luxury-cart-inner {
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important; /* Vital: stops content from pushing header up */
    height: 100% !important;
    width: 100% !important;
}

/* 4. THIS IS THE ONLY PART THAT SCROLLS */
.luxury-cart-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important; /* Smooth iOS scroll */
    padding: 15px 20px 20px 20px !important;
}

/* 5. LOCK FOOTER TO THE BOTTOM */
.luxury-cart-footer {
    flex: 0 0 auto !important; /* 0 grow, 0 shrink, fixed height */
    width: 100% !important;
    padding: 15px 20px !important; 
    background: #fafafa !important;
    z-index: 10 !important;
    border-top: 1px solid #eaeaea !important;
}

.lux-checkout-btn {
    padding: 12px 20px !important; 
    font-size: 14px !important;
}


/* ==========================================================
   1. HIDE WOOCOMMERCE "VIEW CART" INJECTION
========================================================== */
a.added_to_cart.wc-forward,
.added_to_cart.wc-forward {
    display: none !important;
}

/* ==========================================================
   2. PREMIUM CART BADGE (HEADER ICON)
========================================================== */
/* Ensure the parent icon wrapper acts as an anchor point */
.site-header-cart,
.cart-icon-wrap,
a.cart-contents {
    position: relative !important;
    display: inline-flex !important;
    align-items: center;
    text-decoration: none;
}

/* Style the actual number into a floating black circle */
.site-header-cart .count,
.cart-icon-wrap .count,
a.cart-contents .count {
    position: absolute !important;
    top: -6px !important; /* Pulls it above the icon */
    right: -10px !important; /* Pushes it to the right edge */
    background-color: #000000 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    width: 18px !important;
    height: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important; /* Forces a perfect circle */
    line-height: 1 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15) !important; /* Subtle shadow for depth */
}

/* Hide extra text WooCommerce sometimes adds (e.g., "items") */
.site-header-cart .count::after,
.site-header-cart .count::before,
a.cart-contents .count::after,
a.cart-contents .count::before {
    display: none !important;
}