/* =========================================================================
   CART SIDEBAR  — modern e-commerce checkout aesthetic
   Targets: the right-hand column of storefront index / product page.
   Scope:   #idcartpopup (the wrapper used by cartpopupclick).
   Style:   inspired by international stores (ASOS, Allbirds, Glossier,
            Aritzia) — soft white surfaces, generous breathing room,
            confident typography, a single primary CTA.
   ========================================================================= */

/* ── 1. Container ────────────────────────────────────────────────── */
#idcartpopup {
    --cart-bg:        #ffffff;
    --cart-surface:   #ffffff;
    --cart-soft:      #f7f7f8;
    --cart-border:    #ececef;
    --cart-divider:   #f1f1f3;
    --cart-text-1:    #0e1015;
    --cart-text-2:    #5b6068;
    --cart-text-3:    #9aa0a8;
    --cart-accent:    var(--primary-color, #111315);
    --cart-shadow:    0 1px 2px rgba(0,0,0,0.04), 0 8px 28px rgba(0,0,0,0.04);
    --cart-radius-lg: 18px;
    --cart-radius-md: 12px;
    --cart-radius-sm: 8px;

    color: var(--cart-text-1);
    font-family: var(--store-font, inherit);
}

/* Inline (col-xl-4) — make every card share the same modern look,
   remove the old separators and tighten vertical spacing. */
.cart-side-inline #idcartpopup {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 2px 2px 24px;
}

/* ── Push vs stick ──
   `cart-push-push` (default)  — the inline cart scrolls with the page.
   `cart-push-stick`           — the inline cart is glued to the top of
                                 the viewport right under the header.
                                 In this mode the hero is moved INSIDE
                                 the products column (see index.blade)
                                 so the .row starts at the very top of
                                 the content area, letting the sticky
                                 column climb all the way up. The `top:`
                                 distance equals the header's measured
                                 height, set live by the header-sync JS
                                 on <html> as --header-h (fallback 60). */
body.cart-push-stick .cart-side-inline {
    position: sticky !important;
    top: var(--header-h, 60px);
    align-self: flex-start;
    /* No inner scroll — the cart is whatever height its content needs.
       overflow stays visible so it doesn't introduce a scrollbar inside
       the sidebar (user requirement). The page scroll handles anything
       taller than the viewport. */
    overflow: visible !important;
    transition: none !important;
}
/* The row holding the columns must not stretch the sticky one — without
   align-items:flex-start a Bootstrap row defaults to align-items:stretch
   which forces both columns to equal heights and breaks sticky. */
body.cart-push-stick .row.match-height {
    align-items: flex-start !important;
}
@media (max-width: 991px) {
    /* On narrow viewports the cart drops below the products, so sticking
       it to the top under a narrow header would just take over the
       screen — fall back to normal flow. */
    body.cart-push-stick .cart-side-inline {
        position: static !important;
        max-height: none;
        overflow-y: visible !important;
    }
}

/* All cart cards: same flat-modern look (replaces the previous mixed
   look where some cards had borders and others didn't). */
#idcartpopup > .card,
#idcartpopup .cart-card,
#idcartpopup .delivery-card,
#idcartpopup .instruction-card {
    background: var(--cart-surface) !important;
    border: 1px solid var(--cart-border) !important;
    border-radius: var(--cart-radius-lg) !important;
    box-shadow: var(--cart-shadow) !important;
    margin: 0 !important;
    overflow: hidden;
}

/* Card headers — slim, lighter divider, no harsh background */
#idcartpopup .card-header,
#idcartpopup .cart-header {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid var(--cart-divider) !important;
    padding: 18px 22px 14px !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#idcartpopup .card-header .card-title,
#idcartpopup .cart-header .card-title {
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--cart-text-1);
    margin: 0;
    text-transform: none;
}
#idcartpopup .card-body { padding: 16px 22px !important; }
#idcartpopup .card-footer {
    background: transparent !important;
    border-top: 1px solid var(--cart-divider) !important;
    padding: 14px 22px 18px !important;
}

/* ── 2. Empty-cart state ─────────────────────────────────────────── */
#idcartpopup .empty-cart {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--cart-soft);
    color: var(--cart-text-3);
    transition: background .15s ease, color .15s ease;
}
#idcartpopup .empty-cart:hover {
    background: #fee2e2;
    color: #b91c1c;
}
#idcartpopup .empty-cart svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── 3. Cart line items ─────────────────────────────────────────── */
#idcartpopup .checkout-body,
.cart-side-inline #idcartpopup .checkout-body {
    overflow: visible !important;
    width: auto !important;
    max-height: none !important;
    background: rgba(255, 255, 255, 0.2) !important;
    padding: 0px 12px !important;
    border-radius: 14px !important;
}
#idcartpopup .checkout-items {
    display: grid !important;
    grid-template-columns: 56px 1fr auto;
    /* Per merchant — top-align so the title + price sit
       flush with the top of the thumbnail rather than
       drifting toward the centre when the qty stepper
       takes more vertical space. */
    align-items: start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--cart-divider);
    justify-content: initial !important;
}
#idcartpopup .checkout-items:last-child { border-bottom: 0; }
/* Product thumbnail — visible again. Compact 56px square with the
   image fully covering, rounded corners matching the cart-radius
   so the line item reads as a single product card. */
#idcartpopup .checkout-items .customer-images {
    display: block !important;
    width: 56px;
    height: 56px;
    border-radius: var(--cart-radius-md);
    overflow: hidden;
    background: var(--cart-soft);
    flex-shrink: 0;
}
#idcartpopup .checkout-items .customer-images img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}
#idcartpopup .checkout-items .customer-name {
    min-width: 0;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    /* Title + price stay tight together, hugging the top
       of the row next to the image rather than spreading. */
    align-items: flex-start;
    justify-content: flex-start;
    gap: 2px;
}
#idcartpopup .checkout-items .customer-name .title,
#idcartpopup .checkout-items .customer-name h6.title {
    width: auto !important;
    padding: 0 !important;
    margin: 0;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cart-text-1);
    letter-spacing: -0.005em;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
}
#idcartpopup .checkout-items .customer-name .title a {
    color: inherit !important;
    text-decoration: none;
}
#idcartpopup .checkout-items .customer-name .title a:hover { color: var(--cart-accent) !important; }
#idcartpopup .checkout-items .title_tax {
    font-size: 11px;
    color: var(--cart-text-3);
    margin: 0 !important;
    line-height: 1.4;
}
/* Variant chips — small rounded chips showing each picked dim
   as "Label: Value" (e.g. "צבע: ירוק"). They wrap onto multiple
   lines when there are 3+ dimensions so a long variant set never
   truncates. The .cart-variant-chips--row instance spans every
   column of the .checkout-items grid (image / name / qty) so it
   reads as its own full-width row beneath the item content. */
#idcartpopup .checkout-items .cart-variant-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 4px 0 2px;
    line-height: 1.2;
}
#idcartpopup .checkout-items .cart-variant-chips--row {
    grid-column: 1 / -1;
    margin: 2px 0 0;
    padding-top: 6px;
}
#idcartpopup .checkout-items .cart-variant-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    padding: 4px 9px;
    background: var(--cart-soft, #f7f7f8);
    border: 1px solid var(--cart-border, #ececef);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    color: var(--cart-text-2, #5b6068);
    line-height: 1.3;
    white-space: nowrap;
}
#idcartpopup .checkout-items .cart-variant-chip__label {
    color: var(--cart-text-3, #9aa0a8);
    font-weight: 500;
}
#idcartpopup .checkout-items .cart-variant-chip__value {
    color: var(--cart-text-1, #0e1015);
    font-weight: 700;
}
/* Pill add-ons chip — same shape as the variant chip but
   a soft cream background so it reads as "extras" not
   "spec" at a glance. The trailing +₪X price gets a
   stronger weight + brand-ish color so it pops next to
   the comma-joined value list. */
#idcartpopup .checkout-items .cart-variant-chip--pill {
    background: #fff8e8;
    border-color: #f3e6c3;
    white-space: normal;
}
#idcartpopup .checkout-items .cart-variant-chip__price {
    color: var(--cart-text-1, #0e1015);
    font-weight: 700;
    margin-inline-start: 2px;
}
html[data-scheme="dark"] #idcartpopup .checkout-items .cart-variant-chip {
    background: var(--cart-soft, #1c1f24);
    border-color: var(--cart-border, #2a2e35);
    color: var(--cart-text-2, #9aa0a8);
}
#idcartpopup .checkout-items .price-spin {
    /* Per merchant — bolder + slightly larger than the
       title so the price reads as the primary number
       on the line item, with the brand accent colour
       drawing the eye to it. */
    font-size: 15px;
    font-weight: 800;
    color: var(--cart-accent, #0e1015);
    margin: 0;
    letter-spacing: -0.01em;
}

/* Quantity stepper — pill, dark-on-white. Auto-flows to grid col 3
   (the auto-width column reserved for it). The earlier `grid-column:
   2` rule was a holdover from when the grid had different columns
   and was forcing the stepper to overlap the product name. */
#idcartpopup .checkout-items .item-spin {
    grid-column: auto;
    justify-self: end;
    width: auto !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center;
    gap: 0;
    background: var(--cart-surface);
    border: 1px solid var(--cart-border);
    border-radius: 999px;
    padding: 3px;
    overflow: hidden;
}
#idcartpopup .checkout-items .item-spin button.spin-rupes,
#idcartpopup .checkout-items .item-spin button.product_qty {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--cart-text-2);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
    box-shadow: none !important;
    margin: 0 !important;
}
#idcartpopup .checkout-items .item-spin button:hover {
    background: var(--cart-soft);
    color: var(--cart-text-1);
}
#idcartpopup .checkout-items .item-spin input.bx-cart-qty,
#idcartpopup .checkout-items .item-spin .product_qty_input {
    width: 28px !important;
    height: 26px;
    background: transparent !important;
    border: 0 !important;
    color: var(--cart-text-1) !important;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    padding: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

/* ── 4. Order summary (invoice block) ───────────────────────────── */
#idcartpopup .invoice-details .invoice-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#idcartpopup .invoice-details .invoice-detail {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    font-size: 13.5px;
    color: var(--cart-text-2);
}
#idcartpopup .invoice-details .invoice-title { font-weight: 500; color: var(--cart-text-2); }
#idcartpopup .invoice-details .invoice-amt {
    font-weight: 600;
    color: var(--cart-text-1);
    font-variant-numeric: tabular-nums;
}
#idcartpopup .invoice-details .invoice-detail#Subtotal,
#idcartpopup .invoice-details .invoice-detail:last-child {
    /* Per merchant — flush against the row above. No top border,
       no top margin, no top padding. The Total reads as part of
       the same list block instead of being visually detached. */
    margin-top: 0 !important;
    padding-top: 0 !important;
}
#idcartpopup .invoice-details .total-title {
    font-size: 14.5px !important;
    font-weight: 700 !important;
    color: var(--cart-text-1) !important;
    text-transform: none !important;
}
#idcartpopup .invoice-details .total-amount,
#idcartpopup .invoice-details .final_total_price {
    font-size: 19px !important;
    font-weight: 800 !important;
    color: var(--cart-text-1) !important;
    letter-spacing: -0.015em !important;
    line-height: 1.2;
}

