/**
 * Online Ordering – item and cart display styles
 * Theme: --ordering-theme set by ordering-config.js
 */

/* Prevent horizontal scroll. Only html clips; body must not have overflow so sidebar sticky works */
html.ordering-page {
  overflow-x: clip;
}

/* #extras modal: keep sticky top bar, categories, cart visible (no flicker). Class is added in show.bs.modal before Bootstrap sets overflow. */
body.modal-open.ordering-extras-modal-open {
  overflow: visible !important;
}

.ordering-topbar { }

/* Themed primary buttons (profile, orders, etc. – uses --ordering-theme from ordering_theme_inline or ordering-config.js) */
.btn.ordering-theme,
.ordering-theme.btn {
  background: var(--ordering-theme, #2563eb) !important;
  border-color: var(--ordering-theme, #2563eb);
  color: #fff !important;
}
.btn.ordering-theme:hover,
.ordering-theme.btn:hover {
  background: var(--ordering-theme-dark, #1d4ed8) !important;
  border-color: var(--ordering-theme-dark, #1d4ed8);
  color: #fff !important;
}

/* Top bar: keep height consistent (menu icon must stay inside bar after removing default user block) */
body.ordering-page .section-header .header-main,
body.ordering-checkout-page .section-header .header-main {
  min-height: 67px;
}
body.ordering-page .section-header .header-main .row.align-items-center,
body.ordering-checkout-page .section-header .header-main .row.align-items-center {
  min-height: 67px;
}

/* Order type: Pickup / Delivery (above cart on desktop, below categories + fixed on mobile) */
.ordering-order-type-wrap .ordering-order-type-btn.active,
.ordering-order-type-wrap .ordering-order-type-btn.btn-primary {
  background: var(--ordering-theme, #2563eb) !important;
  border-color: var(--ordering-theme, #2563eb) !important;
  color: #fff !important;
}
.ordering-order-type-wrap .ordering-order-type-btn.btn-outline-secondary {
  background: #fff;
  border-color: #dee2e6;
  color: #6c757d;
}

/* Mobile: hide order type + delivery below categories; use footer icon + drawer only */
@media (max-width: 767px) {
  .ordering-order-type-mobile-wrap,
  .ordering-delivery-address-mobile {
    display: none !important;
  }
}
.ordering-order-type-mobile-wrap {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 10px 12px;
}
.ordering-order-type-mobile-inner .ordering-order-type-btn.active,
.ordering-order-type-mobile-inner .ordering-order-type-btn.btn-primary {
  background: var(--ordering-theme, #2563eb) !important;
  border-color: var(--ordering-theme, #2563eb) !important;
  color: #fff !important;
}
.ordering-order-type-mobile-inner .ordering-order-type-btn.btn-outline-secondary {
  border-color: var(--ordering-theme, #2563eb);
  color: var(--ordering-theme, #2563eb);
}

/* Delivery address (Phase 2): theme on buttons */
.ordering-delivery-address-wrap .ordering-use-location-btn,
.ordering-delivery-address-wrap .ordering-use-location-btn.ordering-theme {
  background: var(--ordering-theme, #2563eb) !important;
  border-color: var(--ordering-theme, #2563eb);
  color: #fff;
}
.ordering-delivery-address-wrap .ordering-use-location-btn:hover {
  filter: brightness(0.95);
  color: #fff;
}
.ordering-delivery-address-wrap .ordering-delivery-address-change,
.ordering-delivery-address-wrap .ordering-delivery-address-change.ordering-theme-outline {
  border-color: var(--ordering-theme, #2563eb);
  color: var(--ordering-theme, #2563eb);
}
.ordering-delivery-address-wrap .ordering-delivery-address-change:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: var(--ordering-theme, #2563eb);
  color: var(--ordering-theme, #2563eb);
}
.ordering-delivery-address-mobile {
  padding: 10px 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
/* Delivery address below categories: never show in main content (desktop = use sidebar; mobile = use order-type sheet) */
.ordering-delivery-address-mobile,
.ordering-delivery-address-mobile.ordering-delivery-visible {
  display: none !important;
}

/* Bottom nav cart icon: use theme color (match items page on checkout too) */
.ordering-nav-cart-circle {
  background: var(--ordering-theme, #2563eb) !important;
}

/* Store locator: keep top bar visible on all viewports and apply theme */
body.ordering-store-locator .section-header {
  display: block !important;
}
body.ordering-store-locator .section-header .header-main {
  background: var(--ordering-theme, #2563eb) !important;
  color: #fff;
}
body.ordering-store-locator .section-header .header-main a,
body.ordering-store-locator .section-header .header-main .widget-header {
  color: #fff !important;
}
body.ordering-store-locator .section-header .header-main a:hover {
  color: rgba(255,255,255,0.9) !important;
}
body.ordering-store-locator .section-header .header-main .dropdown-toggle,
body.ordering-store-locator .section-header .header-main .text-dark {
  color: #fff !important;
}

/* Items page: apply theme to top bar on desktop (mobile uses ordering-mobile-top-bar which gets theme from config) */
body.ordering-page .section-header .header-main {
  background: var(--ordering-theme, #2563eb) !important;
  color: #fff;
}
body.ordering-page .section-header .header-main a,
body.ordering-page .section-header .header-main .widget-header {
  color: #fff !important;
}
body.ordering-page .section-header .header-main a:hover {
  color: rgba(255,255,255,0.9) !important;
}
body.ordering-page .section-header .header-main .dropdown-toggle,
body.ordering-page .section-header .header-main .text-dark {
  color: #fff !important;
}

/* Checkout: apply theme to top bar and bottom nav (same look as items page) */
body.ordering-checkout-page .section-header .header-main {
  background: var(--ordering-theme, #2563eb) !important;
  color: #fff;
}
body.ordering-checkout-page .section-header .header-main a,
body.ordering-checkout-page .section-header .header-main .widget-header {
  color: #fff !important;
}
body.ordering-checkout-page .section-header .header-main a:hover {
  color: rgba(255,255,255,0.9) !important;
}
body.ordering-checkout-page .section-header .header-main .dropdown-toggle,
body.ordering-checkout-page .section-header .header-main .text-dark {
  color: #fff !important;
}
body.ordering-checkout-page .osahan-menu-fotter .ordering-nav-cart-circle {
  background: var(--ordering-theme, #2563eb) !important;
}
body.ordering-checkout-page .osahan-menu-fotter .col.selected {
  background: transparent !important;
}
body.ordering-checkout-page .osahan-menu-fotter .col.selected a {
  background: transparent !important;
  color: var(--ordering-theme, #2563eb) !important;
}

/* Checkout mobile: keep top bar visible (template hides .section-header on mobile by default) so theme applies */
@media (max-width: 768px) {
  body.ordering-checkout-page .section-header {
    display: block !important;
  }
}

/* Right-side cart: hide on mobile only on items page (cart opens as drawer/overlay there). On checkout page keep cart visible. */
@media (max-width: 767px) {
  body.ordering-page:not(.ordering-checkout-page) .ordering-cart-col {
    display: none !important;
  }
}

/* Top bar user dropdown (Profile, Orders, Logout): header forces white text – keep menu readable */
#ordering-topbar-user-dropdown .dropdown-menu {
  background: #fff !important;
  color: #212529 !important;
}
#ordering-topbar-user-dropdown .dropdown-menu .dropdown-item {
  color: #212529 !important;
}
#ordering-topbar-user-dropdown .dropdown-menu .dropdown-item:hover {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

/* Top bar search: keep input and dropdown readable (header uses color:#fff so we override) */
#ordering-item-search-wrap .input-group,
#ordering-item-search-wrap .form-control {
  background: rgba(255,255,255,0.95) !important;
  color: #212529 !important;
}
#ordering-item-search-wrap .input-group-text {
  background: rgba(255,255,255,0.95) !important;
  color: #495057 !important;
}
#ordering-item-search-wrap .form-control::placeholder {
  color: #6c757d;
}

/* Item search dropdown – show below input */
#ordering-item-search-results,
#ordering-item-search-results-mobile {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    z-index: 1050;
    background: #fff !important;
    color: #212529 !important;
}
#ordering-item-search-results .ordering-search-result,
#ordering-item-search-results-mobile .ordering-search-result {
  color: #212529 !important;
}
.ordering-search-result:hover {
    background-color: rgba(0,0,0,0.04);
}
.ordering-cart-btn,
.ordering-add-to-cart-btn { }

.ordering-items-style-1 .ordering-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.ordering-items-style-1 .ordering-item {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.ordering-items-style-1 .ordering-item-image {
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0 center/cover no-repeat;
}
.ordering-items-style-1 .ordering-item-body { padding: 12px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ordering-items-style-1 .ordering-item-name { font-weight: 600; font-size: 0.95rem; color: #212121; }
.ordering-items-style-1 .ordering-item-price { color: var(--ordering-theme, #2563eb); font-weight: 700; }
.ordering-items-style-1 .ordering-item .ordering-add-to-cart-btn { margin-top: 8px; width: 100%; padding: 8px 12px; border: none; border-radius: 8px; color: #fff; font-weight: 600; cursor: pointer; }

.ordering-items-style-2 .ordering-items { display: flex; flex-direction: column; gap: 8px; }
.ordering-items-style-2 .ordering-item {
  display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 8px 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.ordering-items-style-2 .ordering-item-image { width: 64px; height: 64px; flex-shrink: 0; border-radius: 8px; background: #f0f0f0 center/cover no-repeat; }
/* Style 2 list rows: description + larger image when description present */
#ordering-menu-style2 .menu-list.style2-item-row { align-items: flex-start; }
#ordering-menu-style2 .menu-list.style2-item-row .style2-item-img {
  width: 72px; height: 72px; min-width: 72px; min-height: 72px; object-fit: cover; border-radius: 8px;
}
.ordering-items-style-2 .ordering-item-body { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ordering-items-style-2 .ordering-item-name { font-weight: 600; font-size: 0.95rem; color: #212121; }
.ordering-items-style-2 .ordering-item-price { color: var(--ordering-theme, #2563eb); font-weight: 700; }
.ordering-items-style-2 .ordering-item .ordering-add-to-cart-btn { padding: 8px 16px; border: none; border-radius: 8px; color: #fff; font-weight: 600; cursor: pointer; flex-shrink: 0; }

/* Mobile: Order type sheet – same right-side drawer as cart */
.mobile-order-type-sheet .mobile-cart-panel-content {
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 360px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-order-type-sheet.open .mobile-cart-panel-content {
  transform: translateX(0);
}
.mobile-order-type-sheet .mobile-cart-body {
  flex: 1;
  min-height: 120px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cart style (drawer vs overlay) applies to MOBILE only - for ordering-demo.html.
   home.php uses mobile-cart-sheet (drawer) or mobile-cart-overlay per config. */
@media (max-width: 768px) {
  body.ordering-cart-style-1 aside.ordering-cart {
    position: fixed; top: 0; right: 0; width: 320px; max-width: 95vw; height: 100vh; background: #fff; box-shadow: -4px 0 20px rgba(0,0,0,0.1); z-index: 1000; display: flex; flex-direction: column; transition: transform 0.3s ease;
  }
  body.ordering-cart-style-1 aside.ordering-cart .ordering-cart-header { padding: 16px; border-bottom: 1px solid #eee; display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
  body.ordering-cart-style-1 aside.ordering-cart .ordering-cart-body { flex: 1; overflow-y: auto; padding: 16px; }
  body.ordering-cart-style-1 aside.ordering-cart .ordering-cart-footer { padding: 16px; border-top: 1px solid #eee; }
  body.ordering-cart-style-1 aside.ordering-cart .ordering-add-to-cart-btn { width: 100%; padding: 12px; border: none; border-radius: 8px; color: #fff; font-weight: 700; cursor: pointer; }

  body.ordering-cart-style-2 aside.ordering-cart {
    position: fixed; bottom: 0; left: 0; right: 0; background: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,0.1); z-index: 1000; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; transition: transform 0.3s ease;
  }
  body.ordering-cart-style-2 aside.ordering-cart .ordering-cart-header,
  body.ordering-cart-style-2 aside.ordering-cart .ordering-cart-body { display: none; }
  body.ordering-cart-style-2 aside.ordering-cart .ordering-cart-footer { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0; }
  body.ordering-cart-style-2 aside.ordering-cart .ordering-cart-summary { font-weight: 600; font-size: 1rem; }
  body.ordering-cart-style-2 aside.ordering-cart .ordering-add-to-cart-btn { padding: 12px 24px; border: none; border-radius: 8px; color: #fff; font-weight: 700; cursor: pointer; flex-shrink: 0; }

  body.ordering-cart-hidden.ordering-cart-style-1 aside.ordering-cart { transform: translateX(100%); }
  body.ordering-cart-hidden.ordering-cart-style-2 aside.ordering-cart { transform: translateY(100%); }
  body:not(.ordering-cart-hidden) aside.ordering-cart { transform: none; }
}

/* ========== Style 3 (Most sales layout) – match static content ========== */
/* Mobile: 1 item per row (static Most sales uses col-md-4 which stacks on mobile) */
@media (max-width: 767px) {
  body.ordering-items-style-3 #ordering-menu-style3 .item-card,
  body.ordering-items-style-3 #ordering-menu-style3 .row > [class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}
/* Image size: match static Most sales (130×140) – template .list-card.d-flex applies; ensure no override */
body.ordering-items-style-3 #ordering-menu-style3 .list-card.d-flex .list-card-image {
  width: 130px;
  height: 140px;
  min-width: 130px;
  max-width: 130px;
  flex-shrink: 0;
}
body.ordering-items-style-3 #ordering-menu-style3 .list-card.d-flex .list-card-image .item-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}
/* Vertical alignment: center content block, fix item name display */
body.ordering-items-style-3 #ordering-menu-style3 .list-card .p-3 {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
body.ordering-items-style-3 #ordering-menu-style3 .list-card-body h6 {
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}
body.ordering-items-style-3 #ordering-menu-style3 .list-card-body .text-gray {
  white-space: normal;
}
body.ordering-items-style-3 #ordering-menu-style3 .ordering-style3-price-badge {
  background: var(--ordering-theme, #2563eb);
  color: #fff;
  font-weight: 700;
}
body.ordering-items-style-3 #ordering-menu-style3 .ordering-style3-promo-badge {
  background: var(--ordering-theme, #2563eb);
  color: #fff;
  font-weight: 700;
}

/* Extras modal: item description +1px font */
#extras-modal-desc {
  font-size: calc(0.875em + 1px) !important;
}

/* Required modifier group validation: red highlight and in-group error message */
.modifier-group.ordering-modifier-group-error {
  border: 1px solid var(--bs-danger, #dc3545);
  border-radius: 6px;
  padding: 10px 12px;
  background-color: rgba(220, 53, 69, 0.04);
}
.modifier-group.ordering-modifier-group-error .modifier-group-title {
  color: var(--bs-danger, #dc3545);
}
.ordering-group-error {
  font-weight: 500;
}

/* Sticky area always on top during scroll (but below header so search dropdown shows) */
.ordering-sticky-mobile {
  z-index: 1001 !important;
}

/* Header above sticky categories so desktop search dropdown appears in front (laptop only) */
@media (min-width: 993px) {
  body.ordering-page .section-header {
    z-index: 1020;
  }
}

/* CSS-First scroll: browser handles offset via scroll-margin (stable, avoids race with Slick/sticky) */
html {
  scroll-behavior: smooth !important;
}
.menu-section,
.menu-section-style2,
.menu-section-style3,
.ordering-subcat-bar,
[id^="section-"][id*="-sub-"],
[id^="section-style2-"][id*="-sub-"],
[id^="section-style3-"][id*="-sub-"] {
  scroll-margin-top: 180px !important;
}
@media (max-width: 992px) {
  .menu-section,
  .menu-section-style2,
  .menu-section-style3,
  .ordering-subcat-bar,
  [id^="section-"][id*="-sub-"],
  [id^="section-style2-"][id*="-sub-"],
  [id^="section-style3-"][id*="-sub-"] {
    scroll-margin-top: 240px !important;
  }
}

/* home.php: show only one item style + one cart based on config */
body.ordering-items-style-1 #style-2-section,
body.ordering-items-style-1 #style-3-section { display: none !important; }
body.ordering-items-style-2 #style-1-section,
body.ordering-items-style-2 #style-3-section { display: none !important; }
body.ordering-items-style-3 #style-1-section,
body.ordering-items-style-3 #style-2-section { display: none !important; }

/* Item unavailable (time-based availability) - visible but inactive */
.ordering-item-unavailable {
  opacity: 0.7;
}
.ordering-item-unavailable .list-card,
.ordering-item-unavailable.menu-list {
  filter: grayscale(40%);
}
.ordering-item-unavailable a.disabled {
  pointer-events: none;
  cursor: not-allowed;
}

/* Read more link – tooltip on hover shows full description */
a.ordering-read-more { text-decoration: none; cursor: help; }
a.ordering-read-more:hover { text-decoration: underline; }
/* Custom tooltip with larger font (replaces native title) */
.ordering-read-more-wrap { position: relative; display: inline; }
.ordering-read-more-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  max-width: 280px;
  padding: 8px 10px;
  font-size: 15px !important;
  line-height: 1.4;
  color: #212529;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  white-space: normal;
  word-wrap: break-word;
}
/* Inline tooltip hidden – we use JS floating tooltip appended to body to avoid overflow clipping */
.ordering-read-more-tooltip { display: none !important; }

/* Style 1: description text in 2 lines (line-clamp on span only), Read more outside clamp so always visible */
body.ordering-items-style-1 .list-card-body p.ordering-item-desc,
body.ordering-items-style-1 #ordering-menu-content .list-card-body p.text-gray.ordering-item-desc {
  overflow: visible !important;
  white-space: normal !important;
}
body.ordering-items-style-1 .ordering-desc-clamp {
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}
body.ordering-items-style-1 .ordering-read-more-wrap {
  display: inline !important;
}
/* Item description font size: +1px in all styles */
body.ordering-items-style-1 .list-card-body p.ordering-item-desc,
body.ordering-items-style-1 #ordering-menu-content .list-card-body p.text-gray.ordering-item-desc,
#ordering-menu-style2 .menu-list.style2-item-row .text-muted.small,
body.ordering-items-style-3 #ordering-menu-style3 .list-card-body p.text-gray.small {
  font-size: calc(0.875em + 1px) !important;
}

/* Laptop/large screen: cart in right sidebar sticky when scrolling */
@media (min-width: 768px) {
    .ordering-cart-col .osahan-cart-item.sticky_sidebar {
        position: -webkit-sticky !important;
        position: sticky !important;
        top: 200px !important;
        max-height: calc(100vh - 220px);
        display: flex;
        flex-direction: column;
    }
    .ordering-cart-col .osahan-cart-item.sticky_sidebar > * {
        flex-shrink: 0;
    }
    .ordering-cart-col .osahan-cart-item.sticky_sidebar > .ordering-cart {
        flex: 1;
        flex-shrink: 1;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Checkout page: cart sidebar – less gap above, taller cart, more rows visible in items list */
@media (min-width: 768px) {
    body.ordering-checkout-page .ordering-cart-col .osahan-cart-item.sticky_sidebar {
        top: 90px;
        max-height: calc(100vh - 110px);
    }
    body.ordering-checkout-page .osahan-cart-item.sticky_sidebar .ordering-cart {
        max-height: none;
        min-height: 180px;
    }
}

/* ========== Full-screen ad modal (first visit) ========== */
.ordering-fullscreen-ad-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: ordering-fs-fadeIn 0.2s ease;
}
.ordering-fullscreen-ad-overlay.ordering-fullscreen-ad-closing {
  animation: ordering-fs-fadeOut 0.2s ease forwards;
}
@keyframes ordering-fs-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ordering-fs-fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
.ordering-fullscreen-ad-modal {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ordering-fullscreen-ad-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s;
}
.ordering-fullscreen-ad-close:hover {
  background: rgba(255, 255, 255, 0.35);
}
.ordering-fullscreen-ad-link {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 80px);
}
.ordering-fullscreen-ad-link img {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ========== Checkout toast (replaces alert for validation/errors) ========== */
.ordering-checkout-toast {
  animation: ordering-toast-in 0.25s ease;
}
@keyframes ordering-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ========== Clover card fields – compact, match form-control size ========== */
.clover-element-container {
  min-height: 38px;
  max-height: 42px;
  height: 38px;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: #fff;
  transition: border-color 0.15s ease-in-out;
}
.clover-element-container:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Sidebar nav: store logo + name in full-width bar */
.ordering-nav-brand-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  margin: -16px -16px 8px -16px;
  box-sizing: border-box;
  background: #212529;
  color: #fff;
}
.hc-offcanvas-nav .nav-wrapper-0 > .nav-content,
.hc-offcanvas-nav .nav-wrapper[data-level="0"] .nav-content {
  padding-top: 0;
}
.ordering-nav-brand-bar .ordering-nav-brand-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  flex-shrink: 0;
}
.ordering-nav-brand-bar h2 {
  margin: 0;
  padding: 0;
  background: transparent !important;
  font-size: 1rem;
  font-weight: 600;
  color: inherit;
}

/* Subcategory bar: parent name + child pills (restaurant-style) */
.ordering-subcat-bar {
  background: var(--ordering-theme, #0d6efd) !important;
}
.ordering-subcat-parent-name {
  font-size: 1rem !important;
  letter-spacing: 0.02em;
}


/* Subcategory section: wrapper + heading (no repeated bar) – scroll target id on wrapper */
.ordering-subcat-section {
  scroll-margin-top: 180px;
}
@media (max-width: 992px) {
  .ordering-subcat-section {
    scroll-margin-top: 220px;
  }
}
.ordering-subcat-heading {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
/* Parent name + arrow in section heading (e.g. "Pizza › Vegetarian Pizza") */
.ordering-subcat-heading-parent {
  font-weight: 500;
  margin-right: 0.15rem;
}
.ordering-subcat-heading-sep {
  margin: 0 0.2rem;
  opacity: 0.85;
}

/* Subcategory section headers before items – larger font (legacy) */
.ordering-subcat-header {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
}
.ordering-subcat-bar .ordering-subcat-pill {
  white-space: nowrap;
}
.ordering-subcat-bar .ordering-subcat-pill.active {
  background-color: #fff !important;
  color: #212529 !important;
  border-color: #fff !important;
  font-weight: 600;
}
/* Drill-down row 2: sub-sub pills (shown when a row-1 sub has children) */
.ordering-subcat-row2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.ordering-subcat-row2 .ordering-subcat-pill {
  white-space: nowrap;
}
/* Mobile: horizontal scroll on whole bar (parent + pills), not just pills */
@media (max-width: 576px) {
  .ordering-subcat-bar {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .ordering-subcat-bar .ordering-subcat-row1 {
    flex-wrap: nowrap !important;
    min-width: min-content;
  }
  .ordering-subcat-bar .ordering-subcat-parent-name,
  .ordering-subcat-bar .ordering-subcat-pill {
    flex-shrink: 0 !important;
  }
  .ordering-subcat-row2 {
    flex-wrap: nowrap;
    min-width: min-content;
  }
}

/* Floating "current section" indicator – fixed pill at left bottom (above footer nav on mobile) */
.ordering-floating-section-pill {
  display: none;
  position: fixed;
  left: 1rem;
  bottom: 1.25rem;
  z-index: 1020;
  padding: 0.5rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #fff;
  background: var(--ordering-theme, #2563eb);
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}
body.ordering-page .ordering-floating-section-pill {
  display: none; /* JS shows when content set */
}
/* Mobile: sit above the bottom footer/nav icon bar so pill stays visible */
@media (max-width: 767px) {
  .ordering-floating-section-pill {
    left: 0.5rem;
    bottom: 4.5rem; /* above typical bottom nav (~56–60px) */
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
    max-width: 160px;
  }
}
@media (max-width: 576px) {
  .ordering-floating-section-pill {
    left: 0.4rem;
    bottom: 4.25rem;
    max-width: 140px;
  }
}

/* Checkout page: show footer on tablet (template hides it on viewports ≤992px) */
@media (min-width: 768px) and (max-width: 992px) {
  body.ordering-checkout-page footer.section-footer.border-top.bg-dark {
    display: block !important;
  }
}

/* Mobile: hide black copyright footer so only the bottom nav bar is visible */
@media (max-width: 767px) {
  footer.section-footer.border-top.bg-dark {
    display: none !important;
  }
}

/* Checkout: ensure bottom content (footer, etc.) is visible – allow full page scroll */
body.ordering-checkout-page {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
}
html body.ordering-checkout-page {
  height: auto !important;
}

/* Extras modal: Your Selections row (full width, bold, theme color) */
.extras-modal-selections-wrap {
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-weight: 700;
  color: var(--ordering-theme, #2563eb);
}
#extras-modal-selections {
  display: inline;
}

/* Top bar: cart icon + count — badge sits top-right outside icon (no overlap) */
.ordering-topbar-cart-link {
  position: relative;
  padding: 4px 10px 4px 4px;
}
.ordering-topbar-cart-inner {
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
}
.ordering-topbar-cart-icon {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 1.5rem;
  line-height: 1;
}
.ordering-topbar-cart-badge {
  top: -4px;
  right: -8px;
  left: auto !important;
  bottom: auto !important;
  min-width: 1.125rem;
  min-height: 1.125rem;
  height: auto;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.1;
  padding: 2px 5px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 2px #fff;
  align-items: center;
  justify-content: center;
}

/* Top bar: store phone (large, theme color) — shown when store API returns phone */
.ordering-topbar-store-phone {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ordering-theme, #2563eb);
  white-space: nowrap;
}
.ordering-topbar-store-phone:hover {
  color: var(--ordering-theme-dark, #1d4ed8);
  text-decoration: underline !important;
}
@media (max-width: 991px) {
  .ordering-topbar-store-phone {
    font-size: 1.1rem;
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Modifier rows: pointer cursor and full-row click (add/select) */
#extras-modal-body .modifier-row {
  cursor: pointer;
}

/* Half-and-half (Allow Cut and Modify): portion + add/qty in one actions block */
.modifier-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.modifier-row-actions .modifier-add-or-qty {
  margin-left: auto;
}
.modifier-portion-controls {
  display: inline-flex;
  gap: 4px;
  align-items: stretch;
}
.modifier-portion-controls .portion-btn {
  min-width: 32px;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.modifier-portion-controls .portion-btn.active {
  font-weight: 700;
}
/* Mobile: two-row layout so slice buttons and qty/add don't collide */
@media (max-width: 576px) {
  .modifier-portion-controls .portion-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 1.15rem;
  }
  .modifier-row.modifier-qty-row.modifier-row-has-portion {
    flex-wrap: wrap;
  }
  .modifier-row.modifier-qty-row.modifier-row-has-portion .modifier-label {
    flex: 1 1 100%;
    margin-bottom: 0.35rem;
  }
  .modifier-row.modifier-qty-row.modifier-row-has-portion .modifier-row-actions {
    flex: 1 1 100%;
    justify-content: space-between;
    margin-left: 0;
    min-height: 44px;
  }
  .modifier-row.modifier-qty-row.modifier-row-has-portion .modifier-row-actions .modifier-add-or-qty {
    margin-left: 0;
  }
}

/* Cart: portion label (Left half / Right half / Whole) next to modifier name */
.ordering-cart-portion {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--ordering-theme, #2563eb);
  white-space: nowrap;
}

/* Create account: phone field (intl-tel-input) full width */
#ordering-register-form-wrap .ordering-register-phone-wrap,
#ordering-register-form-wrap .ordering-register-phone-wrap .iti {
  width: 100% !important;
  display: block;
}
#ordering-register-form-wrap .ordering-register-phone-wrap .iti input[type="tel"] {
  width: 100% !important;
  box-sizing: border-box;
}

/* Checkout: phone field (intl-tel-input) full width */
.checkout-phone-wrap,
.checkout-phone-wrap .iti {
  width: 100% !important;
  display: block;
}
.checkout-phone-wrap .iti input[type="tel"] {
  width: 100% !important;
  box-sizing: border-box;
}

/* Mobile drawer: "Often ordered with" upsell block */
.ordering-drawer-upsell {
  margin: 0;
}
.ordering-drawer-upsell-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.ordering-drawer-upsell-item {
  flex: 1 1 100%;
  min-width: 0;
  padding-right: 2rem;
}
.ordering-drawer-upsell-remove-corner {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  margin: 0;
  z-index: 1;
}
.ordering-drawer-upsell-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.ordering-drawer-upsell-item .btn {
  flex-shrink: 0;
}
