/* Cart � phone-first app treatment. Desktop retains the existing cart layout. */
@media (max-width: 767px) {
  body.app-page--cart {
    --cart-green: #0b4a36;
    --cart-ink: #10291d;
    --cart-muted: #738279;
    --cart-line: #e1ebe4;
    --cart-canvas: #f5f8f5;
    background: var(--cart-canvas);
    color: var(--cart-ink);
    padding-bottom: calc(164px + env(safe-area-inset-bottom));
  }

  body.app-page--cart .site-header,
  body.app-page--cart > .site-footer,
  body.app-page--cart #page-header::before { display: none !important; }

  body.app-page--cart .preload-loader { z-index: 200; }
  body.app-page--cart .loading-overlay { z-index: 190; }

  .cart-app-topbar {
    min-height: 72px;
    padding: max(12px, env(safe-area-inset-top)) 18px 10px;
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 12px;
    background: rgba(245, 248, 245, .96);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 35;
  }
  .cart-app-topbar__back {
    width: 42px; height: 42px; display: grid; place-items: center;
    border: 1px solid var(--cart-line); border-radius: 14px; color: var(--cart-green); background: #fff;
    box-shadow: 0 5px 14px rgba(7, 57, 36, .06);
  }
  .cart-app-topbar svg, .cart-app-tabs svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .cart-app-topbar__title { min-width: 0; display: grid; line-height: 1.08; }
  .cart-app-topbar__title span { color: var(--cart-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .cart-app-topbar__title strong { margin-top: 3px; font-size: 20px; letter-spacing: -.04em; color: var(--cart-ink); }
  .cart-app-topbar__shop { color: var(--cart-green); font-size: 12px; font-weight: 800; padding: 10px 0 10px 8px; }

  #page-header {
    margin: 0 16px; min-height: 116px; padding: 18px 20px 20px; overflow: hidden;
    border: 0; border-radius: 22px; text-align: left; color: #fff;
    background: radial-gradient(circle at 87% 0, rgba(255, 179, 46, .28), transparent 34%), linear-gradient(135deg, #0d573e 0%, #083d2d 100%);
    box-shadow: 0 12px 28px rgba(8, 64, 43, .18);
  }
  #page-header .container { padding: 0; }
  #page-header .page-header-eyebrow { color: rgba(255,255,255,.72); font-size: 9px; letter-spacing: .1em; }
  #page-header .page-header-eyebrow::before { width: 6px; height: 6px; border-radius: 50%; background: #FF7000; }
  #page-header h1 { max-width: none; margin: 7px 0 4px; color: #fff; font-family: Poppins, sans-serif; font-size: 25px; line-height: 1.05; letter-spacing: -.055em; }
  #page-header p { margin: 0; color: rgba(255,255,255,.78); font-size: 12px; line-height: 1.35; }

  .cart-page-container { min-height: auto; padding: 18px 16px 0; background: transparent; }
  .cart-page-container .container { width: 100%; max-width: none; padding: 0; }
  .cart-page-content { display: block; margin: 0; }
  .cart-page-items { min-width: 0; }
  .cart-items-list { gap: 11px; }
  .cart-item {
    display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: auto auto;
    gap: 0 13px; align-items: center; padding: 10px; border: 1px solid var(--cart-line); border-radius: 18px;
    background: #fff; box-shadow: 0 7px 18px rgba(8, 55, 32, .055); overflow: visible; animation: none;
  }
  .cart-item::before { display: none; }
  .cart-item:hover { transform: none; border-color: var(--cart-line); box-shadow: 0 7px 18px rgba(8,55,32,.055); }
  .cart-item-image { width: 84px; height: 84px; border-radius: 13px; box-shadow: none; grid-row: 1 / span 2; }
  .cart-item:hover .cart-item-image img { transform: none; }
  .cart-item-details { min-width: 0; padding-top: 2px; }
  .cart-item-details h4 { color: var(--cart-ink); font-family: Poppins, sans-serif; font-size: 14px; line-height: 1.22; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cart-item-restaurant { font-size: 11px; line-height: 1.2; margin-bottom: 6px; color: var(--cart-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cart-item-price { font-family: Poppins, sans-serif; color: var(--cart-green); font-size: 14px; line-height: 1; }
  .cart-item-actions { grid-column: 2; grid-row: 2; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 8px; margin-top: 9px; }
  .qty-control { gap: 8px; padding: 3px; border: 1px solid var(--cart-line); background: #f5f8f5; border-radius: 10px; box-shadow: none; }
  .qty-btn { width: 27px; height: 27px; padding: 0; border: 0; border-radius: 8px; color: var(--cart-green); background: #fff; font-size: 17px; line-height: 1; }
  .qty-btn:hover, .qty-btn:active { background: var(--cart-green); color: #fff; transform: none; }
  .qty-display { min-width: 18px; color: var(--cart-ink); font-size: 12px; }
  .remove-btn { padding: 6px 0 6px 8px; color: #b5524d; font-size: 11px; font-weight: 700; border-radius: 0; }
  .remove-btn:hover { background: transparent; color: #8e3531; }

  .cart-page-summary { position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); }
  .cart-summary-card { position: static; padding: 13px; border: 1px solid #dce9df; border-top: 0; border-radius: 19px; box-shadow: 0 14px 34px rgba(7, 51, 32, .16); animation: none; }
  .cart-summary-card:hover { box-shadow: 0 14px 34px rgba(7, 51, 32, .16); }
  .cart-summary-card h2 { display: none; }
  .summary-content { display: grid; grid-template-columns: 1fr auto; gap: 0; margin: 0 0 10px; }
  .cart-summary-row { display: none; }
  .cart-summary-row.total { display: flex; grid-column: 1 / -1; align-items: center; padding: 0; border: 0; color: var(--cart-muted); font-family: Poppins, sans-serif; font-size: 12px; }
  .cart-summary-row.total span:last-child { color: var(--cart-ink); font-family: Poppins, sans-serif; font-size: 18px; }
  .cart-summary-card .btn { width: 100%; min-height: 48px; margin: 0; border-radius: 13px; text-transform: none; letter-spacing: 0; font-family: Poppins, sans-serif; font-size: 13px; }
  .cart-summary-card .btn-primary { background: var(--cart-green); box-shadow: none; }
  .cart-summary-card .btn-primary:hover { background: var(--cart-green); transform: none; box-shadow: none; }
  .cart-summary-card .btn-secondary { display: none; }

  .cart-empty { padding: 46px 18px 34px; border: 1px dashed #cbdcd0; border-radius: 20px; background: #fff; }
  .cart-empty svg { width: 60px; height: 60px; margin-bottom: 14px; color: #a7bcb0; }
  .cart-empty h4 { margin-bottom: 6px; color: var(--cart-ink); font-family: Poppins, sans-serif; font-size: 18px; }
  .cart-empty p { margin-bottom: 20px; color: var(--cart-muted); font-size: 12px; }
  .cart-empty a { padding: 12px 17px; border-radius: 12px; background: var(--cart-green); box-shadow: none; font-size: 12px; }

  .cart-app-tabs {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; height: calc(70px + env(safe-area-inset-bottom)); padding: 7px 16px max(7px, env(safe-area-inset-bottom));
    display: grid; grid-template-columns: 1fr 1fr 58px 1fr 1fr; align-items: end; background: rgba(255,255,255,.96); border-top: 1px solid #e4ece6; backdrop-filter: blur(18px); box-shadow: 0 -8px 24px rgba(7, 50, 31, .06);
  }
  .cart-app-tabs a { min-height: 52px; display: flex; position: relative; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #819088; font-size: 9px; font-weight: 700; }
  .cart-app-tabs a.is-active { color: var(--cart-green); }
  .cart-app-tabs a.is-active::after { content: ''; width: 4px; height: 4px; position: absolute; bottom: 2px; border-radius: 50%; background: #FF7000; }
  .cart-app-tabs__search { align-self: start; width: 54px; height: 54px; min-height: 54px !important; margin: -25px auto 0; border: 4px solid var(--cart-canvas); border-radius: 50%; background: #FF7000; color: #fff !important; box-shadow: 0 8px 18px rgba(223, 135, 0, .26); }
  .cart-app-tabs__search svg { width: 24px; height: 24px; }
  .cart-app-tabs__badge { position: absolute; top: 2px; right: calc(50% - 18px); min-width: 16px; height: 16px; padding: 0 4px; align-items: center; justify-content: center; border: 2px solid #fff; border-radius: 10px; background: #FF7000; color: #fff; font-size: 9px; font-style: normal; line-height: 1; }
}

@media (min-width: 768px) {
  .cart-app-topbar, .cart-app-tabs { display: none; }
}

/* Cart mobile correction: leave every food item visible above the app navigation. */
@media (max-width: 767px) {
  body.app-page--cart { padding-bottom:calc(92px + env(safe-area-inset-bottom)); }
  .cart-page-summary { position:static; margin:16px 0 10px; }
  .cart-summary-card { padding:16px; border:1px solid #dce9df; border-radius:18px; box-shadow:0 8px 20px rgba(7,51,32,.08); }
  .cart-summary-card h2 { display:block; margin:0 0 12px; padding:0 0 10px; border-bottom:1px solid #e6eee8; color:var(--cart-ink); font:800 14px/1.2 Poppins,system-ui,sans-serif; }
  .summary-content { display:block; margin:0 0 13px; }
  .cart-summary-row { display:flex; align-items:center; padding:5px 0; color:var(--cart-muted); font:600 11px/1.35 Poppins,system-ui,sans-serif; }
  .cart-summary-row.total { margin-top:7px; padding-top:11px; border-top:1px solid #e5eee8; color:var(--cart-ink); font-size:13px; }
  .cart-summary-row.total span:last-child { font-size:19px; }
  .qty-btn { display:grid; place-items:center; font-family:Arial,sans-serif; font-size:0; }
  .qty-btn::before { font-size:18px; font-weight:700; line-height:1; }
  .cart-decrease::before { content:'-'; }
  .cart-increase::before { content:'+'; }
  .qty-btn { min-width:30px; min-height:30px; }
  .qty-display { min-width:22px; font-variant-numeric:tabular-nums; }
  .cart-item-price, .cart-summary-row span:last-child { font-variant-numeric:tabular-nums; }
}

/* Cart hero � concise, app-level order context. */
@media (max-width: 767px) {
  body.app-page--cart .cart-hero#page-header {
    position: relative;
    isolation: isolate;
    min-height: 174px;
    margin: 0 12px;
    padding: 20px;
    overflow: hidden;
    border: 0;
    border-radius: 0 0 26px 26px;
    background: linear-gradient(138deg, #073c2c 0%, #075a3d 62%, #08704a 100%);
    box-shadow: 0 13px 27px rgba(4, 65, 43, .18);
  }
  body.app-page--cart .cart-hero#page-header .container {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 134px;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
  }
  .cart-hero__orb { position: absolute; z-index: -1; display: block; border-radius: 50%; pointer-events: none; }
  .cart-hero__orb--one { width: 162px; height: 162px; top: -92px; right: -34px; border: 28px solid rgba(255,255,255,.055); }
  .cart-hero__orb--two { width: 86px; height: 86px; right: 56px; bottom: -54px; background: rgba(255,112,0,.17); }
  .cart-hero__copy { max-width: 245px; }
  body.app-page--cart .cart-hero .page-header-eyebrow { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: rgba(255,255,255,.7); font-size: 9px; font-weight: 800; letter-spacing: .11em; }
  body.app-page--cart .cart-hero .page-header-eyebrow::before { width: 6px; height: 6px; margin: 0; background: #FF7000; }
  body.app-page--cart .cart-hero h1 { margin: 7px 0 4px; color: #fff; font: 800 28px/1.02 Poppins,system-ui,sans-serif; letter-spacing: -.065em; }
  body.app-page--cart .cart-hero p { margin: 0; color: rgba(255,255,255,.78); font: 500 11.5px/1.4 Poppins,system-ui,sans-serif; }
  .cart-hero__status { display: flex; min-height: 42px; align-items: center; gap: 8px; padding: 5px 5px 5px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(255,255,255,.10); color: #fff; backdrop-filter: blur(10px); }
  .cart-hero__status-icon { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 10px; background: #FF7000; color: #fff; }
  .cart-hero__status-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #cartHeroItemCount { min-width: 0; flex: 1; overflow: hidden; font: 700 10.5px/1.2 Poppins,system-ui,sans-serif; text-overflow: ellipsis; white-space: nowrap; }
  .cart-hero__status a { display: inline-flex; min-height: 30px; align-items: center; gap: 3px; padding: 0 9px; border-radius: 9px; background: #fff; color: #0b4a36; font: 800 9.5px/1 Poppins,system-ui,sans-serif; text-decoration: none; white-space: nowrap; }
  .cart-hero__status a:active { transform: scale(.96); }
  body.app-page--cart .cart-page-container { padding-top: 16px; }
}

/* Final Cart refinement: focused checkout chrome, not a promotional banner. */
@media (max-width: 767px) {
  /* Cart is a task screen: a compact guest action prevents header crowding. */
  body.app-page--cart .ore-app-header__join { display:none; }

  body.app-page--cart .cart-hero#page-header {
    isolation: isolate;
    min-height: 0;
    margin: 12px 16px 0;
    padding: 19px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 22px;
    background: linear-gradient(145deg, #073c2c 0%, #075a3d 100%);
    box-shadow: 0 13px 28px rgba(4, 45, 30, .2);
  }
  body.app-page--cart .cart-hero#page-header::after {
    content: '';
    display: block;
    position: absolute;
    z-index: -1;
    top: 0;
    right: 0;
    width: 74px;
    height: 4px;
    border-radius: 0 22px 0 8px;
    background: #ff7000;
  }
  body.app-page--cart .cart-hero#page-header .container { min-height: 0; gap: 15px; }
  body.app-page--cart .cart-hero__copy { max-width: 260px; }
  body.app-page--cart .cart-hero .page-header-eyebrow { color: rgba(255,255,255,.7); font-size: 8.5px; }
  body.app-page--cart .cart-hero h1 { margin: 6px 0 4px; color: #fff; font-size: 26px; letter-spacing: -.06em; }
  body.app-page--cart .cart-hero p { max-width: 240px; color: rgba(255,255,255,.78); font-size: 11px; line-height: 1.45; }
  body.app-page--cart .cart-hero__status {
    min-height: 48px;
    padding: 7px;
    border-color: rgba(255,255,255,.16);
    border-radius: 15px;
    background: rgba(255,255,255,.1);
    color: #fff;
    backdrop-filter: none;
    box-shadow: none;
  }
  body.app-page--cart .cart-hero__status-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 11px; background: #0b4a36; }
  body.app-page--cart .cart-hero__status-icon svg { width: 16px; height: 16px; }
  body.app-page--cart #cartHeroItemCount { color: rgba(255,255,255,.9); font-size: 10.5px; }
  body.app-page--cart .cart-hero__status a { min-height: 33px; border: 1px solid rgba(255,255,255,.22); background: #fff; color: #0b4a36; font-size: 9px; box-shadow: 0 3px 8px rgba(7,70,48,.16); }
  body.app-page--cart .cart-page-container { padding-top: 14px; }
}

/* Cart uses the exact same guest controls as the Index app header. */
@media (max-width: 767px) {
  body.app-page--cart .ore-app-header__join { display:inline-flex; }
}