/* ── 5. Delivery details / form inputs ──────────────────────────── */
#idcartpopup .delivery-card .card-body,
#idcartpopup .delivery-card .card-body.detail-form {
    padding: 18px 22px 20px !important;
}
#idcartpopup .form-group {
    margin-bottom: 12px;
}
#idcartpopup .form-group:last-child { margin-bottom: 0; }
#idcartpopup .form-control-label,
#idcartpopup label.form-control-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--cart-text-2);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
#idcartpopup .delivery-card input[type="text"],
#idcartpopup .delivery-card input[type="email"],
#idcartpopup .delivery-card input[type="tel"],
#idcartpopup .delivery-card .form-group input,
#idcartpopup .form-group .active,
#idcartpopup .delivery-card .form-control,
#idcartpopup textarea.special_instruct,
#idcartpopup textarea.form-control,
#idcartpopup select.change_location,
#idcartpopup select.form-control {
    width: 100% !important;
    height: 44px !important;
    background: var(--cart-surface) !important;
    border: 1px solid var(--cart-border) !important;
    border-radius: var(--cart-radius-md) !important;
    padding: 0 14px !important;
    font-size: 14px !important;
    color: var(--cart-text-1) !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
    appearance: none;
    -webkit-appearance: none;
}
#idcartpopup textarea.special_instruct,
#idcartpopup textarea.form-control {
    height: 90px !important;
    padding: 12px 14px !important;
    line-height: 1.5;
    resize: vertical;
}
#idcartpopup .delivery-card input:focus,
#idcartpopup .form-group input:focus,
#idcartpopup textarea.special_instruct:focus,
#idcartpopup textarea.form-control:focus,
#idcartpopup select.change_location:focus,
#idcartpopup select.form-control:focus {
    border-color: var(--cart-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cart-accent) 14%, transparent) !important;
    outline: none !important;
}
#idcartpopup input::placeholder,
#idcartpopup textarea::placeholder { color: var(--cart-text-3); }

/* Select chevron */
#idcartpopup select.change_location,
#idcartpopup select.form-control {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235b6068' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 12px !important;
    padding-right: 36px !important;
}
[dir="rtl"] #idcartpopup select.change_location,
[dir="rtl"] #idcartpopup select.form-control {
    background-position: left 14px center !important;
    padding-right: 14px !important;
    padding-left: 36px !important;
}

/* ── 6. Coupon row ──────────────────────────────────────────────── */
#idcartpopup .card .card-body.row {
    padding: 14px 22px !important;
    margin: 0 !important;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
}
#idcartpopup .card .card-body.row > .col-8 {
    flex: 1 1 auto;
    max-width: none;
    padding: 0 !important;
}
#idcartpopup .card .card-body.row > .col-4 {
    flex: 0 0 auto;
    width: auto;
    padding: 0 !important;
    display: flex;
    align-items: center;
}
#idcartpopup input.coupon {
    height: 42px !important;
    background: var(--cart-soft) !important;
    border: 1px solid transparent !important;
    border-radius: var(--cart-radius-md) !important;
    padding: 0 14px !important;
    font-size: 13.5px !important;
    color: var(--cart-text-1) !important;
    width: 100% !important;
}
#idcartpopup input.coupon:focus {
    background: var(--cart-surface) !important;
    border-color: var(--cart-accent) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cart-accent) 14%, transparent) !important;
}
#idcartpopup .apply-coupon,
#idcartpopup a.btn.apply-coupon {
    height: 42px;
    padding: 0 18px !important;
    background: var(--cart-text-1) !important;
    color: #fff !important;
    border-radius: var(--cart-radius-md) !important;
    border: 0 !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background .15s ease, transform .15s ease;
}
#idcartpopup .apply-coupon:hover { background: #000 !important; transform: translateY(-1px); }

/* Inline coupon row inside the cart summary's card-footer — sits right
   under the Total line. Visual separator on top so it feels like a
   distinct row but stays inside the card. */
#idcartpopup .cart-coupon-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--cart-divider);
}
#idcartpopup .cart-coupon-row input.coupon { flex: 1 1 auto; min-width: 0; }
#idcartpopup .cart-coupon-row .apply-coupon { flex: 0 0 auto; }

/* ── 7. Payment buttons block ───────────────────────────────────── */
#idcartpopup .checkoutButtons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 0;
}
#idcartpopup .checkoutButtons > [class*="col-"] {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    flex: none !important;
    padding: 0 !important;
    display: block !important;
    text-align: initial !important;
}
#idcartpopup .checkoutButtons .card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}
#idcartpopup .checkoutButtons .card .btn,
#idcartpopup .checkoutButtons button.btn,
#idcartpopup .checkoutButtons .whatsap-btn,
#idcartpopup .checkoutButtons .telegram-btn {
    width: 100% !important;
    height: 52px !important;
    padding: 0 18px !important;
    background: var(--cart-surface) !important;
    color: var(--cart-text-1) !important;
    border: 1px solid var(--cart-border) !important;
    border-radius: var(--cart-radius-md) !important;
    box-shadow: none !important;
    font-size: 14.5px !important;
    font-weight: 600 !important;
    letter-spacing: -0.005em;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px;
    line-height: 1;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
    text-align: center;
}
#idcartpopup .checkoutButtons .btn:hover,
#idcartpopup .checkoutButtons .whatsap-btn:hover,
#idcartpopup .checkoutButtons .telegram-btn:hover {
    background: var(--cart-soft) !important;
    border-color: var(--cart-text-3) !important;
    transform: translateY(-1px);
}
#idcartpopup .checkoutButtons .btn img {
    width: 18px !important;
    height: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    object-fit: contain;
}
#idcartpopup .checkoutButtons .btn i,
#idcartpopup .checkoutButtons .btn .fab,
#idcartpopup .checkoutButtons .btn .fas {
    font-size: 17px;
    margin: 0 !important;
}

/* Legacy "first child = primary CTA" override removed per
   merchant — all payment buttons share the same neutral card
   style now. The .cart-payment-bar scoped block further below
   sets the uniform 52px-tall card-style button. */

/* Trust strip section removed — markup and styles both stripped per
   merchant brief. */

/* ── 9. Mobile / cart-open drawer behavior ──────────────────────── */
/* When opened via the bell-cart icon (#idcartpopup becomes a fullscreen
   drawer) we want the same modern look, plus a clear close affordance
   at the top. We rely on existing JS to toggle visibility. */
@media (max-width: 991px) {
    #idcartpopup {
        background: var(--cart-bg) !important;
        padding: 18px 16px 32px !important;
    }
    .cart-side-inline #idcartpopup {
        padding: 0 0 24px !important;
        gap: 12px;
    }
    #idcartpopup .card-header,
    #idcartpopup .cart-header { padding: 16px 18px 12px !important; }
    #idcartpopup .card-body { padding: 14px 18px !important; }
    #idcartpopup .card-footer { padding: 12px 18px 16px !important; }
    #idcartpopup .checkout-items { grid-template-columns: 1fr auto; gap: 12px; }
}

/* ── 10. RTL fine-tune ──────────────────────────────────────────── */
[dir="rtl"] #idcartpopup .invoice-details .invoice-detail,
[dir="rtl"] #idcartpopup .checkoutButtons .btn {
    text-align: right;
}

/* ── 11. ACCORDION — Cart / Delivery+Notes / Location ─────────────
   Three vertically-stacked collapsible sections share one outer
   card. Each section has a click-to-toggle header (section title +
   chevron). Only one section is open at a time — clicking another
   header closes the current and opens the new. Same DOM regardless
   of open state, so payment handlers still find .fname / .email /
   .change_location / .special_instruct by class.
   ────────────────────────────────────────────────────────────── */
#idcartpopup .cart-acc {
    background: var(--cart-surface);
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius-lg);
    box-shadow: var(--cart-shadow);
    overflow: hidden;
}
#idcartpopup .cart-acc__item + .cart-acc__item {
    border-top: 1px solid var(--cart-divider);
}
#idcartpopup .cart-acc__head {
    /* !important on display + width to defeat legacy Bootstrap /
       custom.css button rules that ship width:100% / display:block
       and would otherwise collapse the layout. */
    display: flex !important;
    width: 100% !important;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cart-text-1);
    text-align: start;
    cursor: pointer;
    transition: background .15s;
    text-transform: none;
    letter-spacing: -0.005em;
    box-shadow: none;
}
#idcartpopup .cart-acc__head:hover {
    background: var(--cart-soft) !important;
}
#idcartpopup .cart-acc__item.is-open > .cart-acc__head {
    background: var(--cart-soft) !important;
}
#idcartpopup .cart-acc__title {
    flex: 1;
    line-height: 1.2;
}
#idcartpopup .cart-acc__chev {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: var(--cart-text-2);
    transition: transform .25s ease;
}
#idcartpopup .cart-acc__chev svg {
    width: 16px;
    height: 16px;
    display: block;
}
#idcartpopup .cart-acc__item.is-open > .cart-acc__head .cart-acc__chev {
    transform: rotate(180deg);
}

/* Bodies — only the .is-open item's accordion body renders; the
   plain section body renders unconditionally. Both strip the inner
   .card chrome since the wrapping container provides the border. */
#idcartpopup .cart-acc__body { display: none; }
#idcartpopup .cart-acc__item.is-open > .cart-acc__body { display: block; }
#idcartpopup .cart-acc__body > .card,
#idcartpopup .cart-section__body > .card {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0;
}
#idcartpopup .cart-acc__body > .card .card-header,
#idcartpopup .cart-section__body > .card .card-header {
    /* The accordion / section head already labels the section. */
    display: none;
}
#idcartpopup .cart-acc__body > .card .card-body,
#idcartpopup .cart-section__body > .card .card-body {
    padding: 0px 5px 0px !important;
}
#idcartpopup .cart-acc__body > .card .card-footer,
#idcartpopup .cart-section__body > .card .card-footer { padding: 0 !important; }

/* Notes + shipping sub-block separator styling lives in section 16
   (the form layout block) — declared there so the grid-column span
   sits alongside the spacing rules. */

/* Delivery Details — plain always-visible section (no accordion).
   Sits below the Cart accordion and absorbs the shipping zone +
   notes that used to be separate sections. Visual rhythm matches
   the accordion above: same border, same title-bar shape, just
   without the toggle behavior. */
#idcartpopup .cart-section {
    background: var(--cart-surface);
    border: 1px solid var(--cart-border);
    border-radius: var(--cart-radius-lg);
    box-shadow: var(--cart-shadow);
    overflow: hidden;
    margin-top: 8px;
}
#idcartpopup .cart-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--cart-soft);
    border-bottom: 1px solid var(--cart-divider);
}
#idcartpopup .cart-section__title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--cart-text-1);
    letter-spacing: -0.005em;
    line-height: 1.2;
}
/* Empty-cart trash icon in the section head. Subtle by default,
   reddens on hover to signal a destructive action. */
#idcartpopup .cart-section__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: var(--cart-text-3);
    background: transparent;
    transition: background .15s, color .15s;
    text-decoration: none;
}
#idcartpopup .cart-section__clear:hover {
    background: rgba(220, 53, 69, 0.08);
    color: #dc3545;
    text-decoration: none;
}
#idcartpopup .cart-section__clear svg { display: block; }
#idcartpopup .cart-section__body { /* the inner .card carries its own padding */ }

