* {
  box-sizing: border-box;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

html, body {
  height: 100%;
}

:root {
  --bg: #0f1419;
  --surface: #1a2332;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
  --accent-hover: #79b8ff;
  --success: #3fb950;
  --error: #f85149;
  --radius: 12px;
  /* Safe area for notched devices (iPhone X+, Android) */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  /* Minimum touch target (44px Apple / 48dp Material) */
  --touch-min: 44px;
  /* Menu item unit price */
  --item-price-color: #f59e0b;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
}

.container {
  width: 100%;
  max-width: 420px;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 1rem 1rem max(1rem, var(--safe-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

/* App banner – full width of container; bleed past horizontal padding */
.app-banner-wrap {
  width: calc(100% + 2rem);
  max-width: none;
  margin-left: -1rem;
  margin-right: -1rem;
  flex-shrink: 0;
  overflow: hidden;
  display: block;
  background: linear-gradient(180deg, #0a0e12 0%, #111922 100%);
}
.app-banner {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* Scroll starts here – company + brand headers stay fixed at top */
.scroll-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Reserve space above fixed proceed bar when it is visible */
body.proceed-bar-visible .scroll-content {
  padding-bottom: 72px;
}

/* Menu: category + sub-category stay fixed; only items list scrolls */
#items-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

#items-section .category-tabs,
#items-section .sub-category-tabs {
  flex-shrink: 0;
}

.items-scroll-wrap {
  flex: 1;
  min-height: 100;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative; /* anchor hover image previews to items area */
}

/* Form views (OTP, success) get their own scroll when visible */
.form-views {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

header {
  text-align: center;
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}

.menu-back {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.menu-back:hover {
  color: var(--accent-hover);
}

.menu-back-row {
  padding: 0.35rem 0.75rem 0.5rem;
  flex-shrink: 0;
}

.receipt-saved-body {
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
  color: var(--text);
  max-height: 55dvh;
  overflow-y: auto;
  margin: 0.5rem 0 0.75rem;
}

.receipt-saved-body .r-line {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

.receipt-saved-body .r-head {
  margin: 0 0 0.4rem;
}

.receipt-saved-body .r-meta {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.success-order-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
  line-height: 1.35;
}

.customer-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.12rem;
  margin-left: 0.2rem;
  vertical-align: baseline;
}

.customer-type-dot {
  font-size: 0.75em;
  line-height: 1;
}

.customer-type-letter {
  font-weight: 700;
  font-size: 1.1em;
  line-height: 1;
}

.customer-type-new .customer-type-letter {
  color: #3b82f6;
}

.customer-type-returning .customer-type-letter {
  color: #22c55e;
}

.success-order-list {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  text-align: left;
  font-size: 0.9rem;
}

.success-order-list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--surface);
}

.success-order-list .success-item-txt {
  flex: 1;
  min-width: 0;
}

.success-order-list .success-item-total {
  flex-shrink: 0;
  font-weight: 600;
}

.success-order-list .success-item-note {
  width: 100%;
  margin: 0;
  font-size: 0.82rem;
  color: #fbbf24;
  line-height: 1.3;
}

.success-instructions {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.success-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0 0 0.9rem;
}

.brand-header {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
  color: #e2e8f0;
  width: calc(100% + 2rem);
  max-width: none;
  margin-left: -1rem;
  margin-right: -1rem;
  padding: 0.65rem 1rem;
  border-radius: 0;
  margin-bottom: 0.4rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-left: none;
  border-right: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  text-align: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.store-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: #f4e4bc;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
}

.brand-header .store-address,
.brand-header .store-phone {
  color: rgba(226, 232, 240, 0.85);
  font-size: 0.95rem;
  margin: 0.2rem 0 0;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.35;
}

.store-address-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.45rem;
  width: 100%;
  margin: 0.2rem 0 0;
  text-align: center;
  overflow: hidden;
}

.store-address-row.hidden {
  display: none !important;
}

.brand-header .store-address-row a.store-address-link {
  margin: 0;
  display: inline-block;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
}

.store-distance-label {
  color: #fbbf24;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.store-distance-label--far {
  color: #f85149;
}

.store-distance-label.hidden {
  display: none !important;
}

.brand-header a.store-phone-link {
  display: block;
  width: 100%;
  max-width: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
}

/* Address link: underline + map icon */
.brand-header a.store-address-link {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.brand-header a.store-address-link::before {
  content: '';
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.35em;
  vertical-align: -0.2em;
  background: url('/images/icon-map-pin.svg') no-repeat center / contain;
  opacity: 0.95;
}

.brand-header a.store-phone-link::before {
  content: '';
  display: inline-block;
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.35em;
  vertical-align: -0.2em;
  background: url('/images/icon-phone.svg') no-repeat center / contain;
  opacity: 0.95;
}

.brand-header a.store-address-link:active,
.brand-header a.store-phone-link:active {
  opacity: 0.88;
}

.brand-header a.store-address-link:focus-visible,
.brand-header a.store-phone-link:focus-visible {
  outline: 2px solid #58a6ff;
  outline-offset: 2px;
  border-radius: 4px;
}

.dine-in-table-banner {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
  border-radius: 999px;
  border: 1px solid rgba(46, 160, 67, 0.45);
  background: rgba(46, 160, 67, 0.12);
  color: #1a7f37;
}

.dine-in-table-banner--disabled {
  border-color: rgba(207, 34, 46, 0.35);
  background: rgba(207, 34, 46, 0.08);
  color: #cf222e;
}

header h1:not(.store-name) {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0;
}

.subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0.25rem 0 0;
}

h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--muted);
}

section {
  margin-bottom: 0.6rem;
}

#items-section {
  margin-bottom: 0.35rem;
}

#items-section h2 {
  flex-shrink: 0;
}

