/* ==========================================================================
   BAGZELIA COMMERCE SUITE - SHOPIFY-QUALITY SIDE CART & FLOATING CART CSS
   Ultra-fast, responsive, modern glassmorphism & gold accent theme.
   ========================================================================== */

:root {
    --bz-accent: #cba865;
    --bz-accent-hover: #b5924f;
    --bz-drawer-bg: #ffffff;
    --bz-text-main: #0f172a;
    --bz-text-muted: #64748b;
    --bz-border-light: #f1f5f9;
    --bz-radius-md: 16px;
    --bz-shadow-drawer: -10px 0 30px rgba(15, 23, 42, 0.15);
}

/* ─── FLOATING CART LAUNCHER ───────────────────────────────────────────── */
.bz-floating-cart {
    position: fixed;
    z-index: 99998;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bz-floating-cart:hover {
    transform: scale(1.08);
}

.bz-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 800;
    padding: 0 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ─── OVERLAY ──────────────────────────────────────────────────────────── */
.bz-cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999998;
    display: none;
}

/* ─── DRAWER CONTAINER ─────────────────────────────────────────────────── */
.bz-cart-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 100%;
    max-width: 440px;
    height: 100%;
    background: var(--bz-drawer-bg);
    z-index: 999999;
    box-shadow: var(--bz-shadow-drawer);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.bz-cart-drawer.open {
    right: 0;
}

/* ─── DRAWER HEADER ────────────────────────────────────────────────────── */
.bz-cart-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--bz-border-light);
}

.bz-cart-header h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: var(--bz-text-main);
}

.bz-cart-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--bz-text-muted);
    line-height: 1;
    padding: 4px;
}

.bz-cart-close-btn:hover {
    color: var(--bz-text-main);
}

/* ─── DRAWER BODY ──────────────────────────────────────────────────────── */
.bz-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

/* ─── FREE SHIPPING BAR ────────────────────────────────────────────────── */
.bz-shipping-bar-wrap {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.bz-shipping-bar-text {
    font-size: 12px;
    text-align: center;
    margin-bottom: 8px;
    color: var(--bz-text-main);
}

.bz-shipping-bar-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
}

.bz-shipping-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #cba865 0%, #10b981 100%);
    transition: width 0.4s ease;
}

/* ─── CART ITEMS ───────────────────────────────────────────────────────── */
.bz-cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--bz-border-light);
}

.bz-cart-item-img img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
}

.bz-cart-item-details {
    flex: 1;
}

.bz-cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.bz-cart-item-title a {
    color: var(--bz-text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.bz-cart-item-remove {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
}

.bz-cart-item-remove:hover {
    color: #ef4444;
}

.bz-cart-item-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.bz-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}

.bz-qty-btn {
    background: #f8fafc;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-weight: 700;
}

.bz-qty-input {
    width: 32px;
    text-align: center;
    border: none;
    font-size: 12px;
    font-weight: 700;
    -moz-appearance: textfield;
}

.bz-qty-input::-webkit-outer-spin-button,
.bz-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bz-cart-item-price {
    font-weight: 800;
    font-size: 14px;
    color: var(--bz-text-main);
}

/* ─── DRAWER FOOTER ────────────────────────────────────────────────────── */
.bz-cart-drawer-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--bz-border-light);
    background: #ffffff;
}

.bz-coupon-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.bz-coupon-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 12px;
}

.bz-coupon-bar button {
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.bz-cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}

.bz-cart-tax-notice {
    font-size: 11px;
    color: var(--bz-text-muted);
    margin: 0 0 16px 0;
}

.bz-btn-primary.bz-checkout-cta-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--bz-accent);
    color: #ffffff;
    padding: 14px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 4px 14px rgba(203, 168, 101, 0.4);
    transition: background 0.2s ease;
}

.bz-btn-primary.bz-checkout-cta-btn:hover {
    background: var(--bz-accent-hover);
}

/* ─── EMPTY STATE ──────────────────────────────────────────────────────── */
.bz-cart-empty-state {
    text-align: center;
    padding: 40px 20px;
}

.bz-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.bz-shop-now-btn {
    display: inline-block;
    background: var(--bz-accent);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 16px;
}