html[data-scheme="dark"] #idcartpopup .cart-section {
    background: #15151b;
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-scheme="dark"] #idcartpopup .cart-section__head {
    background: rgba(255, 255, 255, 0.04);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
html[data-scheme="dark"] #idcartpopup .cart-section__title {
    color: #e8ecf4;
}

/* ── 12. FIXED PAYMENT BAR ───────────────────────────────────────
   Sticky to the bottom of the cart scroll area so the checkout
   button is always one click away no matter how far the shopper
   has scrolled through the items list above. Background fill +
   top shadow give it a clear "lifted off the page" affordance.
   ────────────────────────────────────────────────────────────── */
#idcartpopup .cart-payment-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--cart-bg);
    margin-top: auto;
    padding: 14px 14px 16px;
    border-top: 1px solid var(--cart-divider);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    border-radius: var(--cart-radius-lg) var(--cart-radius-lg) 0 0;
}
#idcartpopup .cart-payment-bar > .row {
    margin: 0;
}
#idcartpopup .cart-payment-bar .checkoutButtons {
    padding: 0;
    gap: 8px;
}
/* The drawer mode opens the cart as a slide-in panel with overflow
   on #idcartpopup itself — sticky-bottom works out of the box there.
   Inline-side mode flows in the page column with the cart sticky to
   the viewport; sticky-bottom on .cart-payment-bar inherits the page
   scroll context which is what we want there too. */
.cart-side-inline #idcartpopup .cart-payment-bar {
    /* Pull the payment bar flush to the column edges so the lift
       shadow visually spans the full width of the side cart. */
    margin-inline: -2px;
    padding-inline: 16px;
}
html[data-scheme="dark"] #idcartpopup .cart-payment-bar {
    background: #15151b;
    border-top-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.45);
}
html[data-scheme="dark"] #idcartpopup .cart-acc {
    background: #15151b;
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-scheme="dark"] #idcartpopup .cart-acc__item + .cart-acc__item {
    border-top-color: rgba(255, 255, 255, 0.08);
}
html[data-scheme="dark"] #idcartpopup .cart-acc__head {
    color: #e8ecf4;
}
html[data-scheme="dark"] #idcartpopup .cart-acc__head:hover,
html[data-scheme="dark"] #idcartpopup .cart-acc__item.is-open > .cart-acc__head {
    background: rgba(255, 255, 255, 0.05) !important;
}
html[data-scheme="dark"] #idcartpopup .cart-acc__chev { color: #94a3b8; }
html[data-scheme="dark"] #idcartpopup .cart-acc__notes {
    border-top-color: rgba(255, 255, 255, 0.10);
}

/* ── 13. Floating contact widget — don't overlap the cart ─────────
   The .store-contact bubble lives at fixed bottom/end with z-index
   1400. In drawer mode it sat ON TOP of the payment buttons whenever
   the shopper opened the cart; in inline-side mode it constantly
   overlapped the right column where the cart lives.

   Drawer mode: hide it entirely while body.cart-open is active so
   the payment row is reachable.

   Inline-side mode: in RTL the cart pins to the right, so flip the
   contact widget to the left edge. In LTR the cart is on the left
   so we keep contact on its default right edge.
   ────────────────────────────────────────────────────────────── */
body.cart-open .store-contact { display: none !important; }

/* Lock the page scroll while the cart drawer is open so the
   background products grid doesn't slide around when the shopper
   scrolls inside the cart. overflow:hidden on <body> is the
   standard modal scroll-lock pattern; <html> too for iOS Safari
   which keeps scrolling unless both are locked. */
body.cart-open,
html:has(body.cart-open) {
    overflow: hidden !important;
}

[dir="rtl"] body.cart-inline-on .store-contact {
    inset-inline-end: auto !important;
    inset-inline-start: 22px !important;
    right: auto !important;
    left: 22px !important;
}

/* ── 14. Edge-to-edge accordion + true bottom-pinned payment bar ───
   Per merchant brief: drop the padding around the accordion so it
   sits flush with the cart panel edges, and pin the payment buttons
   to the actual bottom of the viewport (the old sticky-bottom rule
   was clipped 80px above the bottom by .cart-side-panel's bottom
   padding).

   Strategy: flip the cart panel to a flex column, zero out vertical
   padding, let #idcartpopup expand to fill the panel as a flex
   column with .cart-acc taking flex:1 (scrollable) and the payment
   bar as a fixed-height last child. No sticky positioning needed —
   the natural flow puts the payment bar at the bottom always.
   ────────────────────────────────────────────────────────────── */

/* Drawer mode — payment bar always pinned to the drawer's bottom
   regardless of how little cart content there is above. The trick
   is flex-column + margin-top:auto on the bar: when content is
   short, the auto margin consumes the empty space and pushes the
   bar to the bottom of the flex container; when content is tall,
   position:sticky bottom:0 keeps the bar visible at the viewport
   bottom while the content above scrolls. Both states land the
   bar at bottom:0 of the visible drawer. */
body.cart-mode-drawer .cart-side-panel {
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
body.cart-mode-drawer .cart-side-panel #idcartpopup {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    /* Per merchant — the bottom dock (totals + הוסיפו גם +
       continue / payment-bar) must stay FIXED at the bottom of
       the drawer even when the cart has many items. Switching
       this from overflow-y:auto to overflow:hidden moves the
       scroll inward to .cart-section--cart .card-body (already
       configured as overflow-y:auto above), so the dock sits in
       normal flow at the bottom of #idcartpopup and stays there
       regardless of items count. */
    overflow: hidden !important;
    padding: 0 !important;
}
body.cart-mode-drawer .cart-side-panel #idcartpopup .cart-acc {
    border-radius: 0 !important;
    border-inline: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}
/* .cart-section base is flex:0 0 auto so non-cart sections
   (delivery on step 2) stay sized to content; the cart section
   in step 1 gets its own flex:1 rule scoped to data-checkout-step
   lower in this file so the items scroll internally. */
body.cart-mode-drawer .cart-side-panel #idcartpopup .cart-section {
    border-radius: 0 !important;
    border-inline: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    flex: 0 0 auto !important;
}
body.cart-mode-drawer .cart-side-panel #idcartpopup .cart-payment-bar {
    position: sticky !important;
    bottom: 0 !important;
    margin: auto 0 0 !important; /* push to bottom of flex column when content is short */
    flex: 0 0 auto !important;
    z-index: 10;
    border-radius: 0 !important;
    background: var(--cart-bg) !important;
    border-top: 1px solid var(--cart-divider);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

/* Popup mode — centered modal (760px desktop / 460px mobile). Uses
   flex-column so #idcartpopup gets a defined height (flex:1 of the
   panel) which gives sticky-bottom a proper scroll context to pin
   the payment bar against. The earlier height:calc(100% - 28px)
   approach didn't work because the panel itself has height:auto
   (sized to content with a max-height), so 100% was ill-defined. */
body.cart-mode-popup .cart-side-panel {
    display: flex !important;
    flex-direction: column !important;
    padding: 28px 0 0 !important;
    overflow: hidden !important;
}
body.cart-mode-popup .cart-side-panel #idcartpopup {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    /* Same as drawer mode — moving the scroll INWARD to the cart
       items area so the bottom dock (totals + הוסיפו גם +
       continue / payment-bar) stays glued to the popup's bottom
       edge regardless of items count. */
    overflow: hidden !important;
    padding: 0 !important;
    background: transparent !important;
    height: auto !important;
    max-height: 100% !important;
}
body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-section {
    flex: 0 0 auto !important;
}
body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-section,
body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-acc {
    margin: 0 28px 12px !important;
}
body.cart-mode-popup .cart-side-panel #idcartpopup .cart-payment-bar {
    position: sticky !important;
    bottom: 0 !important;
    margin: auto 0 0 !important; /* push to bottom when content is short */
    flex: 0 0 auto !important;
    z-index: 5;
    border-radius: 0 0 20px 20px !important;
    border-top: 1px solid var(--cart-divider);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    background: var(--cart-bg) !important;
}
@media (max-width: 768px) {
    body.cart-mode-popup .cart-side-panel {
        padding: 22px 0 0 !important;
    }
    body.cart-mode-popup .cart-side-panel #idcartpopup {
        height: calc(100% - 22px);
    }
    body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-section,
    body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-acc {
        margin: 0 18px 10px !important;
    }
    body.cart-mode-popup .cart-side-panel #idcartpopup .cart-payment-bar {
        border-radius: 0 0 16px 16px !important;
    }
}

/* Under mode — 320px dropdown anchored below the cart icon. Flex
   column on the panel so #idcartpopup gets a real height (flex:1)
   that sticky-bottom can pin against. Panel padding zeroed so the
   sections sit edge-to-edge with the dropdown's rounded box. */
body.cart-mode-under .cart-side-panel {
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    overflow: hidden !important;
}
body.cart-mode-under .cart-side-panel #idcartpopup {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 0 !important;
    height: auto !important;
    max-height: none !important;
}
body.cart-mode-under .cart-side-panel #idcartpopup > .cart-section {
    flex: 0 0 auto !important;
}
body.cart-mode-under .cart-side-panel #idcartpopup > .cart-section {
    margin: 0 !important;
    border-radius: 0 !important;
    border-inline: 0 !important;
    border-top: 0 !important;
    box-shadow: none !important;
}
body.cart-mode-under .cart-side-panel #idcartpopup > .cart-section:not(:last-of-type) {
    border-bottom: 1px solid var(--cart-divider) !important;
}
body.cart-mode-under .cart-side-panel #idcartpopup .cart-payment-bar {
    position: sticky !important;
    bottom: 0 !important;
    margin: auto 0 0 !important; /* push to bottom when content is short */
    flex: 0 0 auto !important;
    z-index: 5;
    border-radius: 0 0 14px 14px !important;
    border-top: 1px solid var(--cart-divider);
    background: var(--cart-bg) !important;
    padding: 10px 12px 12px !important;
}
/* Under mode is narrow (320px) — switch payment buttons to 1-per-
   row so the labels don't get truncated mid-word. */
body.cart-mode-under .cart-payment-bar .checkoutButtons > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Inline-side mode — cart lives as a sticky column in the page
   layout. Force full viewport height + flex-column so the payment
   bar pins to the viewport bottom regardless of cart length, just
   like the drawer mode. The accordion handles its own internal
   scroll when content overflows. */
.cart-side-inline #idcartpopup {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
    gap: 0 !important;
}
.cart-side-inline #idcartpopup .cart-acc {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}
.cart-side-inline #idcartpopup .cart-payment-bar {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    margin-inline: 0 !important;
    position: static !important;
    border-radius: 0 !important;
}

/* Popup mode — the centered modal version. Apply the same flex
   column treatment so the payment bar pins to the modal bottom
   instead of getting eaten by the modal's bottom padding. */
body.cart-mode-popup .cart-side-panel {
    padding-top: 36px !important;
    padding-bottom: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
body.cart-mode-popup .cart-side-panel #idcartpopup {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
body.cart-mode-popup .cart-side-panel #idcartpopup .cart-acc {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}
body.cart-mode-popup .cart-side-panel #idcartpopup .cart-payment-bar {
    position: static !important;
    flex: 0 0 auto;
    border-radius: 0 0 20px 20px;
}