.hidden {
  display: none !important;
}

/* Items */
#items-section {
  display: flex;
  flex-direction: column;
}

/* Category tabs – compact for more item space */
.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem 0.35rem;
  padding: 0 0.25rem 0.25rem;
  border-bottom: 2px solid var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface);
}

.category-tabs::-webkit-scrollbar {
  height: 6px;
}

.category-tabs::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.tab-btn {
  flex-shrink: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: visible;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Sub-tabs (e.g. under MEAT: Chicken, Goat/Lamb, Beef, Fish) */
.sub-category-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  overflow-x: auto;
  margin: 0 -0.25rem 0.5rem;
  padding: 0 0.25rem 0.2rem;
  border-bottom: 1px solid var(--surface);
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface);
}

.sub-category-tabs::-webkit-scrollbar {
  height: 5px;
}

.sub-category-tabs::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.sub-category-tabs::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.sub-category-tabs::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.sub-category-tabs .sub-tab-btn {
  padding: 0.45rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
}

#items-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: visible;
}

.category-block {
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius);
  margin-bottom: 0.25rem;
}

.category-block[data-category="Chicken"] {
  background: rgba(255, 220, 150, 0.12);
}

.category-block[data-category="Goat/Lamb"] {
  background: rgba(200, 230, 200, 0.12);
}

.category-block[data-category="Beef"] {
  background: rgba(240, 180, 180, 0.12);
}

.category-block[data-category="Fish"] {
  background: rgba(160, 200, 255, 0.12);
}

.category-block[data-category="Meat"] {
  background: rgba(220, 180, 140, 0.12);
}

.category-block[data-category="Biryani"] {
  background: rgba(255, 220, 180, 0.12);
}

.category-block[data-category="Tandoori Naan"] {
  background: rgba(245, 222, 179, 0.15);
}

.category-block[data-category="Tandoori Seekh Kebab"] {
  background: rgba(210, 180, 140, 0.12);
}

.category-block[data-category="Non-Veg Delight"] {
  background: rgba(255, 200, 180, 0.12);
}

.category-block:not([data-category="Chicken"]):not([data-category="Goat/Lamb"]):not([data-category="Beef"]):not([data-category="Fish"]):not([data-category="Meat"]):not([data-category="Biryani"]):not([data-category="Tandoori Naan"]):not([data-category="Tandoori Seekh Kebab"]):not([data-category="Non-Veg Delight"]) {
  background: rgba(200, 200, 220, 0.1);
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  padding: 0.25rem 0 0.3rem;
  border: none;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.category-header:hover {
  opacity: 0.9;
}

.category-title {
  flex: 1;
}

.category-chevron {
  font-size: 0.75rem;
  opacity: 0.8;
  transition: transform 0.2s ease;
}

.category-block.collapsed .category-chevron {
  transform: rotate(-90deg);
}

.category-block:first-child .category-header {
  padding-top: 0;
}

.category-items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
  transition: max-height 0.25s ease;
  max-height: 2000px;
}

