/* ═══════════════════════════════════════════════════════════════
   BECHIFY CART  —  Blinkit-style
   Covers: cart drawer, bill details, cart items, mobile/desktop
═══════════════════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --cart-green:      #2478BE;
    --cart-green-dk:   #1B5C96;
    --cart-bg:         #f0f2f5;
    --cart-white:      #fff;
    --cart-border:     #e8e8e8;
    --cart-text:       #1c1c1c;
    --cart-grey:       #666;
    --cart-light:      #999;
    --cart-radius:     12px;
    --cart-shadow:     0 -2px 16px rgba(0,0,0,.12);
}

/* ══════════════════════════════════════════════════════════════
   OVERLAY + PANEL
══════════════════════════════════════════════════════════════ */
.bcd-overlay {
    position: fixed; inset: 0; z-index: 10000;
    width: 100%; height: 100%;
    visibility: hidden;
    pointer-events: none;
}
.bcd-overlay.open {
    visibility: visible;
    pointer-events: all;
}

/* Dark scrim (desktop) */
.bcd-scrim {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.55);
    cursor: pointer;
    opacity: 0;
    transition: opacity .3s cubic-bezier(.4,0,.2,1);
}
.bcd-overlay.open .bcd-scrim {
    opacity: 1;
}

/* Panel */
.bcd-panel {
    position: absolute;
    top: 0; right: 0;
    width: 100%; max-width: 420px;
    height: 100%;
    background: var(--cart-bg);
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.bcd-overlay.open .bcd-panel {
    transform: translateX(0);
}

/* Mobile: full width */
@media (max-width: 767px) {
    .bcd-panel { max-width: 100%; }
    .bcd-scrim { display: none; }
}

/* ── Header ───────────────────────────────────────────────── */
.bcd-header {
    display: flex; align-items: center; gap: 10px;
    padding: 0 16px; height: 56px; flex-shrink: 0;
    background: var(--cart-white);
    border-bottom: 1px solid var(--cart-border);
}
.bcd-back {
    width: 36px; height: 36px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: none;
    background: #f0f0f0;
    color: var(--cart-text); cursor: pointer; padding: 0;
    transition: background .15s;
}
.bcd-back:hover { background: #e0e0e0; }
.bcd-back svg { display: block; }
html.night-mode .bcd-back { background: #2d2d32; color: #f0f0f2; }
html.night-mode .bcd-back:hover { background: #3a3a3f; }
.bcd-title {
    flex: 1; font-size: 17px; font-weight: 800;
    color: var(--cart-text);
}
.bcd-share {
    display: flex; align-items: center; gap: 5px;
    font-size: 13px; font-weight: 600;
    color: var(--cart-green); border: none; background: none; cursor: pointer;
}

/* ── Scrollable body ──────────────────────────────────────── */
.bcd-body {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.bcd-body::-webkit-scrollbar { width: 4px; }
.bcd-body::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

/* ── Card (white rounded boxes) ──────────────────────────── */
.bcd-card {
    background: var(--cart-white);
    border-radius: var(--cart-radius);
}

/* ── Delivery row ─────────────────────────────────────────── */
.bcd-delivery {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
}
.bcd-delivery-icon {
    width: 44px; height: 44px; flex-shrink: 0;
    border-radius: 10px; background: #f0f9f1;
    display: flex; align-items: center; justify-content: center;
}
.bcd-delivery-info strong {
    display: block; font-size: 14px; font-weight: 800;
    color: var(--cart-text); line-height: 1.3;
}
.bcd-delivery-info span {
    font-size: 12px; color: var(--cart-grey);
}
.bco-confirm-store{display:flex;align-items:center;gap:12px;padding:14px;background:#f0f7ff;border:1px solid #b3d9f5;border-radius:12px}.bco-confirm-store img{width:44px;height:44px;border-radius:10px;object-fit:cover;flex-shrink:0}.bco-confirm-store-info{flex:1;min-width:0}.bco-confirm-store-name{font-size:15px;font-weight:800;color:#2478BE;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bco-confirm-store-meta{font-size:12px;color:#777;margin-top:3px}html.night-mode .bco-confirm-store{background:#1f1f23!important;border-color:#34343a!important}html.night-mode .bco-confirm-store-name{color:#f0f0f2!important}html.night-mode .bco-confirm-store-meta{color:#b8b8c4!important}
/* ── Cart Items ───────────────────────────────────────────── */
.bcd-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-top: 1px solid #f5f5f5;
}
.bcd-item:first-of-type { border-top: none; }
.bcd-item-img {
    width: 60px; height: 60px; flex-shrink: 0;
    border-radius: 8px; object-fit: contain;
    background: #f8f8f8; border: 1px solid #eee;
    padding: 4px;
}
.bcd-item-img-ph {
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; padding: 0;
}
.bcd-item-info { flex: 1; min-width: 0; }
.bcd-item-name {
    font-size: 13px; font-weight: 600; color: var(--cart-text);
    line-height: 1.4; margin-bottom: 2px;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.bcd-item-unit {
    font-size: 12px; color: var(--cart-grey); margin-bottom: 4px;
}
.bcd-item-price {
    font-size: 14px; font-weight: 700; color: var(--cart-text);
}
.bcd-item-stepper {
    display: flex; align-items: center;
    border-radius: 8px; overflow: hidden;
    border: 1.5px solid var(--cart-green);
    flex-shrink: 0;
}
.bcd-item-stepper button {
    width: 34px; height: 34px;
    background: var(--cart-green); color: #fff;
    border: none; font-size: 20px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: background .15s;
}
.bcd-item-stepper button:hover { background: var(--cart-green-dk); }
.bcd-item-stepper span {
    min-width: 32px; text-align: center;
    font-size: 15px; font-weight: 700;
    color: var(--cart-green); background: #fff;
    height: 34px; display: flex; align-items: center;
    justify-content: center; padding: 0 4px;
}

/* ── Bill Details ─────────────────────────────────────────── */
.bcd-bill-title {
    font-size: 15px; font-weight: 800;
    color: var(--cart-text); padding: 14px 16px 10px;
    border-bottom: 1px solid #f5f5f5;
}
.bcd-bill-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; font-size: 13px; color: var(--cart-grey);
    border-bottom: 1px solid #f8f8f8;
}
.bcd-bill-row:last-child { border-bottom: none; }
.bcd-bill-row-left {
    display: flex; align-items: center; gap: 7px;
}
.bcd-bill-row-left svg { flex-shrink: 0; }
.bcd-bill-row-val { font-weight: 600; color: var(--cart-text); }
.bcd-bill-info {
    width: 14px; height: 14px;
    border: 1.5px solid #aaa; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 9px; color: #aaa; font-weight: 700; cursor: help;
    flex-shrink: 0; margin-left: 2px;
}
.bcd-grand-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px dashed var(--cart-border);
    font-size: 15px; font-weight: 800; color: var(--cart-text);
}
.bcd-grand-row-left {
    display: flex; align-items: center; gap: 5px;
}

/* ── Cancellation Policy ──────────────────────────────────── */
.bcd-cancel-title {
    font-size: 14px; font-weight: 800;
    color: var(--cart-text); padding: 14px 16px 6px;
}
.bcd-cancel-text {
    font-size: 12px; color: var(--cart-grey);
    line-height: 1.6; padding: 0 16px 14px;
}

/* ── Empty cart ───────────────────────────────────────────── */
.bcd-empty {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 20px; text-align: center;
    background: var(--cart-white);
    border-radius: var(--cart-radius);
}
.bcd-empty svg { color: #ccc; margin-bottom: 16px; }
.bcd-empty p {
    font-size: 16px; font-weight: 700; color: var(--cart-text);
    margin-bottom: 6px;
}
.bcd-empty small {
    font-size: 13px; color: var(--cart-grey); margin-bottom: 20px;
    display: block;
}
.bcd-empty a {
    padding: 10px 24px; background: var(--cart-green);
    color: #fff; border-radius: 8px; font-weight: 700;
    font-size: 14px; text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.bcd-footer {
    flex-shrink: 0;
    background: var(--cart-green);
    display: flex; align-items: center;
    padding: 14px 20px; gap: 16px;
    cursor: pointer;
}
.bcd-footer-total {
    flex: 0 0 auto;
}
.bcd-footer-amount {
    display: block; font-size: 17px; font-weight: 900;
    color: #fff; line-height: 1.2;
}
.bcd-footer-label {
    display: block; font-size: 10px; font-weight: 700;
    color: rgba(255,255,255,.75); text-transform: uppercase;
    letter-spacing: .5px;
}
.bcd-footer-action {
    flex: 1; text-align: right;
    font-size: 15px; font-weight: 800; color: #fff;
    display: flex; align-items: center; justify-content: flex-end; gap: 6px;
    white-space: nowrap; overflow: hidden;
}
.bcd-footer-action svg { flex-shrink: 0; }
html.night-mode .bco-modal{background:#18181b;}html.night-mode .bco-header{background:#18181b;border-color:#34343a;}html.night-mode .bco-step-content,html.night-mode .bco-step-footer{background:#18181b;}html.night-mode .bco-addr-card,html.night-mode .bco-bill,html.night-mode .bco-confirm-addr,html.night-mode .bco-confirm-items,html.night-mode .bco-payment-badge,html.night-mode .bco-cancel-policy{background:#1f1f23!important;border:1px solid #34343a!important;color:#d4d4dc!important;}html.night-mode .bco-addr-card:has(input:checked){border-color:#f0f0f2!important;box-shadow:0 0 0 3px rgba(255,255,255,.12)!important;background:#252529!important;}html.night-mode .bco-default-badge{background:#303036!important;color:#f0f0f2!important;border:1px solid #44444a;}html.night-mode .bco-payment-badge{background:#1f1f23!important;border-color:#34343a!important;}html.night-mode .bco-payment-badge div>div:first-child{color:#f0f0f2!important;}html.night-mode .bco-payment-badge div>div:last-child{color:#b8b8c4!important;}html.night-mode .bco-cancel-policy strong{color:#f0f0f2!important;}html.night-mode .bco-cancel-policy{color:#b8b8c4!important;}html.night-mode .bco-primary-btn,html.night-mode .bco-place-btn{background:#252529!important;border:1px solid #44444a!important;color:#fff!important;}html.night-mode .bco-primary-btn:hover,html.night-mode .bco-place-btn:hover{background:#303036!important;}html.night-mode .bco-step.active{background:#252529!important;color:#fff!important;border:1px solid #555;}html.night-mode .bco-confirm-store{background:#1f1f23!important;border-color:#34343a!important;}html.night-mode .bco-confirm-store-name{color:#f0f0f2!important;}html.night-mode #bco-free-del-hint{color:#b8b8c4!important;}
/* ══════════════════════════════════════════════════════════════
   DESKTOP HEADER CART BUTTON (when cart has items)
══════════════════════════════════════════════════════════════ */
.gh-cart-btn.has-items {
    background: var(--cart-green) !important;
    border-color: var(--cart-green) !important;
    color: #fff !important;
}
.gh-cart-btn.has-items:hover {
    background: var(--cart-green-dk) !important;
}
.gh-cart-btn-inner {
    display: flex; flex-direction: column;
    align-items: flex-start; line-height: 1.2;
}
.gh-cart-btn-items {
    font-size: 12px; font-weight: 700;
}
.gh-cart-btn-total {
    font-size: 13px; font-weight: 800;
}

/* ══════════════════════════════════════════════════════════════
   MOBILE PDP STICKY BOTTOM  (two-row system)
══════════════════════════════════════════════════════════════ */



/* Row 2: Product info + Add to cart — always visible on mobile */
.bl-sab {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 400;
    background: var(--cart-white);
    border-top: 1px solid var(--cart-border);
    display: none;
    align-items: center; gap: 12px;
    padding: 10px 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.10);
}
@media (max-width: 767px) {
    .bl-sab { display: flex; }
}

.bl-sab-info { flex: 1; min-width: 0; }
.bl-sab-unit {
    font-size: 13px; font-weight: 600; color: var(--cart-grey);
    margin-bottom: 2px;
}
.bl-sab-price-row {
    display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.bl-sab-price {
    font-size: 17px; font-weight: 900; color: var(--cart-text);
}
.bl-sab-mrp {
    font-size: 12px; color: var(--cart-light); text-decoration: line-through;
}
.bl-sab-off {
    font-size: 11px; font-weight: 700;
    background: #e8f5e9; color: #2e7d32;
    padding: 1px 6px; border-radius: 4px;
}
.bl-sab-tax {
    font-size: 10px; color: var(--cart-light); margin-top: 1px;
}
.bl-sab-btn {
    flex-shrink: 0; height: 46px; padding: 0 20px;
    background: var(--cart-green); color: #fff;
    border: none; border-radius: 8px;
    font-size: 14px; font-weight: 800; cursor: pointer;
    white-space: nowrap; transition: background .15s;
    font-family: inherit;
}
.bl-sab-btn:hover { background: var(--cart-green-dk); }
.bl-sab-btn:active { transform: scale(.97); }

@media (max-width: 767px) {
    .bl-page { padding-bottom: 80px !important; }
}

.bk-global-vcb {
    position: fixed;
    bottom: 20px;
    left: 0; right: 0;
    z-index: 9990;
    padding: 0 12px;
    pointer-events: none;
    display: none;
    transition: bottom .25s ease, transform .25s ease;
}
@media (max-width: 980px) {
    .bk-global-vcb.has-items { display: block; }
    .bk-global-vcb.above-nav { bottom: 78px; }
    .bk-global-vcb.nav-hidden { bottom: 20px; }
}
body.is-android-app .bk-global-vcb.above-nav { bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }
body.is-android-app .bk-global-vcb.nav-hidden { bottom: calc(20px + env(safe-area-inset-bottom, 0px)) !important; }
.bk-global-vcb-inner {
    display: flex;
    align-items: center;
    background: var(--cart-green);
    border-radius: 14px;
    padding: 10px 16px;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 2px 16px rgba(36,120,190,.45);
    pointer-events: all;
}
.bk-global-vcb-icon {
    width: 34px; height: 34px; flex-shrink: 0;
    background: rgba(255,255,255,.2);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.bk-global-vcb-icon svg { display: block; }
.bk-gvcb-count {
    display: block; font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.85); line-height: 1.2;
}
.bk-gvcb-amount {
    display: block; font-size: 15px; font-weight: 900;
    color: #fff; line-height: 1.2;
}
.bk-global-vcb-action {
    font-size: 13px; font-weight: 800; color: #fff;
    display: flex; align-items: center; gap: 3px; flex-shrink: 0;
}
html.night-mode .bk-global-vcb-inner {
    box-shadow: 0 2px 16px rgba(0,0,0,.5);
}

/* ── Night mode ───────────────────────────────────────────── */
html.night-mode .bcd-overlay { background: rgb(0 0 0 / 40%); }
html.night-mode .bcd-panel { background: #0f0f11; }
html.night-mode .bcd-body { background: #0f0f11; }
html.night-mode .bcd-card { background: #1c1c1f; border-color: #2d2d32; }
html.night-mode .bcd-header { background: #1c1c1f; border-color: #2d2d32; }
html.night-mode .bcd-title { color: #f0f0f2; }
html.night-mode .bcd-item-name { color: #f0f0f2; }
html.night-mode .bcd-item-price { color: #f0f0f2; }
html.night-mode .bcd-item-unit { color: #888; }
html.night-mode .bcd-bill-title { color: #f0f0f2; }
html.night-mode .bcd-bill-row { border-color: #252529; color: #ccc; }
html.night-mode .bcd-bill-row-label,
html.night-mode .bcd-cancel-text,
html.night-mode .bcd-delivery-info span,
html.night-mode .bcd-item-unit{
    color:#b8b8c4;
}
html.night-mode .bcd-bill-row-val { color: #f0f0f2; }
html.night-mode .bcd-grand-row { color: #f0f0f2; border-color: #2d2d32; }
html.night-mode .bcd-grand-label { color: #aaa; }
html.night-mode .bcd-grand-amount { color: #f0f0f2; }
html.night-mode .bcd-item { border-color: #252529; }
html.night-mode .bcd-cancel-note { background: #1c1c1f; color: #888; }
html.night-mode .bcd-footer{
    background:#252529;
    border-top:1px solid #34343a;
}
html.night-mode .bcd-item-stepper{
    border-color:#34343a;
}

html.night-mode .bcd-item-stepper button{
    background:#252529;
    color:#f0f0f2;
}

html.night-mode .bcd-item-stepper button:hover{
    background:#303036;
}

html.night-mode .bcd-item-stepper span{
    background:#1c1c1f;
    color:#f0f0f2;
}
html.night-mode .bcd-delivery-icon{
    background:#252529;
}

html.night-mode .bcd-delivery { background: #1c1c1f; }
html.night-mode .bcd-delivery-info { color: #aaa; }
html.night-mode .bcd-delivery-info strong { color: #f0f0f2; }
html.night-mode .bcd-stepper { background: #1B5C96; }
html.night-mode .bl-sab { background: #1c1c1f; border-color: #2d2d32; }
html.night-mode .bl-sab-price { color: #f0f0f2; }
html.night-mode .bcd-empty{background:#1c1c1f;border:1px solid #2d2d32;}html.night-mode .bcd-empty p{color:#f0f0f2;}html.night-mode .bcd-empty small{color:#a1a1aa;}html.night-mode .bcd-empty svg{color:#6b7280;}
html.night-mode .bcd-login-title { color: #f0f0f2; }
html.night-mode .bcd-login-sub { color: #888; }