/* ── 15. Inline icons on payment buttons ─────────────────────────
   Phone-Order and Cash-on-Delivery used to share whatsapp.svg —
   wrong icon for both actions. Inline SVGs now; this base rule
   sets the icon's colour treatment. Strokes inherit currentColor
   so the icon flips automatically with the button's text colour
   (was hardcoded #ffffff which made the strokes invisible on the
   secondary white-background payment buttons). Actual size is
   controlled by the cart-payment-bar icon-normalising rule below. */
.pay-phone-icon,
.pay-cash-icon {
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

/* ── 16. Delivery Details form — clean stacked column layout ──────
   The legacy rule in custom.css set every .detail-form .form-group
   to width:48% with float:right, producing a messy 2-up grid where
   sibling rows didn't line up and the notes textarea ended up
   half-width too. Reset to a vertical stack with consistent gaps,
   then style the labels + inputs with the modern card aesthetic.
   ────────────────────────────────────────────────────────────── */
/* 2-column grid: contact / address fields share rows pairwise.
   Shipping zone + notes span the full row (set further down with
   grid-column: 1 / -1) since they're sectioned sub-blocks rather
   than peer fields. */
#idcartpopup .delivery-card .card-body,
#idcartpopup .delivery-card .card-body.detail-form,
#idcartpopup .delivery-card .detail-form {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 14px 12px !important;
    padding: 18px 20px 22px !important;
}
#idcartpopup .delivery-card .form-group,
#idcartpopup .delivery-card .card-body .form-group,
#idcartpopup .delivery-card .card-body.detail-form .form-group {
    width: auto !important;
    min-width: 0;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block;
}
#idcartpopup .delivery-card .form-control-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cart-text-2);
    letter-spacing: 0.01em;
    text-transform: none;
}
#idcartpopup .delivery-card .form-group input[type="text"],
#idcartpopup .delivery-card .form-group input[type="email"],
#idcartpopup .delivery-card .form-group input[type="tel"],
#idcartpopup .delivery-card .form-group input[type="number"],
#idcartpopup .delivery-card .form-group textarea,
#idcartpopup .delivery-card .form-group select,
#idcartpopup .delivery-card .form-group .form-control {
    width: 100% !important;
    height: auto !important;
    min-height: 46px;
    padding: 11px 14px !important;
    background: var(--cart-soft) !important;
    border: 1px solid var(--cart-border) !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: var(--cart-text-1) !important;
    line-height: 1.4 !important;
    font-family: inherit;
    transition: border-color .15s, background .15s, box-shadow .15s;
    box-shadow: none !important;
    margin: 0 !important;
}
#idcartpopup .delivery-card .form-group input::placeholder,
#idcartpopup .delivery-card .form-group textarea::placeholder {
    color: var(--cart-text-3);
}
#idcartpopup .delivery-card .form-group input:focus,
#idcartpopup .delivery-card .form-group textarea:focus,
#idcartpopup .delivery-card .form-group select:focus,
#idcartpopup .delivery-card .form-group .form-control:focus {
    outline: none;
    background: #ffffff !important;
    border-color: var(--cart-accent) !important;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04) !important;
}
#idcartpopup .delivery-card .form-group textarea {
    min-height: 72px !important;
    resize: vertical;
}
/* Order Notes + Shipping zone — span both columns of the 2-up grid
   so they break out of the half-width layout (they're sub-sections
   not peer fields). Dashed top-border separates each sub-block. */
#idcartpopup .cart-acc__notes,
#idcartpopup .cart-section__shipping {
    grid-column: 1 / -1 !important;
    margin-top: 8px !important;
    padding-top: 12px !important;
    border-top: 1px dashed var(--cart-divider);
    width: 100% !important;
    float: none !important;
}
html[data-scheme="dark"] #idcartpopup .delivery-card .form-control-label {
    color: #94a3b8;
}
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group input,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group textarea,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group select,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group .form-control {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.10) !important;
    color: #e8ecf4 !important;
}
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group input:focus,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group textarea:focus,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group select:focus {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.30) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.05) !important;
}
html[data-scheme="dark"] #idcartpopup .cart-acc__notes {
    border-top-color: rgba(255,255,255,0.10);
}

/* ── 17. Compact payment buttons — 2-per-row, every viewport ─────
   The legacy markup uses col-lg-6 col-md-6 col-sm-12, which makes
   each button take a full row on a 340px cart drawer (sm width).
   Force 2-per-row regardless of breakpoint + tighten the per-card
   spacing so 4-6 payment methods all stay visible at the pinned
   bottom without scroll. The per-button height shrinks from ~52px
   to ~40px which is plenty for icon + label.
   ────────────────────────────────────────────────────────────── */
#idcartpopup .cart-payment-bar .checkoutButtons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 !important;
    padding: 0 !important;
}
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"] {
    /* Grid lets each item take its column naturally — no need to
       compute calc(50% - gap). Half-half on every row, no
       Bootstrap col-lg-6 width competing with the grid. */
    flex: initial !important;
    width: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* When there's only a single payment method enabled, span the
   full row so it doesn't look orphaned at half-width. */
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:only-child {
    grid-column: 1 / -1;
}
/* Odd count — last button (3rd of 3, 5th of 5, etc.) spans the
   full row instead of leaving a half-empty slot. */
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}
#idcartpopup .cart-payment-bar .checkoutButtons .card {
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
/* Per merchant — payment buttons redesigned to read as proper
   tap targets (52px tall, comfortable padding, real type
   size). Layout uses a 3-cell grid (icon | label | phantom)
   so the label stays visually centred regardless of icon
   width. Background is the soft-surface card style with a
   subtle border + lift shadow on hover. */
#idcartpopup .cart-payment-bar .checkoutButtons .btn {
    width: 100% !important;
    min-height: 52px !important;
    padding: 10px 14px !important;
    background: var(--cart-surface, #fff) !important;
    color: var(--cart-text-1) !important;
    border: 1px solid var(--cart-border, #e6e7ea) !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.005em !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
    display: grid !important;
    grid-template-columns: 24px 1fr 24px;
    align-items: center !important;
    justify-content: stretch !important;
    column-gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-align: center;
    transition: background .15s ease, border-color .15s ease, transform .12s ease, box-shadow .15s ease;
}
#idcartpopup .cart-payment-bar .checkoutButtons .btn:hover {
    background: var(--cart-soft, #f7f7f8) !important;
    border-color: var(--cart-text-3, #9aa0a8) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08) !important;
}
#idcartpopup .cart-payment-bar .checkoutButtons .btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
}
/* The icon — always the first child element of the button — anchors
   to the start column. Span text in the label cell (auto-flow) or
   wrap the label in a <span> for explicit placement. */
#idcartpopup .cart-payment-bar .checkoutButtons .btn > img,
#idcartpopup .cart-payment-bar .checkoutButtons .btn > svg,
#idcartpopup .cart-payment-bar .checkoutButtons .btn > i,
#idcartpopup .cart-payment-bar .checkoutButtons .btn > .pay-phone-icon,
#idcartpopup .cart-payment-bar .checkoutButtons .btn > .pay-cash-icon {
    grid-column: 1;
    justify-self: center;
    align-self: center;
}
/* Buttons with no icon (rare — keeps the column structure stable). */
#idcartpopup .cart-payment-bar .checkoutButtons .btn::after {
    content: '';
    grid-column: 3;
    pointer-events: none;
}
/* Normalise every payment-button icon — img / svg / FontAwesome —
   to the same 20×20 visual footprint so the button row reads as
   one consistent shape regardless of which icon a particular
   payment method ships with. */
#idcartpopup .cart-payment-bar .checkoutButtons .btn img,
#idcartpopup .cart-payment-bar .checkoutButtons .btn svg,
#idcartpopup .cart-payment-bar .checkoutButtons .btn .pay-phone-icon,
#idcartpopup .cart-payment-bar .checkoutButtons .btn .pay-cash-icon {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    margin: 0 !important;
    flex-shrink: 0;
    object-fit: contain;
}
#idcartpopup .cart-payment-bar .checkoutButtons .btn i.fa,
#idcartpopup .cart-payment-bar .checkoutButtons .btn i.fas,
#idcartpopup .cart-payment-bar .checkoutButtons .btn i.fab,
#idcartpopup .cart-payment-bar .checkoutButtons .btn i.far {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 16px !important;
    line-height: 1 !important;
    width: 22px !important;
    height: 22px !important;
    text-align: center;
    margin: 0 !important;
    flex-shrink: 0;
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
}
/* The PayPal + similar buttons wrap their <button> in a <form> — make
   sure that form fills its column so the button doesn't shrink. */
#idcartpopup .cart-payment-bar .checkoutButtons form {
    margin: 0 !important;
    width: 100%;
}
/* Trim the payment bar's own padding so the buttons reach closer to
   the cart edges and we recover vertical space. */
#idcartpopup .cart-payment-bar {
    padding: 10px 12px 12px !important;
}

/* Every payment button gets the same height + type weight per
   merchant — WhatsApp (first) shouldn't visually outweigh the
   other methods. Clamp the first-child to the same dimensions
   the grid layout uses for the rest. */
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .whatsap-btn,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .telegram-btn {
    height: auto !important;
    min-height: 52px !important;
    font-size: 13px !important;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04) !important;
}
/* Drop the first-button colour inversion + icon filter — the
   merchant wants a clean uniform palette across every payment
   method, so the dark-bg first child is no longer special. */
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn img,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn svg,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn i,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn .pay-phone-icon,
#idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"]:first-child .btn .pay-cash-icon {
    width: 20px !important;
    height: 20px !important;
    filter: none !important;
}

/* ── 18. Order summary block — modern checkout aesthetic ─────────
   The subtotal / coupon / shipping / VAT / total rows used to read
   as a plain bullet list inside the cart card's footer. Restyled
   to match international checkouts (Shopify, ASOS, Allbirds): a
   distinct soft-surface block that breaks out of the card padding,
   monospaced numerics, savings shown in green, total emphasized
   in the brand colour with a 2x type-scale jump.
   ────────────────────────────────────────────────────────────── */
#idcartpopup .cart-card .card-footer,
#idcartpopup .cart-section__body > .card.cart-card .card-footer {
    /* White background per merchant brief — the totals block sits on
       the same surface as the items above, distinguished only by a
       top border. Margin-top trimmed from 16px to 4px so the totals
       sit tighter to the items list above; the top-border + 20px
       inner padding are enough visual separation. */
    background: var(--cart-bg) !important;
    border-top: 1px solid var(--cart-divider) !important;
    margin: 4px -5px 0 !important;
    padding: 18px 26px 20px !important;
}
/* Trim the card-body's bottom padding too so the items list ends
   close to the totals top-border — was 12px, now 0 since the
   border-top + the totals padding handle the visual separation. */
#idcartpopup .cart-card .card-body {
    padding-bottom: 0 !important;
}
#idcartpopup .invoice-details .invoice-list {
    gap: 9px;
}
#idcartpopup .invoice-details .invoice-detail {
    font-size: 12.5px !important;
    line-height: 1.4;
    color: var(--cart-text-2) !important;
}
#idcartpopup .invoice-details .invoice-title {
    color: var(--cart-text-2) !important;
    font-weight: 500;
    letter-spacing: 0.005em;
}
#idcartpopup .invoice-details .invoice-amt {
    color: var(--cart-text-1) !important;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}