.category-block.collapsed .category-items {
  max-height: 0;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.no-items {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 1rem 0;
}

.item-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid transparent;
}

.item-left {
  flex: 1;
  min-width: 0;
}

.item-instructions-wrap {
  margin-top: 0.35rem;
  text-align: left;
}

.item-instructions-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.15rem 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.item-instructions-plus {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.item-instructions-preview {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: #fbbf24;
  line-height: 1.35;
}

.item-title-row {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  flex-wrap: wrap;
  column-gap: 0.3rem;
}

.item-side {
  width: auto;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.item-side-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  width: 100%;
}

.item-thumb {
  width: 2.4rem;
  height: 2.4rem;
  flex: 0 0 2.4rem;
  border-radius: 10px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.item-thumb-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.item-img-btn {
  flex: 0 0 auto;
  margin-left: 0.3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 8px;
  width: 1.15rem;
  height: 1.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

.item-img-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.item-img-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.item-image-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.item-image-modal.hidden {
  display: none !important;
}

.item-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.item-image-modal-content {
  position: relative;
  max-width: min(92vw, 760px);
  max-height: min(86vh, 860px);
  margin: 6vh auto 0;
  padding: 0.75rem;
  border-radius: 16px;
  background: rgba(15, 20, 25, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.6);
  overflow: auto;
}

.item-image-modal-close {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.3rem;
  line-height: 2rem;
  cursor: pointer;
}

.item-image-modal-title {
  padding-right: 2.2rem;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.item-image-modal-img {
  width: 100%;
  max-height: 52vh;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
}

.item-image-modal-desc {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.3;
}

.item-hover-preview {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.item-hover-preview.hidden {
  display: none !important;
}

.item-hover-preview-backdrop {
  position: absolute;
  inset: 0;
  /* Keep menu visible behind preview */
  background: rgba(0, 0, 0, 0.22);
}

.item-hover-preview-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.item-hover-preview-title {
  max-width: min(92vw, 720px);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: rgba(15, 20, 25, 0.92);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.item-hover-preview-img {
  max-width: min(37vw, 288px);
  max-height: 39vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  background: rgba(15, 20, 25, 0.95);
}

.item-row:focus-within {
  border-color: var(--accent);
}

.item-row.size-required .item-sizes {
  color: var(--error);
}

.item-row.size-required .item-sizes::before {
  content: 'Please Select';
  display: block;
  font-size: 0.62rem;
  margin-bottom: 0.12rem;
}

.item-info {
  flex: 1;
  min-width: 0;
}

.item-left .item-name {
  flex: 0 1 auto;
  min-width: 0;
  font-weight: 500;
  font-size: 0.78rem;
  display: block;
  white-space: normal;
  overflow: visible;
  overflow-wrap: anywhere;
  word-wrap: break-word;
  line-height: 1.28;
}

.item-desc {
  font-size: 0.72rem;
  color: #fbbf24;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Blank band after description, before options */
.item-left > .item-desc {
  margin: 0.05rem 0 0.7rem 0;
}

.item-options {
  width: 100%;
}

.item-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.02rem;
}

.item-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  margin-top: 0.35rem;
}

.item-sizes-sv {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.item-sizes-sv .item-sizes-label {
  display: block;
  font-size: 0.64rem;
  color: var(--text);
  font-weight: 500;
  font-style: italic;
  margin-bottom: 0.1rem;
}

.item-sizes-sv .item-sizes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

/* meat_option: keep Small / Medium / Large on one row */
.item-sizes-meat-option .item-sizes-row {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 0.35rem 0.45rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  white-space: nowrap;
}

.item-sizes-meat-option .size-option {
  flex: 0 0 auto;
  white-space: nowrap;
}

.item-sizes-meat-option .size-option span {
  white-space: nowrap;
}

.size-option {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  color: var(--muted);
  cursor: pointer;
}

.size-option input {
  margin: 0;
  width: auto;
  accent-color: var(--accent);
}

.item-row.size-disabled .item-sizes {
  opacity: 0.5;
  pointer-events: none;
}

.item-row.size-disabled .size-option {
  cursor: not-allowed;
}

.size-option input:disabled {
  cursor: not-allowed;
}

/* legacy selectors (no longer used) */
.item-right,
.item-right-main {
  display: contents;
}

/* compact options block (meat/meat_option/steak_size/spice_ahm, fries, qabeli, steak_type) */
.item-compact-options {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.12rem;
  margin: 0 0 0.35rem 0;
  white-space: nowrap;
  width: 100%;
}

.item-compact-options--wrap {
  flex-wrap: wrap;
  white-space: normal;
}

.item-compact-options--wrap .meat-option-choices {
  flex-wrap: wrap;
  white-space: normal;
}

.item-compact-options .meat-option-note {
  display: none;
  font-size: 0.62rem;
  color: var(--error);
  font-weight: 600;
}

.item-row.size-required .item-compact-options .meat-option-note {
  display: inline;
}

.item-compact-options .meat-option-prefix {
  font-size: 0.62rem;
  color: var(--text);
  font-weight: 500;
  font-style: italic;
  flex: 0 0 auto;
}

.item-compact-options .meat-option-choices {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin-left: 0;
}

.item-compact-options .size-option {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.6rem;
}

.item-compact-options .size-option span {
  white-space: nowrap;
}

.item-price {
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--item-price-color);
  line-height: 1.1;
  white-space: nowrap;
}

.qty-control {
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  border: 1px solid var(--muted);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg);
}

.qty-btn {
  width: 2.25rem;
  height: 2.1rem;
  min-width: 2.25rem;
  min-height: 2.1rem;
  padding: 0;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.qty-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--bg);
}

.qty-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.item-qty {
  width: 2.85rem;
  min-width: 2.5rem;
  min-height: 2.1rem;
  padding: 0 0.15rem;
  text-align: center;
  font-size: 0.92rem;
  line-height: 2.1rem;
  border: none;
  border-left: 1px solid var(--muted);
  border-right: 1px solid var(--muted);
  border-radius: 0;
  background: var(--bg);
  color: var(--text);
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.item-qty:focus {
  outline: none;
}

.item-qty:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.item-row.qty-disabled {
  opacity: 0.7;
}

/* TEST: larger item cards — remove class `item-cards--large` from <body> in index.html to revert */
body.item-cards--large .item-row {
  padding: 0.6rem 0.7rem;
  gap: 0.75rem;
  min-height: 4.75rem;
}

body.item-cards--large .item-thumb {
  width: 3.25rem;
  height: 3.25rem;
  flex: 0 0 3.25rem;
  border-radius: 12px;
}

body.item-cards--large .item-img-btn {
  width: 1.45rem;
  height: 1.45rem;
  margin-left: 0.4rem;
}

body.item-cards--large .item-left .item-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

body.item-cards--large .item-desc {
  font-size: 0.85rem;
  line-height: 1.28;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

body.item-cards--large .item-left > .item-desc {
  margin: 0.15rem 0 0.75rem 0;
}

body.item-cards--large .item-meta {
  font-size: 0.82rem;
}

body.item-cards--large .item-price {
  font-size: 1rem;
}

body.item-cards--large .size-option {
  font-size: 0.78rem;
  gap: 0.28rem;
}

body.item-cards--large .item-sizes-sv .item-sizes-label,
body.item-cards--large .item-compact-options .meat-option-prefix {
  font-size: 0.76rem;
}

body.item-cards--large .item-compact-options .size-option {
  font-size: 0.74rem;
}

body.item-cards--large .qty-btn {
  width: 2.5rem;
  height: 2.35rem;
  min-width: 2.5rem;
  min-height: 2.35rem;
  font-size: 1.05rem;
}

body.item-cards--large .item-qty {
  width: 3.1rem;
  min-width: 2.75rem;
  min-height: 2.35rem;
  line-height: 2.35rem;
  font-size: 1rem;
}

body.item-cards--large .item-side {
  width: 8.25rem;
  flex: 0 0 8.25rem;
}

/* Mobile: stacked card — name/desc/options full width, price + qty on bottom bar */
@media (max-width: 767px) {
  body.item-cards--large .category-items {
    gap: 0.65rem;
  }

  body.item-cards--large .item-row {
    flex-direction: column;
    align-items: stretch;
    padding: 0.9rem 0.85rem;
    gap: 0.55rem;
    min-height: unset;
  }

  body.item-cards--large .item-left {
    width: 100%;
    min-width: 0;
  }

  body.item-cards--large .item-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    flex-wrap: nowrap;
  }

  body.item-cards--large .item-left .item-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 1.08rem;
    font-weight: 650;
    line-height: 1.3;
  }

  body.item-cards--large .item-img-btn {
    flex: 0 0 auto;
    width: 3.35rem;
    height: 3.35rem;
    margin-left: 0;
    border-radius: 10px;
  }

  body.item-cards--large .item-desc {
    font-size: 0.92rem;
    line-height: 1.35;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin-top: 0.2rem;
  }

  body.item-cards--large .item-left > .item-desc {
    margin: 0.25rem 0 0.55rem 0;
  }

  body.item-cards--large .item-compact-options {
    flex-wrap: wrap;
    white-space: normal;
    gap: 0.35rem 0.55rem;
    margin-bottom: 0.45rem;
  }

  body.item-cards--large .item-compact-options .meat-option-choices {
    flex-wrap: wrap;
    white-space: normal;
  }

  body.item-cards--large .item-compact-options .meat-option-prefix {
    font-size: 0.82rem;
  }

  body.item-cards--large .item-compact-options .size-option {
    font-size: 0.8rem;
  }

  body.item-cards--large .item-sizes {
    gap: 0.4rem 0.55rem;
  }

  body.item-cards--large .item-sizes-meat-option .item-sizes-row {
    flex-wrap: wrap !important;
    overflow-x: visible;
    white-space: normal;
  }

  body.item-cards--large .size-option {
    font-size: 0.82rem;
  }

  body.item-cards--large .item-sizes-sv .item-sizes-label {
    font-size: 0.8rem;
  }

  body.item-cards--large .item-side {
    order: 2;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    align-items: stretch;
    margin-top: 0.35rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  body.item-cards--large .item-side-top {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
  }

  body.item-cards--large .item-price {
    font-size: 1.2rem;
    font-weight: 700;
    flex: 0 0 auto;
  }

  body.item-cards--large .qty-control {
    flex: 0 0 auto;
    margin-left: auto;
  }

  body.item-cards--large .qty-btn {
    width: 2.65rem;
    height: 2.5rem;
    min-width: 2.65rem;
    min-height: 2.5rem;
    font-size: 1.1rem;
  }

  body.item-cards--large .item-qty {
    width: 3.2rem;
    min-width: 2.85rem;
    min-height: 2.5rem;
    line-height: 2.5rem;
    font-size: 1.05rem;
  }
}

@media (max-width: 640px) {
  body.item-cards--large .item-left .item-name {
    font-size: 1.05rem;
  }

  body.item-cards--large .item-img-btn {
    width: 3.1rem;
    height: 3.1rem;
  }

  body.item-cards--large .qty-btn {
    width: 2.75rem;
    height: 2.6rem;
    min-width: 2.75rem;
    min-height: 2.6rem;
    font-size: 1.12rem;
  }

  body.item-cards--large .item-qty {
    width: 3.25rem;
    min-height: 2.6rem;
    line-height: 2.6rem;
    font-size: 1.08rem;
  }

  body.item-cards--large .item-price {
    font-size: 1.15rem;
  }
}

/* Fixed proceed bar – shows when cart has items; order details are on the next page */
.proceed-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.6rem 1rem max(0.6rem, var(--safe-bottom)) 1rem;
  background: var(--surface);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  max-width: 420px;
  margin: 0 auto;
  box-sizing: border-box;
}

.proceed-bar-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

.proceed-bar .btn {
  flex-shrink: 0;
}

.cart-size {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: normal;
}

/* Review order section (before Verify mobile) */
#review-order-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Entire review panel scrolls on short screens (list + form) */
.review-order-main-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--surface);
  padding-right: 0.25rem;
  padding-bottom: 0.25rem;
}

.review-order-main-scroll::-webkit-scrollbar {
  width: 6px;
}

.review-order-main-scroll::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 3px;
}

