/* Cart drawer — sirooneh marketplace
   The panel's own markup predates the marketplace design and still carried
   Bootstrap-3-era helpers: a float, a 5px border meant to be a left accent,
   and a solid indigo block behind every photo. In an RTL page those landed
   on the wrong side and read as stray blue bars under each item.

   Rewritten against the same tokens as the rest of the marketplace. Only
   presentation: the panel's id, its open/close classes, the Vue bindings and
   the handlers are untouched. */

/* No `display` on this rule. Open and closed are decided by the
   .sidenav-cart-open / .sidenav-cart-close pair that closeNav() swaps, and
   those are plain class selectors — an id selector here would outrank them
   and the panel would never hide again. The state rules below carry the
   same id, so they win on their own terms. */
#cartSideNav.sidenav-cart {
    flex-direction: column;
    padding-top: 0;
    background: var(--mf-surface, #f7f8fa);
    box-shadow: -18px 0 46px rgba(0, 0, 0, .14);
}

#cartSideNav.sidenav-cart.sidenav-cart-open { display: flex; }
#cartSideNav.sidenav-cart.sidenav-cart-close { display: none; }

#cartSideNav .offcanvas-menu-inner {
    display: flex; flex-direction: column;
    height: 100%; min-height: 0;
}

/* ---- header ---- */

#cartSideNav .minicart-content {
    display: flex; flex-direction: column;
    min-height: 0; flex: 1;
}

#cartSideNav .minicart-heading {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px; border-bottom: 1px solid var(--mf-line, #e8eaef);
    background: #fff;
}
#cartSideNav .minicart-heading > h4 {
    margin: 0; padding: 0;
    color: var(--mf-ink, #22272f); font-size: 15px; font-weight: 850;
}

/* The close sat at a fixed offset with a 36px glyph, which is why it hung
   off the panel edge. */
#cartSideNav .closebtn {
    position: static; order: 2; margin: 0;
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    border: 1px solid var(--mf-line, #e8eaef); border-radius: 11px;
    background: #fff; color: var(--mf-ink-3, #767f8d);
    font-size: 19px; line-height: 1; cursor: pointer; transition: .18s ease;
}
#cartSideNav .closebtn:hover {
    color: var(--mf-ink, #22272f); border-color: var(--mf-line-2, #d9dde4);
    background: var(--mf-muted, #f1f3f6);
}

#cartSideNav .searchable-container {
    display: flex; flex-direction: column;
    min-height: 0; flex: 1;
    padding: 14px; gap: 12px;
}

/* ---- items ---- */

#cartSideNav #cartList {
    min-height: 0; flex: 1;
    max-height: none;
    display: grid; align-content: start; gap: 9px;
    overflow-y: auto;
    padding-inline-end: 2px;
}

#cartSideNav .items { width: 100%; padding: 0; float: none; }

#cartSideNav .info-block.block-info {
    /* No accent border at all: the card edge already separates the rows,
       and a one-sided rule in an RTL column just looks like an error. */
    display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 11px; align-items: center;
    margin: 0; padding: 10px;
    border: 1px solid var(--mf-line, #e8eaef); border-radius: 15px;
    background: #fff;
}

#cartSideNav .info-block.block-info .square-box {
    float: none; width: 62px; height: 62px; min-height: 0; margin: 0;
    display: grid; place-items: center; overflow: hidden;
    border-radius: 12px;
    /* Was solid indigo behind every photo. */
    background: var(--mf-muted, #f1f3f6); color: inherit;
}
#cartSideNav .info-block.block-info .productImage {
    width: 100%; height: 100%;
    /* The same reasoning as the menu cards: show the dish, do not crop it. */
    object-fit: contain; padding: 3px;
}

#cartSideNav .product-item_title {
    margin: 0; color: var(--mf-ink, #22272f);
    font-size: 11.5px; font-weight: 850; line-height: 1.7;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#cartSideNav .product-item_quantity {
    margin: 3px 0 7px; color: var(--mf-ink-2, #4d5663);
    font-size: 10.5px; font-weight: 750;
}

#cartSideNav .info-block.block-info .row {
    display: flex; gap: 6px; margin: 0;
}
#cartSideNav .btn-cart-radius {
    width: 30px; height: 30px; min-width: 0; flex: none; padding: 0;
    display: grid; place-items: center;
    border: 1px solid var(--mf-line-2, #d9dde4); border-radius: 10px;
    background: #fff; color: var(--mf-ink-2, #4d5663);
    font-size: 10px; box-shadow: none; transition: .18s ease;
}
#cartSideNav .btn-cart-radius:hover {
    border-color: var(--mf-brand, #03cea4); color: #018e72;
    background: var(--mf-brand-soft, #effbf8);
}

/* ---- totals and actions ---- */

#cartSideNav #totalPrices {
    flex: none;
    display: grid; gap: 10px;
    padding-top: 2px;
}
/* The markup separates these blocks with bare <br>s, which only add gaps the
   grid already provides. */
#cartSideNav #totalPrices br { display: none; }

#cartSideNav #totalPrices .card {
    margin: 0 !important;
    border: 1px solid var(--mf-line, #e8eaef); border-radius: 15px;
    background: #fff; box-shadow: none;
}
#cartSideNav #totalPrices .card-body {
    padding: 13px 14px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
#cartSideNav #totalPrices .card-body .row { display: contents; }
#cartSideNav #totalPrices .card-body .col {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 0;
    color: var(--mf-ink, #22272f); font-size: 12px; font-weight: 800;
}
#cartSideNav #totalPrices .ammount { color: #018e72; font-size: 13px; }

#cartSideNav #totalPrices .btn-primary {
    width: 100%; min-height: 48px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 16px; border: 0; border-radius: 14px;
    background: var(--mf-brand, #03cea4); color: #fff !important;
    font-size: 12.5px; font-weight: 850; text-decoration: none;
    box-shadow: 0 10px 24px rgba(3, 206, 164, .26); transition: .18s ease;
}
#cartSideNav #totalPrices .btn-primary:hover { filter: brightness(.96); text-decoration: none; }

#cartSideNav #totalPrices .btn-default {
    width: 100%; min-height: 44px;
    border: 1px solid var(--mf-line-2, #d9dde4); border-radius: 13px;
    background: #fff; color: var(--mf-ink-2, #4d5663) !important;
    font-size: 11.5px; font-weight: 800;
}
#cartSideNav #totalPrices .btn-default:hover {
    border-color: var(--mf-brand-border, #b7ecdf); color: #018e72 !important;
    background: var(--mf-brand-soft, #effbf8);
}
/* "Keep shopping" is hidden on desktop by a .mobile-menu rule elsewhere;
   inside the drawer it is the whole point of the button. */
#cartSideNav #totalPrices .mobile-menu { display: block !important; }

@media (max-width: 575.98px) {
    #cartSideNav .searchable-container { padding: 12px; }
    #cartSideNav .info-block.block-info { grid-template-columns: 54px minmax(0, 1fr); }
    #cartSideNav .info-block.block-info .square-box { width: 54px; height: 54px; }
}