/* Coupon-applied row reads as savings — render in green when a
   discount has actually been applied. Idle ($0.00) stays neutral. */
#idcartpopup .invoice-details .dicount_price {
    color: #16a34a !important;
    font-weight: 700;
}
#idcartpopup .invoice-details .dicount_price:empty,
#idcartpopup .invoice-details .invoice-detail:has(.dicount_price[data-zero]) .dicount_price {
    color: var(--cart-text-3) !important;
    font-weight: 600;
}
/* Total row — flush against the row above per merchant. No
   border, no top margin / padding so the Total reads as part
   of the same list block. The type weight + brand colour still
   give it visual emphasis. */
#idcartpopup .invoice-details .invoice-detail#Subtotal,
#idcartpopup .invoice-details .invoice-detail:last-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
#idcartpopup .invoice-details .total-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: var(--cart-text-1) !important;
    text-transform: none !important;
    letter-spacing: -0.005em;
}
#idcartpopup .invoice-details .total-amount,
#idcartpopup .invoice-details .final_total_price {
    font-size: 22px !important;
    font-weight: 800 !important;
    /* Use the neutral text token so the total stays black in light
       mode and white in dark mode regardless of the store's primary-
       color setting. Previously this read var(--cart-accent) (=
       --primary-color) and inherited the merchant's brand accent,
       which made the total render in orange / blue / whatever she
       picked in the builder instead of a readable near-black. */
    color: var(--cart-text-1) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
}

/* Coupon input row — input + button laid out as two separate
   pill controls with a small gap, both 44px tall for a comfy
   tap target. The unified-pill design (shared rounded outline)
   was reading as broken on prod, so we split them. The dashed
   separator above stays so the row reads as its own block
   inside the totals dock. */
#idcartpopup .cart-coupon-row {
    margin-top: 14px !important;
    padding-top: 14px !important;
    padding-bottom: 0 !important;
    border-top: 1px dashed var(--cart-divider) !important;
    display: flex !important;
    align-items: stretch;
    gap: 8px;
}
#idcartpopup .cart-coupon-row::before { display: none; }
#idcartpopup .cart-coupon-row input.coupon {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px !important;
    padding: 0 16px !important;
    background: var(--cart-soft, #f7f7f8) !important;
    border: 1px solid var(--cart-border, #e6e7ea) !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    color: var(--cart-text-1) !important;
    box-shadow: none !important;
    margin: 0 !important;
    transition: border-color .12s, background .12s, box-shadow .12s;
}
#idcartpopup .cart-coupon-row input.coupon::placeholder {
    color: var(--cart-text-3, #9aa0a8);
    font-weight: 500;
}
#idcartpopup .cart-coupon-row input.coupon:focus {
    background: #ffffff !important;
    border-color: var(--cart-text-1) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cart-text-1) 8%, transparent) !important;
}
#idcartpopup .cart-coupon-row .apply-coupon {
    flex: 0 0 auto;
    height: 44px !important;
    padding: 0 22px !important;
    margin: 0 !important;
    background: var(--cart-text-1) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(15,23,42,.10) !important;
    transition: filter .15s, transform .12s, box-shadow .15s;
    text-decoration: none !important;
}
#idcartpopup .cart-coupon-row .apply-coupon:hover {
    filter: brightness(1.10);
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(15,23,42,.16) !important;
    transform: translateY(-1px);
}
#idcartpopup .cart-coupon-row .apply-coupon:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(15,23,42,.10) !important;
}

/* Dark-scheme parity for the totals block + coupon row. */
html[data-scheme="dark"] #idcartpopup .cart-card .card-footer {
    background: rgba(255, 255, 255, 0.03) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}
html[data-scheme="dark"] #idcartpopup .invoice-details .invoice-title,
html[data-scheme="dark"] #idcartpopup .invoice-details .invoice-detail {
    color: #94a3b8 !important;
}
html[data-scheme="dark"] #idcartpopup .invoice-details .invoice-amt,
html[data-scheme="dark"] #idcartpopup .invoice-details .total-title {
    color: #e8ecf4 !important;
}
html[data-scheme="dark"] #idcartpopup .invoice-details .invoice-detail#Subtotal,
html[data-scheme="dark"] #idcartpopup .invoice-details .invoice-detail:last-child {
    border-top-color: rgba(255, 255, 255, 0.10) !important;
}
html[data-scheme="dark"] #idcartpopup .cart-coupon-row {
    border-top-color: rgba(255, 255, 255, 0.10) !important;
}
html[data-scheme="dark"] #idcartpopup .cart-coupon-row input.coupon {
    background: #15151b !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #e8ecf4 !important;
}
html[data-scheme="dark"] #idcartpopup .cart-coupon-row .apply-coupon {
    background: #ffffff !important;
    color: #0e1015 !important;
    border-color: #ffffff !important;
}

/* ── 19. Delivery section — full soft-surface fill ───────────────
   Per merchant brief: the entire פרטי משלוח block should share the
   same soft-grey background as its head bar, not just the head.
   The form fields stay readable on grey by switching their inputs
   to a white surface (was the same soft grey, which now blends with
   the section body and lost contrast). */
#idcartpopup .cart-section--delivery,
#idcartpopup .cart-section--delivery .cart-section__body {
    background: var(--cart-soft) !important;
}
/* Inputs need white surface against the now-grey body so they
   stand out as interactive fields. Border stays the same so the
   field shape is still recognisable. */
#idcartpopup .cart-section--delivery .delivery-card .form-group input[type="text"],
#idcartpopup .cart-section--delivery .delivery-card .form-group input[type="email"],
#idcartpopup .cart-section--delivery .delivery-card .form-group input[type="tel"],
#idcartpopup .cart-section--delivery .delivery-card .form-group input[type="number"],
#idcartpopup .cart-section--delivery .delivery-card .form-group textarea,
#idcartpopup .cart-section--delivery .delivery-card .form-group select,
#idcartpopup .cart-section--delivery .delivery-card .form-group .form-control {
    background: #ffffff !important;
}
html[data-scheme="dark"] #idcartpopup .cart-section--delivery,
html[data-scheme="dark"] #idcartpopup .cart-section--delivery .cart-section__body {
    background: rgba(255, 255, 255, 0.03) !important;
}

/* ── 20. Cart items — refined product-row aesthetic ──────────────
   The default checkout-items grid (image / name+price / qty)
   already had the right structure. This block tightens spacing,
   adds a subtle hover surface so the row feels interactive, and
   gives the product image a soft border that hints at a card. */
#idcartpopup .cart-card .card-body {
    padding: 4px 18px 12px !important;
}
#idcartpopup .checkout-items {
    grid-template-columns: 60px 1fr auto !important;
    align-items: flex-start !important;
    gap: 14px !important;
    padding: 14px 0 !important;
    transition: background .12s;
}
#idcartpopup .checkout-items .customer-images {
    width: 60px !important;
    height: 60px !important;
    border-radius: var(--cart-radius-md);
    border: 1px solid var(--cart-border);
    background: var(--cart-soft);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
#idcartpopup .checkout-items .customer-name {
    padding-top: 2px !important;
}
#idcartpopup .checkout-items .customer-name .title {
    font-size: 13px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2 !important;
}
#idcartpopup .checkout-items .price-spin,
#idcartpopup .customer-name > p,
#idcartpopup .customer-name > .price-spin,
#card-summary .customer-name > p,
#card-summary .customer-name > .price-spin {
    /* Per merchant — emphasised over the title: larger,
       heavier weight, no extra top margin so it sits
       flush right under the title (which sits flush
       against the image's top edge). */
    color: var(--cart-text-1) !important;
    font-size: 15.5px !important;
    font-weight: 800 !important;
    letter-spacing: -0.01em;
    margin: 0 !important;
}
#idcartpopup .checkout-items .item-spin {
    align-self: start !important;
}
/* Title + price hug the top of the row (flush with the
   thumbnail's top edge) and stack tightly together. */
#idcartpopup .checkout-items .customer-name {
    gap: 2px !important;
    padding-top: 0 !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
}
#idcartpopup .checkout-items .customer-name .product-tax-name {
    margin: 0 !important;
    padding: 0 !important;
}

/* ── 21. Hide VAT / Subtotal lines per merchant brief ────────────
   - Per-item tax line (.title_tax under the product name): hidden,
     since the cart-item price now includes tax inline.
   - Totals block: Subtotal row hidden (the visible Total at the
     bottom already includes everything). VAT rows hidden (they're
     redundant with the tax-inclusive Total).
   The PHP calculations still run — only the display lines are
   suppressed so the final Total stays correct. */
#idcartpopup .checkout-items .title_tax {
    display: none !important;
}
#idcartpopup .invoice-details .invoice-list > li.invoice-detail:has(.sub_total_price),
#idcartpopup .invoice-details .invoice-list > li.invoice-detail--tax {
    display: none !important;
}

/* ── 22. Required-field validation styling ───────────────────────
   The capture-phase JS validator in cart_sidebar.blade.php adds
   .is-invalid to any blank required field when the merchant
   clicks a payment button without filling them out. Red border +
   soft red wash so the empty fields jump out; the class clears
   automatically as soon as the merchant types into the field. */
#idcartpopup .delivery-card .form-group input.is-invalid,
#idcartpopup .delivery-card .form-group textarea.is-invalid,
#idcartpopup .delivery-card .form-group select.is-invalid,
#idcartpopup .delivery-card .form-group .form-control.is-invalid {
    border-color: #dc3545 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.12) !important;
}
#idcartpopup .delivery-card .form-group input.is-invalid:focus,
#idcartpopup .delivery-card .form-group textarea.is-invalid:focus,
#idcartpopup .delivery-card .form-group select.is-invalid:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.20) !important;
}
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group input.is-invalid,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group textarea.is-invalid,
html[data-scheme="dark"] #idcartpopup .delivery-card .form-group select.is-invalid {
    border-color: #ff6b6b !important;
    background: rgba(220, 53, 69, 0.10) !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.18) !important;
}

/* ════════════════════════════════════════════════════════════════════
   FIXED SIDE-PANEL CART (xl+, builder "בעמוד" mode)
   ════════════════════════════════════════════════════════════════════
   The cart is no longer a column inside a Bootstrap row — it's a
   sibling of .content-body and on desktop it gets pinned to the
   trailing edge of the viewport. .content-body picks up matching
   padding-inline-end so the storefront sections don't slide under
   it. Below xl the cart falls back to normal flow at the bottom of
   the content-wrapper, stacking after the last section. */