.review-order-main-scroll::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

.review-order-main-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

.preorder-pickup-wrap {
  margin: 0.45rem 0 0.85rem;
}
.preorder-pickup-wrap .label {
  display: block;
  margin-bottom: 0.3rem;
}
#preorder-pickup-date.preorder-pickup-date {
  max-width: 13rem;
}
.success-preorder-pickup {
  margin-top: 0.25rem;
  font-weight: 600;
  color: var(--text);
}

#review-order-section .review-order-list {
  list-style: none;
  padding: 0;
  margin: 0 0 0.35rem;
}

#review-order-section .review-order-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--surface);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  line-height: 1.3;
  font-size: 0.9rem;
}

#review-order-section .review-order-list .cart-row-main {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  width: 100%;
}

#review-order-section .review-item-note {
  margin: 0;
  width: 100%;
  font-size: 0.82rem;
  color: #fbbf24;
  line-height: 1.35;
  text-align: left;
}

#review-order-section .review-order-list .review-item-name {
  text-align: left;
  flex: 1;
  min-width: 0;
}

.item-instructions-popup {
  max-width: min(92vw, 360px);
}

.item-instructions-popup-item {
  margin: 0 0 0.65rem;
}

.item-instructions-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.35;
  resize: vertical;
  min-height: 4.5rem;
}

