/* The "No Active Order" empty state is suppressed for postpaid/both stores:
  when there is nothing to show, this section renders blank. Overrides any
  inline display the script sets, so it holds no matter which code path
  calls showEmpty(). Prepaid stores (.ao-prepaid) are excluded — there the
  script decides, so a visitor with no order gets told so. */
  .active-order-section:not(.ao-prepaid) #ao-empty,
  .active-order-section:not(.ao-prepaid) .active-order-empty {
    display: none !important;
  }
  /* The Continue button belongs to the empty state, so it is hidden by default
  too. showOrders() re-shows it via the .ao-has-orders flag below, keeping it
  available on the one path that renders actual order cards. */
  .active-order-section:not(.ao-prepaid) #ao-footer {
    display: none !important;
  }
  .active-order-section.ao-has-orders #ao-footer {
    display: none !important;
  }
  .active-order-section {
    padding-bottom: 0 !important;
  }
  .active-order-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #eaeaea);
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    overflow: hidden;
  }
  .ao-banner {
    margin-left: -2rem;
    margin-right: -2rem;
    margin-top: -2rem;
    border-radius: 0 !important;
  }
  @media (max-width: 576px) {
    .active-order-card {
      padding: 1.25rem;
    }
    .ao-banner {
      margin-left: -1.25rem;
      margin-right: -1.25rem;
      margin-top: -1.25rem;
    }
  }
  .active-order-item {
    border-bottom: 1px solid var(--border, #f0f0f0);
  }
  .active-order-item:last-child { border-bottom: none; }
  .active-order-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
  }
  .active-order-status-badge,
  .active-order-payment-badge {
    padding: 0.35rem 0.9rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .kitchen-status-pill {

    padding: 7px 12px;
  }
  .badge-completed { background: #d4edda; color: #155724; }
  .badge-pending   { background: #fff3cd; color: #856404; }
  .badge-paid      { background: #d4edda; color: #155724; }
  .badge-unpaid    { background: #f8d7da; color: #721c24; }
  .fr-ao-btn-cancel {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: transparent;
    color: #dc3545;
    border: 2px solid #dc3545;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .fr-ao-btn-cancel:hover { background: #dc3545; color: #fff; }
  .fr-ao-btn-cancel:disabled { opacity: 0.6; cursor: not-allowed; }
  .fr-ao-cancel-timer { font-variant-numeric: tabular-nums; opacity: 0.85; }
  @keyframes aoFadeOut {
    0%   { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(0.94) translateY(-16px); }
  }

  /* Dark-mode support for the SweetAlert2 cancel dialog + toast */
  body.dark-mode .swal2-popup {
    background: var(--card-bg, #1f1912) !important;
    color: var(--text, #f5ede0) !important;
    border: 1px solid var(--border, #2e2418);
  }
  body.dark-mode .swal2-title,
  body.dark-mode .swal2-html-container {
    color: var(--text, #f5ede0) !important;
  }
  body.dark-mode .swal2-cancel {
    color: #fff !important;
  }
  body.dark-mode .swal2-close {
    color: var(--text-muted, #a0917f) !important;
  }
  body.dark-mode .swal2-timer-progress-bar {
    background: var(--accent, #d4521a) !important;
  }
.order-summary-section {
      padding-top: 7rem;
      padding-bottom: 0.5rem;
    }
    #os-loading {
      min-height: 55vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
    }
    @media (max-width: 576px) {
      .order-summary-section {
        padding-top: 0;
        padding-bottom: 0.5rem;
      }
      #os-loading {
        min-height: 65vh;
        min-height: 65dvh;
        padding: 0 16px;
      }
    }
    .order-summary-section .os-card {
      background: var(--card-bg, #fff);
      border: 1px solid var(--border, #eaeaea);
      border-radius: 16px;
      padding: 1.75rem;
      padding-top:1rem;
      max-width: 720px;
      margin: 0 auto 1.5rem;
      box-shadow: 0 4px 24px rgba(0,0,0,0.06);
    }
    .order-summary-section .os-banner {
      margin: -1rem -1.75rem 1.25rem;
      padding: 1.25rem 1.75rem;
      border-radius: 16px 16px 0 0;
    }
    .os-merge-card .os-banner {
      border-top-left-radius: 16px !important;
      border-top-right-radius: 16px !important;;
    }
    .order-summary-section .os-head {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 0.75rem;
      margin-bottom: 1.25rem;
      padding-bottom: 1.5rem;
      border-bottom: 1px solid var(--border, #eaeaea);
    }
    .order-summary-section .os-order-no {
      font-size: 2rem;
      font-weight: 700;
      color: var(--accent, #d4521a);
      margin: 0;
    }
    .order-summary-section .os-location {
      text-align: center;
    }
    .order-summary-section .os-location-label {
      font-size: 0.8rem;
      color: var(--text-muted, #6c757d);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin: 0 0 0.25rem;
    }
    .order-summary-section .os-location-no {
      font-size: 2rem;
      font-weight: 700;
      color: var(--accent, #d4521a);
      margin: 0;
    }
    .order-summary-section .os-round-label {
      font-size: 0.72rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.5px;
      color: var(--text-muted, #888);
      margin: 1rem 0 0.5rem;
    }
    .order-summary-section .os-group-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
    }
    .order-summary-section .os-item {
      display: flex;
      align-items: flex-start;
      gap: 0.85rem;
      padding: 0.65rem 0;
      border-bottom: 1px solid var(--border, #f0f0f0);
    }
    .order-summary-section .os-item:last-child { border-bottom: none; }
    .order-summary-section .os-item-img {
      width: 52px;
      height: 52px;
      object-fit: cover;
      border-radius: 8px;
      flex-shrink: 0;
      border: 1px solid var(--border, #eaeaea);
    }
    .order-summary-section .os-item-name { font-weight: 600; color: var(--text, #1a1a1a); }
    .order-summary-section .os-item-meta { font-size: 0.8rem; color: var(--text-muted, #6c757d); margin-top: 2px; }
    .order-summary-section .os-item-price { font-weight: 700; color: var(--text, #1a1a1a); white-space: nowrap; }
    .order-summary-section .os-item-side {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 6px;
    }
    .order-summary-section .os-totals {
      margin-top: 1.1rem;
      padding-top: 1rem;
      border-top: 2px solid var(--border, #eaeaea);
    }
    .order-summary-section .os-total-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.9rem;
      color: var(--text-muted, #6c757d);
      margin-bottom: 0.4rem;
    }
    .order-summary-section .os-total-row.discount { color: #28a745; }
    .order-summary-section .os-grand {
      display: flex;
      justify-content: space-between;
      font-size: 1.15rem;
      font-weight: 800;
      color: var(--text, #1a1a1a);
      margin-top: 0.6rem;
      padding-top: 0.6rem;
      border-top: 1px solid var(--border, #eaeaea);
    }
    .order-summary-section .os-unsettled {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
      margin-top: 1rem;
      padding: 0.7rem 1rem;
      border: 1px dashed rgba(240, 173, 78, 0.55);
      background: rgba(240, 173, 78, 0.12);
      border-radius: 10px;
      font-size: 0.85rem;
      font-weight: 600;
      color: #8a6100;
      text-align: center;
    }
    body.dark-mode .order-summary-section .os-unsettled {
      color: #f0ad4e;
      background: rgba(240, 173, 78, 0.1);
    }
    /* Settle Bill variant: same slot as the plain notice, styled as an accent
    button instead of a dashed warning. */
    .order-summary-section .os-unsettled.os-unsettled-action {
      display: block;
      border: none;
      background: none;
      padding: 0;
    }
    .order-summary-section .os-unsettled-link {
      display: block;
      padding: 0.7rem 1rem;
      background: var(--accent, #d4521a);
      color: #fff;
      border-radius: 10px;
      font-weight: 700;
      text-decoration: none;
      transition: filter 0.2s;
    }
    .order-summary-section .os-unsettled-link:hover {
      filter: brightness(1.08);
      color: #fff;
    }
    .order-summary-section .os-continue-btn {
      display: block;
      margin-top: 0.75rem;
      padding: 0.7rem 1rem;
      background: transparent;
      color: var(--accent, #d4521a);
      border: 1px solid var(--accent, #d4521a);
      border-radius: 10px;
      font-weight: 700;
      text-align: center;
      text-decoration: none;
      transition: background 0.2s, color 0.2s;
    }
    .order-summary-section .os-continue-btn:hover {
      background: var(--accent, #d4521a);
      color: #fff;
    }
    .order-summary-section .os-pill {
      display: inline-block;
      padding: 0.2rem 0.6rem;
      border-radius: 50px;
      font-size: 0.68rem;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    /* Themed from the accent variable rather than a theme button class: this
    shortcode is theme-agnostic and ships to every storefront. */
    .order-summary-section #os-footer {
      max-width: 720px;
      margin: 0 auto;
      padding: 0 1.75rem;
      text-align: center;
    }
    .order-summary-section .os-settle-btn {
      display: block;
      width: 100%;
      padding: 0.85rem 2.25rem;
      background: var(--accent, #d4521a);
      color: #fff;
      border: 1px solid var(--accent, #d4521a);
      border-radius: 10px;
      font-weight: 700;
      font-size: 0.95rem;
      text-align: center;
      text-decoration: none;
      transition: all 0.2s;
    }
    .order-summary-section .os-settle-btn:hover {
      filter: brightness(1.08);
      color: #fff;
    }
    /* Dimmed and inert while another diner is paying. The href is stripped in JS,
    so the element is not a link in that state. */
    .order-summary-section .os-settle-btn.disabled {
      opacity: 0.6;
      pointer-events: none;
      cursor: not-allowed;
    }
    .order-summary-section .os-lock-note {
      margin: 0.75rem auto 0;
      padding: 0.65rem 1rem;
      border: 1px solid rgba(240, 173, 78, 0.45);
      background: rgba(240, 173, 78, 0.12);
      border-radius: 10px;
      font-size: 0.82rem;
      line-height: 1.45;
      color: #8a6100;
    }
    body.dark-mode .order-summary-section .os-lock-note {
      color: #f0ad4e;
      background: rgba(240, 173, 78, 0.1);
    }
    .order-summary-section .os-pill.os-pending { background: #fff3cd; color: #856404; }
    .order-summary-section .os-pill.os-cooking { background: #fff3cd; color: #856404; }
    .order-summary-section .os-pill.os-ready   { background: #d4edda; color: #155724; }
    .order-summary-section .os-pill.os-cancelled { background: #f8d7da; color: #721c24; }

    /* Shared card class (.os-merge-card) on both cards: one continuous white
    block instead of two separate cards. Background stays scoped to the card
    itself, not the full-width section. !important beats Bootstrap's
    mb-4/py-5 utilities. */
    .os-merge-card {
      background: var(--card-bg, #fff) !important;
      box-shadow: none !important;
    }
    .active-order-card.os-merge-card,
    .delici-ao-card.os-merge-card {
      margin-bottom: 0 !important;
      border-bottom: none !important;
      border-bottom-left-radius: 0 !important;
      border-bottom-right-radius: 0 !important;
    }

    .order-summary-section .os-cancel-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.75rem;
      justify-content: center;
      margin-top: 1.25rem;
    }
    .order-summary-section .os-round .os-cancel-actions {
      justify-content: center;
      margin: 1rem 0;
    }
    .order-summary-section .os-btn-cancel {
      display: inline-block;
      padding: 0.65rem 1.5rem;
      background: transparent;
      color: #dc3545;
      border: 2px solid #dc3545;
      border-radius: 8px;
      font-weight: 700;
      font-size: 0.9rem;
      cursor: pointer;
      transition: all 0.2s;
    }
    .order-summary-section .os-btn-cancel:hover { background: #dc3545; color: #fff; }
    .order-summary-section .os-btn-cancel:disabled { opacity: 0.6; cursor: not-allowed; }
    .order-summary-section .os-cancel-timer { font-variant-numeric: tabular-nums; opacity: 0.85; }
    @keyframes osFadeOut {
      0%   { opacity: 1; transform: scale(1) translateY(0); }
      100% { opacity: 0; transform: scale(0.94) translateY(-16px); }
    }
    body.dark-mode .swal2-popup {
      background: var(--card-bg, #1f1912) !important;
      color: var(--text, #f5ede0) !important;
      border: 1px solid var(--border, #2e2418);
    }
    body.dark-mode .swal2-title,
    body.dark-mode .swal2-html-container {
      color: var(--text, #f5ede0) !important;
    }
    body.dark-mode .swal2-cancel {
      color: #fff !important;
    }
    body.dark-mode .swal2-close {
      color: var(--text-muted, #a0917f) !important;
    }
    body.dark-mode .swal2-timer-progress-bar {
      background: var(--accent, #d4521a) !important;
    }
.global-upsell-section {
    padding: 40px 0;
    width: 100%;
    --upsell-card-bg: var(--card-bg, var(--bg2, var(--color-two, var(--bg-color, transparent))));
    --upsell-text: var(--text, var(--text-color, var(--white-color, var(--bs-body-color, currentColor))));
    --upsell-border: var(--border, var(--white-color-opacity-four, rgba(128, 128, 128, 0.2)));
    --upsell-accent: var(--main-color, var(--theme-color, var(--accent, var(--accent-color, var(--primary-color, var(--tf-primary, var(--bs-primary, #db541f)))))));
  }

  .global-upsell-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--upsell-text);
  }

  .global-upsell-carousel {
    position: relative;

  }

  .global-upsell-grid {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding-bottom: 5px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .global-upsell-grid::-webkit-scrollbar {
    display: none;
  }

  .global-upsell-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: var(--upsell-btn-bg, var(--upsell-accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.2s, filter 0.2s, transform 0.2s;
    font-size: 18px;
    line-height: 1;
  }

  .global-upsell-arrow:hover {
    filter: brightness(0.95);
  }

  .global-upsell-arrow.prev {
    left: 6px;
  }

  .global-upsell-arrow.next {
    right: 6px;
  }

  .global-upsell-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
  }

  .global-upsell-arrow svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
  }

  @media (max-width: 767.98px) {
    .global-upsell-carousel {
      padding: 0;
    }

    .global-upsell-arrow {
      display: none !important;
    }

    .global-upsell-grid {
      scroll-snap-type: none;
    }
  }

  .global-upsell-card {
    flex: 0 0 240px;
    width: 240px;
    /* Fixed height so every card is identical — variable vs simple, and no
     reflow when the button label changes to "Added!". Content that overflows
     is clipped by the fixed height; the actions row stays pinned to the bottom. */
    height: 360px;
    box-sizing: border-box;
    scroll-snap-align: start;
    background: var(--upsell-card-bg);
    border: 1px solid var(--upsell-border);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    color: var(--upsell-text);
  }

  .global-upsell-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  }

  .global-upsell-img-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(128, 128, 128, 0.12);
    cursor: pointer;
  }

  .global-upsell-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Wishlist heart overlay — matches the theme's product-card icons: a white
   circle by default, and a FILLED theme-accent circle (white heart) on hover
   and when wishlisted. */
  .upsell-wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    /* Default (NOT wishlisted): white circle, dark heart. */
    background: #ffffff;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.15s, background 0.15s, color 0.15s;
  }

  .upsell-wishlist-btn:hover {
    transform: scale(1.08);
    /* Filled accent circle + white heart, like the theme's card icons on hover. */
    background: var(--upsell-accent);
    color: #fff;
  }

  /* Wishlisted: filled accent circle with a white heart. */
  .upsell-wishlist-btn.is-wished {
    background: var(--upsell-accent);
    color: #fff;
  }

  .global-upsell-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--upsell-text);
    min-height: 38px;
    cursor: pointer;
    transition: color 0.15s;
  }

  .global-upsell-name:hover {
    color: var(--upsell-accent);
  }

  .global-upsell-desc {
    font-size: 13px;
    line-height: 1.5;
    opacity: 0.7;
    color: var(--upsell-text);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .global-upsell-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin-top: auto;
    width: 100%;
  }

  .global-upsell-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--upsell-text);
    margin: 0;
    line-height: 1.15;
  }

  .global-upsell-price .upsell-old-price {
    text-decoration: line-through;
    opacity: 0.6;
    font-size: 0.8em;
    margin-left: 6px;
    font-weight: 500;
  }

  /* Action row: quantity stepper (left) + add/select button (right). Fixed
   height so a simple card (stepper + button) and a variable card (button only)
   occupy the exact same space, and the row never reflows on label changes. */
  .upsell-card-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    height: 40px;
    width: 100%;
  }

  .upsell-card-actions .global-upsell-btn {
    flex: 1;
    /* button fills the rest of the row */
    min-width: 0;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Keep the label readable inside the narrow card row (the theme's .btn-dark
     uppercases + adds larger padding; tighten it here). */
    padding: 0 8px !important;
    font-size: 12px !important;
    letter-spacing: 0.3px;
    border-radius: 8px !important;
  }

  /* Per-card quantity stepper for simple products. Theme-aware borders/text. */
  .upsell-card-qty {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    border: 1.5px solid var(--upsell-border);
    border-radius: 8px;
    overflow: hidden;
  }

  .upsell-card-qty button {
    width: 26px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--upsell-text);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    line-height: 1;
    flex: 0 0 auto;
  }

  .upsell-card-qty button:hover {
    background: rgba(128, 128, 128, 0.12);
  }

  .upsell-card-qty input {
    width: 24px;
    height: 38px;
    border: none;
    background: transparent;
    color: var(--upsell-text);
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    padding: 0;
    -moz-appearance: textfield;
  }

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

  .upsell-incart-btn,
  .upsell-modal-add.is-incart {
    cursor: default;
    opacity: 0.45;
  }

  .upsell-incart-btn {
    pointer-events: none;
  }

  /* The button reuses the theme's own button classes (btn btn-dark
   btn-hover-primary) so it inherits the exact accent, hover and contrast the
   theme defines for its "Proceed to Checkout" button. We only enforce layout
   here (full width) and provide a themed fallback for when the active theme
   does NOT style .btn-dark (e.g. non-restaurant themes) via the CSS-variable
   accent below, kept at low specificity so the theme's rules win. */
  .global-upsell-btn {
    width: 100%;
    cursor: pointer;
    text-align: center;
  }

  /* Fallback appearance only when the theme leaves .btn-dark unstyled. Uses
   :where() to keep specificity at 0 so any real theme button rule overrides it. */
  :where(.global-upsell-btn) {
    padding: 10px;
    background: var(--upsell-btn-bg, var(--upsell-accent));
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    transition: opacity 0.2s, filter 0.2s;
  }

  :where(.global-upsell-btn):hover {
    opacity: 0.92;
    filter: brightness(0.95);
  }

  /* ── Variant selection modal (matches the site's product quick-view) ── */
  .upsell-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10800;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }

  .upsell-modal-overlay.open {
    display: flex;
  }

  .upsell-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow: hidden;
    border-radius: 16px;
    background: var(--card-bg, var(--color-two, #fff));
    color: var(--upsell-text);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
  }

  .upsell-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    flex: 0 0 auto;
    background: var(--card-bg, var(--color-two, #fff));
    border-bottom: 1px solid var(--upsell-border);
  }

  .upsell-modal-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }

  .upsell-modal-veg-icon {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    border: 1.5px solid #16a34a;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .upsell-modal-veg-icon::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #16a34a;
  }

  .upsell-modal-veg-icon.non-veg {
    border-color: #dc2626 !important;
  }
  .upsell-modal-veg-icon.non-veg::before {
    background: #dc2626 !important;
  }
  .upsell-modal-veg-icon.egg {
    border-color: #d97706 !important;
  }
  .upsell-modal-veg-icon.egg::before {
    background: #d97706 !important;
  }
  .upsell-diet-dot,
  .upsell-card-diet-dot {
    display: inline-flex;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
  }
  .global-upsell-name-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
  }
  .card-badge-item {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-right: 4px;
    flex-shrink: 0;
  }
  .badge-featured-square {
    background-color: #ffc107 !important;
    color: #000 !important;
  }
  .badge-hot-square {
    background-color: #dc3545 !important;
    color: #fff !important;
  }
  .badge-trending-square {
    background-color: #17a2b8 !important;
    color: #fff !important;
  }
  .badge-recommended-square {
    background-color: #28a745 !important;
    color: #fff !important;
  }

  .upsell-modal-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: rgba(128, 128, 128, 0.14);
    color: var(--upsell-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .upsell-modal-media {
    position: relative;
    background: rgba(128, 128, 128, 0.1);
    width: 100%;
    height: 230px;
    flex: 0 0 230px;
    display: flex;
    border-radius: 0px !important;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .upsell-modal-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* crop to fill — never stretches the modal */
  }

  .upsell-modal-body {
    padding: 18px 22px 22px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* scroll internally if variant list is long */
    min-height: 0;
  }

  .upsell-modal-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--upsell-text);
  }

  .upsell-modal-desc {
    font-size: 13.5px;
    line-height: 1.5;
    opacity: 0.75;
    margin-bottom: 14px;
    color: var(--upsell-text);
  }

  .upsell-modal-label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--upsell-text);
  }

  .upsell-variant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
  }

  .upsell-variant-pill {
    border: 1.5px solid var(--upsell-border);
    background: transparent;
    color: var(--upsell-text);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
  }

  .upsell-variant-pill.active {
    border-color: var(--upsell-accent);
    box-shadow: 0 0 0 1px var(--upsell-accent) inset;
  }

  .upsell-variant-pill:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }

  /* Add-ons: theme-aware pills (wrap like the variant pills). Clicking a pill
   toggles its active state; the hidden checkbox tracks selection. */
  .upsell-modal-addons-section {
    margin-bottom: 18px;
  }

  .upsell-addons-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .upsell-addon-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1.5px solid var(--upsell-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--upsell-text);
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  }

  .upsell-addon-item.active {
    border-color: var(--upsell-accent);
    box-shadow: 0 0 0 1px var(--upsell-accent) inset;
  }

  .upsell-addon-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--upsell-accent);
    flex: 0 0 auto;
    cursor: pointer;
    margin: 0;
  }

  .upsell-addon-item img {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    flex: 0 0 auto;
  }

  .upsell-addon-name {
    font-weight: 600;
  }

  .upsell-addon-price {
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
  }

  .upsell-modal-price {
    font-size: 21px;
    font-weight: 800;
    color: var(--upsell-accent);
    margin-bottom: 10px;
  }

  .upsell-modal-price .upsell-old-price {
    font-size: 0.65em;
    color: var(--upsell-text);
    opacity: 0.6;
    margin-left: 8px;
  }

  .upsell-modal-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--upsell-border);
    flex-wrap: nowrap;
  }

  .upsell-qty {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    border: 1.5px solid var(--upsell-border);
    border-radius: 10px;
    overflow: hidden;
  }

  .upsell-qty button {
    width: 38px;
    height: 46px;
    border: none;
    background: transparent;
    color: var(--upsell-text);
    font-size: 18px;
    cursor: pointer;
  }

  .upsell-qty input {
    width: 40px;
    height: 46px;
    border: none;
    background: transparent;
    color: var(--upsell-text);
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
  }

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

  .upsell-modal-add {
    flex: 1;
    min-width: 0;
    height: 46px;
    border-radius: 10px;
    font-size: 14px;
  }

  @media (max-width: 640px) {
    .upsell-modal {
      max-width: 100%;
      max-height: 92vh;
    }

    .upsell-modal-media {
      height: 200px;
      flex-basis: 200px;
    }
  }