@media (min-width: 1200px) {
    body.cart-inline-on .cart-side-inline {
        position: fixed;
        top: var(--top-offset, var(--header-h, 60px));
        inset-inline-end: 0;
        width: 360px;
        height: calc(100vh - var(--top-offset, var(--header-h, 60px)));
        overflow-y: auto;
        z-index: 100;
        padding: 14px;
        background: var(--cart-bg, #fff);
        border-inline-start: 1px solid var(--cart-border, #ececef);
    }
    body.cart-inline-on .content-body {
        padding-inline-end: 360px;
    }
    /* Flush hero (rendered above .content-wrapper) shrinks to the
       same usable width so it doesn't visually extend under the
       fixed cart panel. */
    body.cart-inline-on .hero-flush-wrap {
        width: calc(100% - 360px);
        margin-inline-end: auto;
        margin-inline-start: 0;
    }
}


/* ============================================================
   "מוצרים בסל" recommend strip — sits between Delivery Details and
   the sticky payment bar. Compact horizontal scroller so it adds
   little vertical real estate; each card is 80px tall.
   ============================================================ */
.cart-recommends-strip {
    margin: 0 0 10px;
    padding: 8px 12px 10px;
    background: linear-gradient(to bottom, #f8fafc, #fff);
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.cart-recommends-strip__head {
    display: flex; align-items: center;
    margin-bottom: 6px;
}
.cart-recommends-strip__title {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
}
.cart-recommends-strip__title i { color: #f59e0b; font-size: 14px; }

.cart-recommends-strip__scroller {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.cart-recommends-strip__scroller::-webkit-scrollbar { height: 6px; }
.cart-recommends-strip__scroller::-webkit-scrollbar-track { background: transparent; }
.cart-recommends-strip__scroller::-webkit-scrollbar-thumb {
    background: #cbd5e1; border-radius: 999px;
}
.cart-recommends-strip__scroller::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.cart-recommend-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 200px;
    height: 64px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}
.cart-recommend-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(15,23,42,.06);
}
.cart-recommend-card__img {
    flex: 0 0 auto;
    width: 50px; height: 50px;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
}
.cart-recommend-card__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cart-recommend-card__name {
    font-size: .78rem; font-weight: 600;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-recommend-card__price {
    font-size: .78rem; font-weight: 700;
    color: #15803d;
    line-height: 1.2;
    margin-top: 1px;
}
.cart-recommend-card__price small {
    font-size: .65rem;
    font-weight: 500;
    color: #94a3b8;
    margin-inline-end: 2px;
}
/* The "+" chip on each recommend card. Sized as a 34px circle with
   a WHITE fill + a brand-coloured icon so the "+" reads clearly
   against the background — the previous brand-on-brand fill made
   the glyph invisible per merchant.

   The selector doubles up the chip class with the .btn-addcart /
   .add_to_cart that the markup also carries so this rule's
   specificity (0,2,0) wins over the generic .btn-addcart pill in
   custom.css that loads AFTER this stylesheet — without that, every
   property we set here was being silently rewritten by the storefront's
   global add-to-cart styling (pill shape, padding, brand background,
   no border) leaving the chip unreadable. */
.cart-recommend-card__add,
.cart-recommend-card__add.btn-addcart,
.cart-recommend-card__add.add_to_cart {
    flex: 0 0 auto;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--primary-color, #111315) !important;
    border: 1.5px solid var(--primary-color, #111315) !important;
    cursor: pointer;
    transition: background .15s, color .15s, transform .12s, box-shadow .15s;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.06);
    text-transform: none !important;
    font-size: inherit !important;
    letter-spacing: normal !important;
}
.cart-recommend-card__add:hover,
.cart-recommend-card__add.btn-addcart:hover,
.cart-recommend-card__add.add_to_cart:hover {
    background: var(--primary-color, #111315) !important;
    color: #fff !important;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.08);
    filter: none;
}
.cart-recommend-card__add:active { transform: scale(.94); }
.cart-recommend-card__add i,
.cart-recommend-card__add span { font-size: 20px; line-height: 1; font-weight: 700; }
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__add,
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__add.btn-addcart,
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__add.add_to_cart {
    background: var(--cart-surface, #15171b) !important;
    color: var(--primary-color, #fff) !important;
    border-color: var(--primary-color, #fff) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.35);
}
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__add:hover {
    background: var(--primary-color, #fff) !important;
    color: #15171b !important;
}

/* ============================================================
   Top suggest list — products the merchant marked with
   cart_recommends_position='top_list'. Renders ABOVE the actual
   cart items with a soft grey background so the shopper sees them
   as part of the cart but understands they aren't IN it.
   ============================================================ */
.cart-top-suggest {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    margin-bottom: 0;
}
.cart-top-suggest__head {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #475569;
    margin-bottom: 8px;
}
.cart-top-suggest__head i { color: #f59e0b; font-size: 14px; }
.cart-top-suggest__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fffae7;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: border-color .15s, box-shadow .15s;
}
.cart-top-suggest__row:last-child { margin-bottom: 0; }
.cart-top-suggest__row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(15,23,42,.05);
}
.cart-top-suggest__img {
    flex: 0 0 auto;
    width: 48px; height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
}
.cart-top-suggest__body {
    flex: 1 1 auto;
    min-width: 0;
}
.cart-top-suggest__name {
    font-size: .82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-top-suggest__price {
    font-size: .78rem;
    font-weight: 700;
    color: #15803d;
    margin-top: 2px;
}
.cart-top-suggest__price small {
    font-size: .65rem;
    color: #94a3b8;
    font-weight: 500;
    margin-inline-end: 2px;
}
/* Same chip as the bottom strip — white fill with a brand-coloured
   ring + glyph. Doubles up with .btn-addcart / .add_to_cart so the
   generic add-to-cart pill rule in custom.css (loads AFTER this
   stylesheet) can't repaint the chip. */
.cart-top-suggest__add,
.cart-top-suggest__add.btn-addcart,
.cart-top-suggest__add.add_to_cart {
    flex: 0 0 auto;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--primary-color, #111315) !important;
    border: 1.5px solid var(--primary-color, #111315) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    transition: background .15s, color .15s, transform .12s, box-shadow .15s;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.06);
    text-transform: none !important;
    font-size: inherit !important;
    letter-spacing: normal !important;
}
.cart-top-suggest__add:hover,
.cart-top-suggest__add.btn-addcart:hover,
.cart-top-suggest__add.add_to_cart:hover {
    background: var(--primary-color, #111315) !important;
    color: #fff !important;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.08);
    filter: none;
}
.cart-top-suggest__add:active { transform: scale(.94); }
.cart-top-suggest__add i,
.cart-top-suggest__add span { font-size: 20px; font-weight: 700; line-height: 1; }
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__add,
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__add.btn-addcart,
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__add.add_to_cart {
    background: var(--cart-surface, #15171b) !important;
    color: var(--primary-color, #fff) !important;
    border-color: var(--primary-color, #fff) !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.35);
}
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__add:hover {
    background: var(--primary-color, #fff) !important;
    color: #15171b !important;
}

/* ── Dark-mode containers for the two recommend strips ──
   Without these the soft-grey light backgrounds + white inner
   cards stay light even when the rest of the cart flips to dark,
   which made the merchant flag the + chip as out-of-place. The
   containers and cards now follow the cart's own dark palette,
   and the brand-color + chip reads cleanly against them. */
html[data-scheme="dark"] #idcartpopup .cart-top-suggest {
    background: var(--cart-soft, #1c1f24);
    border-color: var(--cart-border, #2a2e35);
}
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__head { color: #9aa0a8; }
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__row {
    background: var(--cart-surface, #15171b);
    border-color: var(--cart-border, #2a2e35);
}
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__row:hover {
    border-color: var(--cart-divider, #3a3f47);
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__name { color: var(--cart-text-1, #e6e8eb); }
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__price { color: #34d399; }
html[data-scheme="dark"] #idcartpopup .cart-top-suggest__img { background: var(--cart-soft, #1c1f24); }

html[data-scheme="dark"] #idcartpopup .cart-recommends-strip {
    background: var(--cart-soft, #1c1f24);
    border-color: var(--cart-border, #2a2e35);
}
html[data-scheme="dark"] #idcartpopup .cart-recommends-strip__title { color: #9aa0a8; }
html[data-scheme="dark"] #idcartpopup .cart-recommend-card {
    background: var(--cart-surface, #15171b);
    border-color: var(--cart-border, #2a2e35);
}
html[data-scheme="dark"] #idcartpopup .cart-recommend-card:hover {
    border-color: var(--cart-divider, #3a3f47);
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__name { color: var(--cart-text-1, #e6e8eb); }
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__price { color: #34d399; }
html[data-scheme="dark"] #idcartpopup .cart-recommend-card__img { background: var(--cart-soft, #1c1f24); }

/* ============================================================
   Sticky bottom stack — Delivery / Recommend strip / Payment bar
   all hug the cart's bottom edge as one block. Each child sits in
   document flow inside the stack; the stack itself uses sticky
   bottom 0 so it stays glued to the cart viewport edge.
   ============================================================ */
.cart-bottom-stack {
    position: sticky;
    bottom: 0;
    z-index: 5;
    background: var(--cart-bg, #fff);
    margin-top: auto;
    display: flex;
    flex-direction: column;
}
/* Reset sticky on direct children — they no longer need their own
   sticky bottom now that the wrapper holds the layout. */
.cart-bottom-stack #idcartpopup .cart-payment-bar,
.cart-bottom-stack .cart-payment-bar,
.cart-bottom-stack .cart-section--delivery,
.cart-bottom-stack .cart-recommends-strip {
    position: static;
    box-shadow: none;
    border-radius: 0;
}
/* The lift shadow lives on the stack wrapper instead. */
.cart-bottom-stack {
    box-shadow: 0 -4px 16px rgba(0,0,0,0.06);
    border-radius: var(--cart-radius-lg, 12px) var(--cart-radius-lg, 12px) 0 0;
    overflow: hidden;
}

/* ============================================================
   Collapsible Delivery Details — click header to expand. Default
   closed. Smooth max-height transition; chevron flips on open.
   ============================================================ */
.cart-section--collapsible .cart-section__head--toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    background: var(--cart-surface, #f8fafc);
    border: 0;
    border-top: 1px solid var(--cart-divider, #e5e7eb);
    border-bottom: 1px solid var(--cart-divider, #e5e7eb);
    cursor: pointer;
    text-align: start;
    font: inherit;
    color: var(--cart-text, #0f172a);
}
.cart-section--collapsible .cart-section__head--toggle:hover {
    background: #f1f5f9;
}
.cart-section--collapsible .cart-section__title {
    font-size: .92rem;
    font-weight: 700;
}
.cart-section--collapsible .cart-section__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease;
    color: #64748b;
}
.cart-section--collapsible.is-open .cart-section__chevron {
    transform: rotate(180deg);
}
.cart-section--collapsible .cart-section__body--collapsible {
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
}
.cart-section--collapsible.is-open .cart-section__body--collapsible {
    /* Large enough for the longest delivery form. The actual content
       height is auto via the inner padding/cards, so this cap is just
       a transition target. */
    max-height: 1200px;
}

/* When the bottom strip OR delivery is empty, the stack still works:
   children just collapse out of flow. */
.cart-bottom-stack:empty { display: none; }

/* ─────────────────────────────────────────────────────────────
   Two-step checkout (cart-side-inline + drawer + popup)

   The merchant brief: header should split in half between a Cart
   tab and a Delivery Details tab; clicking Delivery hides the
   cart items and shows the delivery form + the payment buttons,
   with the price summary docked to the bottom of whichever pane
   is active. Applied to every cart mode EXCEPT under-cart (the
   full-width layout under the products grid stays single-pane).
   The :not(.cart-mode-under) gate is the body-level switch.
   ───────────────────────────────────────────────────────────── */

/* Tab strip — hidden by default; shown in every non-under mode. */
.checkout-steps { display: none; }
body:not(.cart-mode-under) #idcartpopup > .checkout-steps {
    display: flex !important;
    gap: 0;
    margin: 0;
    border: 1px solid var(--cart-border, #ececef);
    border-radius: 0;
    background: var(--cart-surface, #fff);
    overflow: hidden;
    box-shadow: var(--cart-shadow);
    flex: 0 0 auto;
    /* Pin to the top of the cart panel so the shopper can ALWAYS
       switch between cart / delivery — even after scrolling the
       items list or the delivery form. Per merchant — losing the
       tabs mid-checkout was disorienting on mobile. z-index keeps
       the strip above the items/form scrollers. */
    position: sticky;
    top: 0;
    z-index: 11;
}
/* Popup mode wraps every direct child of #idcartpopup in
   horizontal margin (28px each side) so it doesn't sit edge-to-
   edge with the modal frame. The tab strip + continue bar are
   ALSO direct children, so apply the same margin or the chrome
   reads as a misaligned bar against the popup edge. Drawer mode
   also pads via its own rules; checked via the body.cart-mode-*
   scopes so we don't blanket-margin in side-inline (which uses
   its own container). */
body.cart-mode-popup .cart-side-panel #idcartpopup > .checkout-steps,
body.cart-mode-drawer .cart-side-panel #idcartpopup > .checkout-steps {
    margin: 0 !important;
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab {
    flex: 1 1 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 0;
    color: var(--cart-text-3, #9aa0a8);
    padding: 14px 16px;
    font: inherit;
    font-weight: 700;
    font-size: .94rem;
    cursor: pointer;
    position: relative;
    transition: color .15s, background .15s;
    text-align: center;
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab:not(.is-active):hover {
    color: var(--cart-text-2, #5b6068);
    background: var(--cart-soft, #f7f7f8);
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab.is-active {
    color: var(--cart-text-1, #0e1015);
    background: var(--cart-soft, #f7f7f8);
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab.is-active::after {
    content: "";
    position: absolute;
    inset-inline: 14px;
    bottom: 0;
    height: 3px;
    background: var(--primary-color, #111315);
    border-radius: 3px 3px 0 0;
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__num {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--cart-soft, #f7f7f8);
    color: var(--cart-text-3, #9aa0a8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .76rem;
    font-weight: 800;
    transition: background .15s, color .15s;
}
body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab.is-active .checkout-steps__num {
    background: var(--primary-color, #111315);
    color: #fff;
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup > .checkout-steps {
    background: var(--cart-surface, #15171b);
    border-color: var(--cart-border, #2a2e35);
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .checkout-steps__tab.is-active {
    background: var(--cart-soft, #1c1f24);
}

/* ── Pane visibility per step ──
   data-checkout-step="cart"  → show .cart-section--cart + the
                                 continue bar; hide delivery +
                                 payment.
   data-checkout-step="delivery" → hide cart + continue; show
                                    delivery + payment.
   Recommend strips render only on the cart step (they're an
   add-on prompt, not part of the delivery flow). */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-section--delivery,
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-payment-bar {
    display: none !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--cart,
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .checkout-continue-bar,
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-recommends-strip,
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-top-suggest {
    display: none !important;
}

/* On the delivery step the legacy "collapsible" chrome is dropped —
   the section IS the whole pane, so no chevron, no toggle, body
   always open. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery.cart-section--collapsible {
    border: 0;
    background: transparent;
    /* Per merchant — the delivery form fills the available
       space at the TOP of the pane so the fields aren't stuck
       at the bottom with a big gap above. The payment bar
       still sits flush at the bottom via its own
       margin-top:auto rule. */
    flex: 1 1 auto !important;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-height: 0;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section__head--toggle {
    display: none !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section__body--collapsible {
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
    flex: 0 0 auto;
}
/* Drop the auto margin on the payment bar in delivery mode —
   the form now flexes to fill the pane, so the bar follows
   naturally beneath without needing margin:auto to push it. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar {
    margin-top: 0 !important;
}

/* ── Step-1 continue button bar ──
   The CTA is the very last bar of the cart pane on step 1 — after
   items, totals (sticky inside items area), and the bottom-stack
   that surfaces "הוסיפו גם". A normal flow child of #idcartpopup
   that lands at the bottom because the cart-section above it has
   flex:1 filling the column height. */
.checkout-continue-bar { display: none; }
body:not(.cart-mode-under) #idcartpopup > .checkout-continue-bar {
    display: block !important;
    flex: 0 0 auto;
    padding: 12px 0 4px;
    background: var(--cart-bg, #fff);
    z-index: 4;
}
/* Popup + drawer modes — tight 12px horizontal gutter per merchant
   (was 28px which looked too inset against the panel edge). */
body.cart-mode-popup .cart-side-panel #idcartpopup > .checkout-continue-bar,
body.cart-mode-drawer .cart-side-panel #idcartpopup > .checkout-continue-bar {
    margin: 0 12px !important;
    padding: 12px 0 16px !important;
}
.checkout-continue-btn {
    width: 100%;
    border: 0;
    background: var(--primary-color, #0e1015);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
    padding: 15px 20px;
    border-radius: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter .15s, transform .12s;
    box-shadow: 0 6px 14px rgba(15,23,42,.18);
}
.checkout-continue-btn:hover {
    filter: brightness(1.08);
    box-shadow: 0 8px 18px rgba(15,23,42,.22);
}
.checkout-continue-btn:active { transform: translateY(1px); }
.checkout-continue-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}
.checkout-continue-btn__arrow { font-size: 18px; }
[dir="rtl"] .checkout-continue-btn__arrow { transform: scaleX(-1); }
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup > .checkout-continue-bar {
    background: var(--cart-bg, #0e1015);
}

/* ── Sticky totals dock + sticky payment bar
   The cart pane scrolls items + totals; we let the existing
   card-footer (totals) ride along the bottom of the scroll. On the
   delivery pane, the payment-bar already sticks to the bottom of
   #idcartpopup via the existing .cart-bottom-stack rules, so no
   change is needed there beyond hiding the unrelated items. */
/* ── Totals dock ──
   Pulled OUT of .cart-section--cart per merchant — sits at the
   bottom of the cart pane, ABOVE הוסיפו גם, NOT glued to the last
   cart item. The cart items area absorbs all the slack height
   (flex:1) above, so the dock + הוסיפו גם + continue button stack
   naturally at the bottom of the column. Hidden on step 2. */
.cart-totals-dock { display: none; }
body:not(.cart-mode-under) #idcartpopup > .cart-totals-dock {
    display: block !important;
    flex: 0 0 auto;
    background: var(--cart-bg, #fff);
    border-top: 1px solid var(--cart-divider, #f1f1f3);
    margin: 0 !important;
}

/* ── Kill the inherited sticky-bottom rules on .cart-bottom-stack
   for step 1. The legacy rule (.cart-bottom-stack { position:
   sticky; bottom:0; margin-top:auto }) was designed for the
   pre-wizard layout where the stack was the sole bottom-pinned
   block. Now that cart-section--cart already absorbs the slack
   height (flex:1) and the totals-dock + bottom-stack +
   checkout-continue-bar all live in normal flow after it, the
   sticky + margin-top:auto leaves an empty gap between the totals
   dock and "הוסיפו גם". Reset them so the stack sits flush
   against the totals row above it. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] > .cart-bottom-stack {
    position: static !important;
    margin: 0 !important;
    bottom: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    flex: 0 0 auto !important;
}
/* Per merchant — totals dock chrome matches step 1 visually when
   it appears inside the payment bar on step 2. White background
   (not tinted), divider beneath, edge-to-edge horizontal spread
   so the row looks identical to its step-1 anchor. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar > .cart-totals-dock {
    display: block !important;
    margin: -12px -14px 12px !important;
    padding: 0 !important;
    background: var(--cart-bg, #fff) !important;
    border-top: 0 !important;
    border-bottom: 1px solid var(--cart-divider, #f1f1f3) !important;
}

/* Per merchant — hide the shipping line on step 1 (cart). The
   shopper picks their shipping zone on step 2 (סיום הזמנה), so
   showing "Shipping 0.00" on step 1 was misleading. The row
   remains visible on step 2 where it updates with the picked
   zone's price. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .invoice-detail--shipping {
    display: none !important;
}

/* Per merchant — hide the Coupon summary row + the coupon input
   form on step 1. The coupon is applied on step 2 (סיום הזמנה),
   where the row + input + Apply button live together. Keeping
   them on step 1 was duplicate noise. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .invoice-detail--coupon,
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-coupon-row {
    display: none !important;
}

/* Coupon row — restyled per merchant to match the dark filled
   chrome of the המשך לסיום הזמנה / continue button on step 1.
   Pill input + black "Apply" button so the application reads as
   a confident primary action.
   The selector targets the totals dock on step 2 (drawer/popup
   both reach here via the .cart-payment-bar reparent) plus the
   regular dock anchor on step 1 (hidden by the rule above). */
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    padding: 10px 14px 12px !important;
    margin: 0 !important;
    border-top: 0 !important;
    background: transparent !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row input.coupon {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    height: 42px !important;
    padding: 0 14px !important;
    background: var(--cart-surface, #fff) !important;
    border: 1.5px solid var(--cart-border, #e2e8f0) !important;
    border-radius: 12px !important;
    font-size: 13.5px !important;
    color: var(--cart-text-1, #0e1015) !important;
    box-shadow: none !important;
    margin: 0 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row input.coupon:focus {
    background: var(--cart-surface, #fff) !important;
    border-color: var(--primary-color, #0e1015) !important;
    box-shadow: 0 0 0 3px rgba(15,23,42,.08) !important;
    outline: none !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row .apply-coupon {
    flex: 0 0 auto !important;
    height: 42px !important;
    padding: 0 22px !important;
    margin: 0 !important;
    background: var(--primary-color, #0e1015) !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: 0 4px 10px rgba(15,23,42,.18) !important;
    text-decoration: none !important;
    transition: filter .15s, transform .12s, box-shadow .15s !important;
    cursor: pointer;
}
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row .apply-coupon:hover {
    filter: brightness(1.12) !important;
    box-shadow: 0 6px 14px rgba(15,23,42,.22) !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-coupon-row .apply-coupon:active {
    transform: translateY(1px);
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .cart-coupon-row input.coupon {
    background: var(--cart-surface, #15171b) !important;
    border-color: var(--cart-border, #2a2e35) !important;
    color: var(--cart-text-1, #e6e8eb) !important;
}

/* The inner .cart-header.card-header inside .card.cart-card is a
   duplicate of the .cart-section__head bar above it — both showed
   the "Cart" title + the empty-cart delete icon. The outer
   .cart-section__head is the canonical one (consistent with all
   other cart sections), so hide the inner duplicate. The outer
   one keeps the trash icon visible per merchant — that's the
   delete-cart action the merchant noted was missing. */
body:not(.cart-mode-under) #idcartpopup .cart-card > .cart-header.card-header {
    display: none !important;
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar > .cart-totals-dock {
    background: var(--cart-bg, #0e1015) !important;
    border-bottom-color: var(--cart-border, #2a2e35) !important;
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup > .cart-totals-dock {
    background: var(--cart-bg, #0e1015);
    border-color: var(--cart-border, #2a2e35);
}
/* Popup + drawer modes — totals dock flush with the panel edges
   (no horizontal margin) per merchant, so the row sits edge-to-
   edge with the items area above and the bottom-stack below. */
body.cart-mode-popup .cart-side-panel #idcartpopup > .cart-totals-dock,
body.cart-mode-drawer .cart-side-panel #idcartpopup > .cart-totals-dock {
    margin: 0 !important;
}

/* Cart items area scrolls — the section grows to fill all slack
   space inside #idcartpopup (flex:1) so the totals dock + bottom
   stack + continue button below it sit at the visible bottom of
   the panel. !important because the drawer/popup rules earlier
   in this file force every .cart-section to flex:0 0 auto, which
   would let the cart shrink and the dock float in the middle. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-section--cart {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-section--cart .cart-section__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-section--cart .cart-section__body > .card.cart-card.cart_dispay {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="cart"] .cart-section--cart .cart-section__body > .card.cart-card.cart_dispay > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* ─────────────────────────────────────────────────────────────
   Cart-side-inline (template) — the cart sidebar is fixed-position
   on the trailing edge (xl+) per the rule near line 1683. At that
   width the .cart-side-inline container IS the viewport-clamped
   scroller. To get a FIXED bottom dock (totals + הוסיפו גם +
   continue) we have to:
     1) kill the outer scroller (overflow:hidden on the wrapper)
     2) make #idcartpopup a flex column that fills 100% of it
     3) give the cart-section--cart flex:1 (already declared
        above) with internal overflow on the items area
   The totals-dock + bottom-stack + continue-bar then sit BELOW
   the flex:1 section and ride at the bottom of the visible panel
   no matter how long the cart is.
   ───────────────────────────────────────────────────────────── */
@media (min-width: 1200px) {
    body.cart-inline-on .cart-side-inline,
    body.cart-inline-on.cart-push-stick .cart-side-inline {
        /* Override the overflow-y:auto from line 1689 + the
           cart-push-stick overflow:visible from line 51 so the
           INNER cart layout (not the outer wrapper) owns the
           scroll. Without this, the bottom dock floats past the
           viewport fold because the wrapper has no internal
           scroller — the page scrolls instead. */
        overflow: hidden !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    body.cart-inline-on .cart-side-inline #idcartpopup,
    body.cart-inline-on.cart-push-stick .cart-side-inline #idcartpopup {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        height: 100% !important;
        max-height: 100% !important;
        overflow: hidden !important;
        padding: 14px !important;
        gap: 14px !important;
    }
}
/* Below xl (cart returns to normal flow) — still clamp to viewport
   so the dock stays glued instead of growing past the fold. */
@media (max-width: 1199.98px) {
    .cart-side-inline #idcartpopup {
        max-height: calc(100vh - var(--header-h, 60px) - 20px);
        overflow: hidden !important;
    }
}
/* Smaller viewports — give the cart a bit less so the page header
   doesn't push the bottom dock off-screen on phones. */
@media (max-width: 575.98px) {
    .cart-side-inline #idcartpopup {
        max-height: calc(100vh - var(--header-h, 60px) - 12px);
    }
}

/* ─────────────────────────────────────────────────────────────
   Step 2 (סיום הזמנה) — delivery form fills the height,
   payment buttons stack one per row.

   On step 2 the delivery section is the WHOLE pane above the
   payment bar — per merchant it should fill the column height
   (form scrolls inside if long) and the payment buttons should
   stack vertically instead of the legacy 2-per-row grid that
   reads cramped in the narrow cart sidebar.
   ───────────────────────────────────────────────────────────── */
/* ── Step 2: delivery form starts at the top, payment bar fixed at bottom ──
   The delivery section needs flex:1 with !important to beat the
   legacy `.cart-section { flex: 0 0 auto !important }` from the
   drawer/popup blocks higher up in this file. Without it the form
   sized to content and the payment buttons floated below the form
   instead of landing at the visible bottom of the panel. */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    /* The Delivery Details title bar (.cart-section__head--toggle)
       is hidden on step 2 — drop any top border / margin the
       collapsible chrome added so the form starts FLUSH with the
       step tabs. */
    border: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery .cart-section__body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    padding: 0 !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery .delivery-card {
    height: auto;
    min-height: 100%;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery .delivery-card .card-header {
    display: none !important; /* legacy "Delivery Details" header — we already show it as the tab */
}
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-section--delivery .delivery-card .card-body {
    padding: 14px 14px 8px !important;
    background: transparent !important;
}

/* ── Payment bar: fixed sticky bottom + modern button design ── */
body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar {
    position: sticky !important;
    bottom: 0 !important;
    flex: 0 0 auto !important;
    z-index: 10;
    background: var(--cart-bg, #fff) !important;
    border-top: 1px solid var(--cart-divider, #f1f1f3) !important;
    padding: 12px 14px 14px !important;
    margin: 0 !important;
    box-shadow: 0 -6px 16px rgba(0,0,0,0.06);
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar {
    background: var(--cart-bg, #0e1015) !important;
    border-top-color: var(--cart-border, #2a2e35) !important;
}

/* Strip the legacy Bootstrap .row + col grid; replace with a
   2-per-row CSS grid so the payment options stay compact and don't
   eat the panel height per merchant. The grid collapses to one
   column only if a single button exists (auto-fit handles it). */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar > .row {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px !important;
    margin: 0 !important;
    width: 100% !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .checkoutButtons {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px !important;
    width: 100% !important;
    padding: 0 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .checkoutButtons > [class*="col-"] {
    flex: unset !important;
    max-width: unset !important;
    width: 100% !important;
    padding-inline: 0 !important;
    margin: 0 !important;
}
/* Kill the wrapping .card the legacy markup uses around each
   button — it added a redundant border + shadow that looked
   cramped inside the cart sidebar. */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .checkoutButtons .card,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .checkoutButtons .whatsapp-card,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .checkoutButtons .telegram-card {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Unified payment-button design — every variant (.whatsap-btn,
   .telegram-btn, .pay-phone-btn, .pay-cash-btn) lands on the same
   pill chrome: full-width, soft border-radius, brand-color outline
   on hover, text-only label, comfortable tap target. Icons are
   hidden via the rules at the bottom of this block per merchant. */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn {
    width: 100% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    padding: 9px 8px !important;
    /* Locked font-size — overrides the .text-xs and .pt-2 utilities
       the legacy markup added to a few buttons (Stripe specifically)
       so every label reads at the same 12.5px. Slightly smaller than
       before per merchant — the 2-per-row grid means labels need
       to be tighter to fit without truncating. */
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    border-radius: 10px !important;
    border: 1.5px solid var(--cart-border, #e2e8f0) !important;
    background: var(--cart-surface, #fff) !important;
    color: var(--cart-text-1, #0e1015) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: border-color .15s, background .15s, transform .12s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
    margin: 0 !important;
    height: auto !important;
    min-height: 42px;
    text-align: center;
    word-break: break-word;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn:hover {
    border-color: var(--primary-color, #0e1015) !important;
    background: var(--cart-soft, #f7f7f8) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn:active {
    transform: scale(.98);
}

/* Hide every icon inside payment buttons per merchant — labels
   only. Covers <img> brand logos (WhatsApp / Telegram), inline
   <svg>s (phone / cash icons), and Font Awesome <i> tags
   (Stripe / PayPal / etc.). The text label stays centred via the
   flex justify-content:center on the button. */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn img,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn svg,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn i,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn img,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn svg,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn i,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn img,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn svg,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn i {
    display: none !important;
}

/* Per-gateway accent — left border + tinted hover background so
   each option is visually distinct. */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-whatsapp {
    border-inline-start: 3px solid #25D366 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-whatsapp:hover {
    background: rgba(37, 211, 102, .06) !important;
    border-color: #25D366 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-telegram {
    border-inline-start: 3px solid #229ED9 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-telegram:hover {
    background: rgba(34, 158, 217, .06) !important;
    border-color: #229ED9 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .pay-phone-btn {
    border-inline-start: 3px solid #6366f1 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .pay-phone-btn:hover {
    background: rgba(99, 102, 241, .06) !important;
    border-color: #6366f1 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .pay-cash-btn {
    border-inline-start: 3px solid #10b981 !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .pay-cash-btn:hover {
    background: rgba(16, 185, 129, .06) !important;
    border-color: #10b981 !important;
}
/* Generic credit-card buttons (Stripe, PayPal, Tranzila, HYP,
   PayPlus, Grow, Sumit, Max, etc.) all share the telegram-btn
   class. Give them a brand-color accent so they read as "card
   payment" group. */
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-stripe,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-paypal,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-tranzila,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-hyp,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-payplus,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-grow,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-sumit,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-max,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-paymentwall {
    border-inline-start: 3px solid var(--primary-color, #0e1015) !important;
}
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-stripe:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-paypal:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-tranzila:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-hyp:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-payplus:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-grow:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-sumit:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-max:hover,
body:not(.cart-mode-under) #idcartpopup .cart-payment-bar #owner-paymentwall:hover {
    background: var(--cart-soft, #f7f7f8) !important;
    border-color: var(--primary-color, #0e1015) !important;
}

/* Dark scheme — buttons sit on the dark cart surface. */
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn,
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .whatsap-btn,
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .telegram-btn {
    background: var(--cart-surface, #15171b) !important;
    border-color: var(--cart-border, #2a2e35) !important;
    color: var(--cart-text-1, #e6e8eb) !important;
}
html[data-scheme="dark"] body:not(.cart-mode-under) #idcartpopup .cart-payment-bar .btn:hover {
    background: var(--cart-soft, #1c1f24) !important;
}

/* ─────────────────────────────────────────────────────────────
   Mobile safe-area — the continue button (step 1) and the
   payment-bar (step 2) got cut off at the bottom on phones
   because the drawer .cart-side-panel uses top:0 + bottom:0
   to span the viewport, but iOS Safari / Chrome Android
   include the address bar in 100vh — so the panel's bottom edge
   sits BEHIND the browser chrome on phones. Two fixes:

   1. Switch the drawer panel to dvh (dynamic viewport height)
      which excludes the browser chrome.
   2. Add env(safe-area-inset-bottom) padding to the bottom-most
      element in each step so the home indicator on iPhone X+
      doesn't cover the CTA either.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 991.98px) {
    body.cart-mode-drawer .cart-side-panel,
    body.cart-mode-popup .cart-side-panel {
        bottom: auto !important;
        height: 100vh !important;
        height: 100dvh !important;
    }
    /* Step 1 continue button — pad past the home indicator. */
    body:not(.cart-mode-under) #idcartpopup > .checkout-continue-bar {
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.cart-mode-popup .cart-side-panel #idcartpopup > .checkout-continue-bar,
    body.cart-mode-drawer .cart-side-panel #idcartpopup > .checkout-continue-bar {
        padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    }
    /* Step 2 payment bar — same safe-area clearance. */
    body:not(.cart-mode-under) #idcartpopup[data-checkout-step="delivery"] .cart-payment-bar {
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