.item-instructions-textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#review-order-section .review-order-list .review-item-qty {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

#review-order-section .review-order-list .review-item-price {
  text-align: right;
  flex-shrink: 0;
}

#review-order-section .review-order-list .cart-size {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: normal;
}

#review-order-section .total {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.review-order-total-fixed {
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.review-order-title {
  flex-shrink: 0;
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.review-instructions {
  flex-shrink: 0;
  margin-top: 0.35rem;
  margin-bottom: 0;
}

.review-instructions .label {
  margin-bottom: 0.15rem;
  font-size: 0.85rem;
}

.review-instructions textarea {
  width: 100%;
  min-height: 2.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  resize: vertical;
  box-sizing: border-box;
  line-height: 1.3;
}

.review-customer-block {
  flex-shrink: 0;
  margin-top: 0.35rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--surface);
}

.closed-now-message {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--error);
}

.review-customer-block .hint {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.review-field-row {
  display: grid;
  grid-template-columns: 8.75rem minmax(0, 1fr);
  align-items: center;
  column-gap: 0.55rem;
  margin-top: 0.45rem;
}

.review-field-row:first-of-type {
  margin-top: 0.35rem;
}

.review-inline-label {
  margin-bottom: 0;
  font-size: 0.78rem;
  line-height: 1.25;
  justify-self: start;
  align-self: center;
  max-width: 8.75rem;
}

.review-inline-input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
  min-height: var(--touch-min);
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
}

