/* Template2 keeps its table for charges and totals; each item occupies one full-width cell. */
#order_body .template2-cart-item-row > td {
  width: 100%;
  padding: 0;
  border: 0;
  text-align: left;
}

.template2-mobile-cart .mobile-cart-body #order_body .template2-cart-item-row > td {
  width: 100%;
  text-align: left;
  white-space: normal;
  font-weight: 400;
}

.template2-cart-item-row .eatandrepeat-cart-content {
  text-align: left;
}

.template2-cart-item-row .eatandrepeat-cart-content h6 {
  color: #333;
  font-weight: 700;
}

.template2-cart-item-row .eatandrepeat-cart-content .eatandrepeat-cart-base-price {
  font-family: 'regular', sans-serif;
  font-weight: 400;
}

.template2-cart-item-row .eatandrepeat-cart-content p {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 20px;
}

.template2-cart-item-row .eatandrepeat-cart-stepper .item-number.c_qunt {
  margin: 0;
  padding: 0 3px !important;
  background: transparent;
  font-family: 'regular', sans-serif;
  cursor: default;
}

.template2-cart-item-row .eatandrepeat-cart-item-price {
  font-family: 'bold', sans-serif;
  font-weight: 700;
}

.template2-cart-item-row .eatandrepeat-cart-control:hover {
  background: #f2f2f2;
}

/* Keep every option visible while reducing the space occupied by each item. */
.template2-cart-item-row .eatandrepeat-cart-item {
  gap: 10px;
  padding: 10px 0;
}

.template2-cart-item-row .eatandrepeat-cart-thumbnail {
  flex-basis: 40px;
  width: 40px;
  height: 40px;
}

.template2-cart-item-row .eatandrepeat-cart-content h6 {
  font-size: 14px;
  line-height: 20px;
}

.template2-cart-item-row .eatandrepeat-cart-content p {
  margin-top: 3px;
  line-height: 18px;
}

.template2-cart-item-row .eatandrepeat-cart-item-footer {
  margin-top: 8px;
}

@media (min-width: 768px) {
  .template2-menu-container {
    width: 100%;
    max-width: 1440px;
    padding-right: 24px;
    padding-left: 24px;
  }

  .template2-menu-layout {
    display: flex;
    align-items: flex-start;
  }

  .template2-menu-layout > .template2-menu-products {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
  }

  .template2-menu-layout > #cart_div {
    flex: 0 0 370px;
    width: 370px;
    position: sticky;
    top: 100px;
  }

  /* The legacy scroll handler still toggles sticky_cart; CSS now anchors the column. */
  .template2-menu-layout #cart_div .cart_right {
    position: static;
    width: 100%;
  }

  .template2-menu-layout #cart_div .items_list {
    /* Override the legacy 228px inline cap without changing cart refresh behavior. */
    max-height: clamp(180px, calc(100vh - 320px), 680px) !important;
    max-height: clamp(180px, calc(100dvh - 320px), 680px) !important;
    overflow-y: auto !important;
    overflow-x: hidden;
    padding: 0 !important;
    scrollbar-gutter: stable;
  }

  .template2-menu-layout #cart_div #order_body {
    width: 100%;
    table-layout: fixed;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .template2-menu-container {
    padding-right: 15px;
    padding-left: 15px;
  }

  .template2-menu-layout > #cart_div {
    flex-basis: 310px;
    width: 310px;
  }
}