.review-customer-block input[type="text"],
.review-customer-block input[type="tel"] {
  padding: 0.4rem 0.5rem;
  font-size: 0.9rem;
}

.review-customer-block .review-inline-input {
  padding: 0.45rem 0.55rem;
}

.review-customer-block input:disabled,
.review-customer-block textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.review-customer-block .review-form-message {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

.review-order-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-top: 0.6rem;
}

.review-order-actions .btn {
  flex: 1;
  min-width: 0;
}

.review-order-actions--compact {
  margin-top: 0.35rem;
  margin-bottom: 0.35rem;
}

.review-order-actions--compact .btn {
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
}

/* Customer OTP (review order) — centered, compact, responsive */
.customer-otp-block {
  width: 100%;
  max-width: 100%;
  margin-top: 0.45rem;
}

.customer-otp-send-row {
  display: flex;
  justify-content: center;
  margin: 0.35rem 0 0.45rem;
}

.customer-otp-send-btn {
  width: auto;
  min-width: 9.5rem;
  max-width: min(100%, 17rem);
  flex: 0 1 auto;
}

.customer-otp-verify {
  width: 100%;
  max-width: 22rem;
  margin: 0 auto;
  text-align: center;
}

.customer-otp-label {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--muted);
  text-align: center;
}

.customer-otp-label .required {
  color: #c00;
}

.customer-otp-verify-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  justify-content: center;
  width: 100%;
}

.customer-otp-input {
  flex: 1 1 7.5rem;
  min-width: 0;
  max-width: 12rem;
  margin-bottom: 0;
  text-align: center;
  letter-spacing: 0.06em;
}

.customer-otp-verify-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 5.75rem;
  max-width: 8rem;
}

.customer-otp-hint {
  margin: 0.4rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  line-height: 1.35;
}

.customer-otp-hint--success {
  color: var(--success);
  font-weight: 600;
}

.customer-otp-hint--error {
  color: var(--error);
  font-weight: 600;
}

@media (max-width: 420px) {
  .customer-otp-verify-row {
    flex-direction: column;
    align-items: stretch;
  }

  .customer-otp-input {
    max-width: none;
  }

  .customer-otp-verify-btn {
    width: 100%;
    max-width: none;
  }
}

.total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.label .required {
  color: #c00;
}

#special-instructions {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  margin-bottom: 1rem;
}

#review-order-section #special-instructions {
  margin-bottom: 0;
  padding: 0.4rem 0.55rem;
  font-size: 0.9rem;
  min-height: 2.25rem;
}

#special-instructions:focus {
  outline: none;
  border-color: var(--accent);
}

#special-instructions::placeholder {
  color: var(--muted);
}

/* Buttons – minimum touch target for mobile */
.btn {
  width: 100%;
  min-height: var(--touch-min);
  padding: 0.9rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-hover);
}

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--accent);
  pointer-events: none;
}

.btn-compact {
  min-height: 2.5rem;
  padding: 0.55rem 0.85rem;
  font-size: 0.92rem;
  width: auto;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--muted);
}

.btn-secondary:hover, .btn-secondary:focus {
  border-color: var(--accent);
  color: var(--accent);
}

/* OTP section */
input[type="tel"],
input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.1rem;
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  margin-bottom: 0.75rem;
}

#review-order-section .review-inline-input {
  width: 100%;
  max-width: none;
  margin-bottom: 0;
}

input:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 0.9rem;
  color: var(--muted);
  margin: -0.5rem 0 1rem;
}

#otp-hint.customer-otp-hint--success {
  color: var(--success);
  font-weight: 600;
}

#otp-hint.customer-otp-hint--error {
  color: var(--error);
  font-weight: 600;
}

.message {
  margin: 0.4rem 0 0;
  padding: 0.35rem 0;
  font-size: 0.85rem;
}

.message.error {
  color: var(--error);
}

.message.success {
  color: var(--success);
}

/* Success */
#success-section {
  text-align: center;
  padding: 2rem 0;
}

.success-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  background: var(--success);
  color: var(--bg);
  font-size: 2rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

#success-section h2 {
  color: var(--text);
  margin-bottom: 0.5rem;
}

#order-id-msg {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Modal overlays (confirm order, saved receipt) */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.confirm-overlay.hidden {
  display: none !important;
}

.confirm-popup {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.25rem;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.confirm-title {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.confirm-message {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.4;
}

.confirm-direct-store-block {
  margin: 0 0 1rem;
}

.confirm-direct-store-label {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.confirm-direct-store-block .confirm-direct-store-label:not(:first-child) {
  margin-top: 0.55rem;
}

.confirm-direct-store-name {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.confirm-direct-address-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  overflow: hidden;
}

.confirm-direct-address-row .store-distance-label {
  font-size: 0.82rem;
  flex-shrink: 0;
}

a.confirm-direct-store-address {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text);
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(88, 166, 255, 0.14) 0%, rgba(88, 166, 255, 0.06) 100%);
  border: 1px solid rgba(88, 166, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-decoration: none;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-tap-highlight-color: rgba(88, 166, 255, 0.25);
}

a.confirm-direct-store-address:active {
  opacity: 0.92;
}

.confirm-direct-phone-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.55rem 0 0.65rem;
}

.confirm-direct-phone-row.hidden {
  display: none !important;
}

.confirm-direct-phone-inline-label {
  margin: 0;
  text-transform: uppercase;
}

a.confirm-direct-store-phone {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  display: inline;
  padding: 0;
  -webkit-tap-highlight-color: rgba(88, 166, 255, 0.25);
}

a.confirm-direct-store-phone:active {
  opacity: 0.88;
}

.confirm-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.confirm-actions--single {
  justify-content: center;
}

.confirm-actions .btn {
  min-width: 90px;
}

/* ========== Responsive: mobile, tablet, laptop (full page) ========== */

/* Mobile: full width, compact layout for more items on screen */
@media (max-width: 767px) {
  .container {
    max-width: 100%;
  }
  .item-row {
    /* Taller tile (roughly 2x) + bigger typography for mobile */
    padding: 0.75rem 0.75rem;
    gap: 0.75rem;
    align-items: flex-start;
    min-height: 6.1rem;
  }
  .item-thumb-wrap {
    flex-shrink: 0;
  }
  .item-price {
    font-size: 0.98rem;
  }
  .item-left .item-name {
    font-size: 1.02rem;
    font-weight: 650;
    line-height: 1.25;
  }
  .item-desc {
    font-size: 0.86rem;
    line-height: 1.25;
    -webkit-line-clamp: 3;
    line-clamp: 3;
  }
  .item-compact-options .meat-option-prefix {
    font-size: 0.78rem;
  }
  .item-compact-options .size-option {
    font-size: 0.74rem;
  }
  .size-option {
    font-size: 0.76rem;
  }
  .item-side {
    width: 7.6rem;
    flex: 0 0 7.6rem;
  }
  .item-side-top {
    align-items: flex-start;
  }
  #error-message.message {
    margin-top: 0.3rem;
    padding: 0.3rem 0;
    font-size: 0.82rem;
  }
}

/* Tablet – wider content, still contained */
@media (min-width: 768px) {
  .container {
    max-width: 640px;
    padding: 1.25rem 1.5rem max(1.25rem, var(--safe-bottom));
  }
  .brand-header {
    width: calc(100% + 3rem);
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    padding: 0.75rem 1.25rem;
  }
  .store-name {
    font-size: 1.35rem;
  }
  .brand-header .store-address,
  .brand-header .store-phone {
    font-size: 1rem;
  }
  .store-distance-label {
    font-size: 0.95rem;
  }
}

/* Laptop / desktop – full page: use most of viewport width and height, no dead space below button */
@media (min-width: 1024px) {
  html, body {
    height: 100%;
    min-height: 100vh;
  }
  body {
    padding: var(--safe-top) max(var(--safe-right), 1rem) var(--safe-bottom) max(var(--safe-left), 1rem);
  }
  .container {
    max-width: min(1100px, 92vw);
    width: 100%;
    min-height: 100vh;
    max-height: 100vh;
    padding: 1.5rem 2rem max(1rem, var(--safe-bottom));
  }
  .brand-header {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 0.85rem 1.5rem;
  }
  .store-name {
    font-size: 1.5rem;
  }
  .brand-header .store-address,
  .brand-header .store-phone {
    font-size: 1.05rem;
  }
  .store-distance-label {
    font-size: 1rem;
  }
  .proceed-bar {
    max-width: min(1100px, 92vw);
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    width: 100%;
  }
}

/* Touch-friendly: ensure tap targets on mobile */
@media (pointer: coarse) {
  .tab-btn,
  .sub-tab-btn {
    min-width: var(--touch-min);
    min-height: var(--touch-min);
  }
  .qty-btn {
    min-width: 2.25rem;
    min-height: 2.1rem;
  }
  input[type="number"]:not(.item-qty),
  input[type="text"],
  input[type="tel"] {
    min-height: var(--touch-min);
  }
  .item-qty {
    min-height: 2.1rem;
  }
}

/* Narrow phones: keep qty controls large enough to tap */
@media (max-width: 640px) {
  .qty-btn {
    width: 2.35rem;
    height: 2.25rem;
    min-width: 2.35rem;
    min-height: 2.25rem;
    font-size: 1rem;
    font-weight: 600;
  }
  .item-qty {
    width: 2.85rem;
    min-width: 2.65rem;
    min-height: 2.25rem;
    line-height: 2.25rem;
    padding: 0 0.1rem;
    font-size: 0.98rem;
  }
  .item-price {
    font-size: 0.92rem;
  }
}

/* Prevent zoom on focus on iOS – review form inputs */
@media screen and (max-width: 768px) {
  #customer-name,
  #mobile {
    font-size: 16px;
  }
}
