/* ============================================================================
   COLISEO — TIENDA DE PEDIDOS (/pedir)
   Estética gastronómica artesanal: Carmesí Coliseo, Oro Gladiador, Crema Cálido
   ============================================================================ */
:root {
  --bg: #faf6f0;
  --bg-warm: #f3ece1;
  --surface: #ffffff;
  --surface-tint: #fffcf7;
  --border: #e8dfd2;
  --border-strong: #d5c7b4;

  --ink: #171311;
  --ink-secondary: #4a403a;
  --ink-muted: #7c6f66;

  /* Coliseo Brand Palette */
  --crimson: #c81e1e;
  --crimson-deep: #9f1414;
  --crimson-soft: #fef2f2;
  --crimson-border: #fecaca;

  --gold: #d97706;
  --gold-bright: #f59e0b;
  --gold-soft: #fffbeb;
  --gold-border: #fde68a;

  /* WhatsApp / Action Emerald */
  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-soft: #ecfdf5;
  --emerald-border: #a7f3d0;

  --danger: #dc2626;

  --font-display: 'Outfit', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-xs: 0 1px 2px rgba(23, 19, 17, 0.05);
  --shadow-sm: 0 4px 14px rgba(23, 19, 17, 0.07);
  --shadow-md: 0 12px 32px rgba(23, 19, 17, 0.14);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  padding-bottom: 108px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.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;
}

.hidden {
  display: none !important;
}

/* ============================================================================
   BRAND HERO HEADER
   ============================================================================ */
.order-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #161110 0%, #241412 52%, #3a1412 100%);
  color: #fffaf3;
  padding: 0.65rem 0.9rem 0.72rem;
  border-bottom: 3px solid var(--gold-bright);
}

.header-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24) 0%, rgba(200, 30, 30, 0.16) 45%, transparent 72%);
  pointer-events: none;
}

.header-inner,
.step-progress-inner,
.container,
.checkout-inner {
  max-width: 640px;
  margin: 0 auto;
}

.header-brand-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.72rem;
}

.header-logo-frame {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  background: #ffffff;
  padding: 3px;
  border: 2px solid rgba(245, 158, 11, 0.65);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-logo {
  width: 100%;
  height: 100%;
  border-radius: 9px;
  object-fit: contain;
  display: block;
}

.header-brand-text {
  min-width: 0;
  flex: 1;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.header-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 0.12rem 0.48rem;
  border-radius: 999px;
  margin-bottom: 0;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.25);
}

.biz-title {
  font-family: var(--font-display);
  font-size: 1.24rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.08;
  color: #ffffff;
}

.header-tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fca5a5;
  margin-top: 0.1rem;
  line-height: 1.25;
}

.header-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  font-size: 0.66rem;
  font-weight: 600;
  color: rgba(255, 250, 243, 0.88);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.13rem 0.44rem;
  border-radius: 999px;
  white-space: nowrap;
}

/* ============================================================================
   STICKY STEP PROGRESS BAR
   ============================================================================ */
.step-progress-bar {
  position: sticky;
  top: 0;
  z-index: 600;
  background: rgba(250, 246, 240, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0.42rem 0.85rem;
}

.step-progress-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.step-pill {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.42rem 0.55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.step-pill:hover {
  color: var(--ink);
  background: rgba(23, 19, 17, 0.04);
}

.step-pill.active {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.step-pill-num {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--bg-warm);
  color: var(--ink-secondary);
  font-size: 0.7rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.step-pill.active .step-pill-num {
  background: var(--crimson);
  color: #ffffff;
}

.step-pill.done .step-pill-num {
  background: var(--emerald);
  color: #ffffff;
}

.step-pill.done {
  color: var(--ink-secondary);
}

.step-connector {
  width: 16px;
  height: 1.5px;
  background: var(--border-strong);
  flex-shrink: 0;
}

/* ============================================================================
   MAIN CONTAINER & CARDS
   ============================================================================ */
.container {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-xs);
  scroll-margin-top: 64px;
}

.step-head {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.step-head-between {
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.step-head-left {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--crimson) 0%, var(--crimson-deep) 100%);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(200, 30, 30, 0.25);
  margin-top: 1px;
}

.step-head h2 {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.2;
}

.step-subtitle {
  font-size: 0.77rem;
  color: var(--ink-muted);
  margin-top: 0.14rem;
  line-height: 1.35;
}

/* ============================================================================
   MENU SEARCH & HORIZONTAL CATEGORY TABS
   ============================================================================ */
.menu-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.8rem;
}

.menu-search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--ink-muted);
  pointer-events: none;
}

.menu-search-wrap input[type="search"] {
  width: 100%;
  padding: 0.64rem 2.3rem 0.64rem 2.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  font-size: 0.86rem;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.menu-search-wrap input[type="search"]:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(200, 30, 30, 0.1);
}

.menu-search-clear {
  position: absolute;
  right: 0.55rem;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  color: var(--ink-secondary);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cat-tabs-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.1rem 0.05rem 0.65rem;
  margin-bottom: 0.45rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.cat-tabs-strip::-webkit-scrollbar {
  display: none;
}

.cat-tab-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 0.88rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-tint);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cat-tab-chip:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.cat-tab-chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(23, 19, 17, 0.18);
}

.cat-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: var(--crimson);
  color: #ffffff;
}

.cat-tab-chip.active .cat-tab-badge {
  background: var(--gold-bright);
  color: var(--ink);
}

.cat-tab-chip.is-half-tab:not(.active) {
  border-color: var(--gold-border);
  background: #fffbeb;
  color: #92400e;
}

.half-cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1.5px solid #f59e0b;
  background: linear-gradient(135deg, #fffcf3 0%, #fef4e4 100%);
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.08);
}

.half-cta-copy {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.half-cta-copy strong {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
}

.half-cta-copy span {
  font-size: 0.74rem;
  color: var(--ink-secondary);
}

.btn-open-half-tab {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #241412 0%, #161110 100%);
  color: #fde68a;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.44rem 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: filter 0.14s ease, transform 0.1s ease;
}

.btn-open-half-tab:hover {
  filter: brightness(1.12);
}

.btn-open-half-tab:active {
  transform: scale(0.97);
}

/* ============================================================================
   CATALOG ITEMS & CATEGORY SECTIONS
   ============================================================================ */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 1.05rem;
}

.cat-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cat-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.42rem;
  border-bottom: 1.5px solid var(--border);
}

.cat-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.cat-section-accent {
  width: 4px;
  height: 16px;
  border-radius: 99px;
  background: linear-gradient(180deg, var(--crimson) 0%, var(--gold-bright) 100%);
}

.cat-section-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  background: var(--bg-warm);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.catalog-empty {
  text-align: center;
  padding: 2rem 1rem;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1.5px dashed var(--border-strong);
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* Product Card */
.prod-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.9rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-tint);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.prod-row:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.prod-row.has-in-cart {
  background: #ffffff;
  border-color: rgba(200, 30, 30, 0.42);
  box-shadow: 0 3px 14px rgba(200, 30, 30, 0.08);
}

.prod-row.prod-unavailable {
  opacity: 0.58;
  background: #f5f2ed;
}

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

.prod-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.prod-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.prod-in-cart-tag {
  font-size: 0.67rem;
  font-weight: 800;
  color: var(--crimson-deep);
  background: var(--crimson-soft);
  border: 1px solid var(--crimson-border);
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
}

.sold-out-badge {
  display: inline-block;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.prod-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 0.24rem;
  line-height: 1.42;
}

/* Size Selector Pills */
.size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-top: 0.58rem;
}

.size-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--ink-secondary);
  border-radius: 9px;
  padding: 0.28rem 0.58rem;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
  font-variant-numeric: tabular-nums;
}

.size-pill:hover {
  border-color: var(--border-strong);
  color: var(--ink);
}

.size-pill.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.size-pill.has-qty:not(.active) {
  border-color: var(--crimson);
  background: var(--crimson-soft);
  color: var(--crimson-deep);
}

.size-pill-qty {
  background: var(--crimson);
  color: #ffffff;
  font-size: 0.63rem;
  font-weight: 800;
  padding: 0 4px;
  min-width: 15px;
  height: 15px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.size-pill.active .size-pill-qty {
  background: var(--gold-bright);
  color: var(--ink);
}

.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.52rem;
}

.prod-price {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--crimson-deep);
  font-variant-numeric: tabular-nums;
}

.prod-size-hint {
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-weight: 500;
}

/* Add / Quantity Stepper */
.prod-action {
  flex-shrink: 0;
  align-self: center;
}

.btn-quick-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  min-height: 36px;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--crimson);
  background: var(--crimson);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(200, 30, 30, 0.2);
  transition: transform 0.1s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-quick-add:hover:not(:disabled) {
  background: var(--crimson-deep);
  border-color: var(--crimson-deep);
}

.btn-quick-add:active:not(:disabled) {
  transform: scale(0.96);
}

.btn-quick-add:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--ink-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--ink);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 3px 10px rgba(23, 19, 17, 0.18);
  flex-shrink: 0;
}

.step-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, transform 0.1s ease;
}

.step-btn:hover:not(:disabled) {
  background: var(--crimson);
}

.step-btn:active:not(:disabled) {
  transform: scale(0.92);
}

.step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.step-qty {
  min-width: 24px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   HALF & HALF PIZZA BUILDER CARD
   ============================================================================ */
.half-pizza-card {
  border: 1.5px solid #f59e0b;
  background: linear-gradient(155deg, #fffcf3 0%, #fef4e4 100%);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.1);
}

.half-pizza-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.half-pizza-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #92400e;
  background: #fde68a;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  margin-bottom: 0.25rem;
}

.half-pizza-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.half-pizza-sub {
  font-size: 0.74rem;
  color: var(--ink-secondary);
  margin-top: 0.1rem;
}

.half-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.half-size-chip {
  flex: 1 1 auto;
  min-width: 72px;
  padding: 0.38rem 0.55rem;
  border-radius: 9px;
  border: 1.5px solid #ead5b5;
  background: #ffffff;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.14s ease;
}

.half-size-chip.active {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #ffffff;
  box-shadow: 0 3px 8px rgba(200, 30, 30, 0.22);
}

.half-parts-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.32rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid #ead5b5;
  border-radius: 10px;
  padding: 0.22rem;
}

.half-parts-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.36rem 0.45rem;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.half-parts-btn.active {
  background: var(--ink);
  color: #ffffff;
  box-shadow: var(--shadow-xs);
}

.half-pizza-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.half-pizza-grid label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 0.24rem;
}

.half-pizza-grid select {
  width: 100%;
  padding: 0.52rem 0.62rem;
  border-radius: 10px;
  border: 1.5px solid #e7cfa8;
  background: #ffffff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.half-pizza-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(217, 119, 6, 0.35);
}

.half-pizza-price-col {
  display: flex;
  flex-direction: column;
}

.half-pizza-price-lbl {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.half-pizza-price {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--crimson-deep);
  font-variant-numeric: tabular-nums;
}

.btn-add-half {
  background: var(--ink);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.56rem 1rem;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(23, 19, 17, 0.2);
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-add-half:hover {
  background: var(--crimson);
}

.btn-add-half:active {
  transform: scale(0.97);
}

.half-added-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.half-added-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.72rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #f0d7ae;
}

/* Notes Panel */
.notes-panel {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--border-strong);
}

.notes-panel label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 0.38rem;
}

/* ============================================================================
   FORMS, PAYMENT TOGGLE & CASH CHIPS
   ============================================================================ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.78rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

label {
  display: block;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink-secondary);
  margin-bottom: 0.3rem;
}

input,
textarea,
select {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  color: var(--ink);
  padding: 0.62rem 0.78rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

input::placeholder,
textarea::placeholder {
  color: #a6988d;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--crimson);
  box-shadow: 0 0 0 3px rgba(200, 30, 30, 0.1);
}

.pay-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0.28rem;
}

.pay-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.56rem 0.75rem;
  border: 1.5px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pay-toggle-btn.active {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--ink);
  box-shadow: var(--shadow-xs);
}

.cash-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.82rem;
}

.cash-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.45rem;
}

.cash-box-head label {
  margin-bottom: 0;
}

.cash-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.cash-chip {
  border: 1.5px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.cash-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cash-chip.active {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #ffffff;
}

.cash-change-hint {
  display: block;
  margin-top: 0.42rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.saved-profile-clear {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.26rem 0.68rem;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.saved-profile-clear:hover {
  color: var(--danger);
  border-color: var(--crimson-border);
  background: var(--crimson-soft);
}

/* ============================================================================
   LOCATION & MAP
   ============================================================================ */
.location-actions {
  display: flex;
  flex-direction: column;
  gap: 0.52rem;
  margin-bottom: 0.75rem;
}

.btn-gps {
  width: 100%;
  min-height: 44px;
}

.gps-status {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  line-height: 1.35;
}

.gps-status.is-pending {
  background: var(--gold-soft);
  border: 1px solid var(--gold-border);
  color: #92400e;
}

.gps-status.locked {
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  color: #065f46;
}

.gps-status.is-error {
  background: var(--crimson-soft);
  border: 1px solid var(--crimson-border);
  color: #b91c1c;
}

.search-row {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 0.6rem;
}

.geocode-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  max-height: 165px;
  overflow-y: auto;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow-sm);
}

.geocode-item {
  padding: 0.58rem 0.75rem;
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  color: var(--ink-secondary);
}

.geocode-item:last-child {
  border-bottom: none;
}

.geocode-item:hover {
  background: var(--bg);
  color: var(--ink);
}

.map-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.customer-map {
  width: 100%;
  height: 255px;
  z-index: 1;
}

.customer-map .leaflet-tile-pane {
  image-rendering: -webkit-optimize-contrast;
}

.map-tip-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 400;
  background: rgba(23, 19, 17, 0.84);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  pointer-events: none;
}

.customer-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--crimson);
  border: 3px solid #ffffff;
  box-shadow: 0 0 0 6px rgba(200, 30, 30, 0.26), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.64rem 1.05rem;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-brand-dark {
  background: var(--ink);
  color: #ffffff;
}

.btn-brand-dark:hover {
  background: #2b2421;
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
}

.btn-emerald:hover:not(:disabled) {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

.btn-emerald:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  background: var(--bg);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.82rem 1.2rem;
  font-size: 0.94rem;
}

/* ============================================================================
   ERROR & SUCCESS STATES
   ============================================================================ */
.error-banner {
  background: var(--crimson-soft);
  border: 1.5px solid var(--crimson-border);
  color: #991b1b;
  padding: 0.78rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.4;
}

.success-card {
  text-align: center;
  padding: 2rem 1.35rem;
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: var(--emerald-soft);
  border: 2px solid var(--emerald-border);
  color: var(--emerald);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.success-card h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
}

.success-desc {
  font-size: 0.86rem;
  color: var(--ink-secondary);
  margin: 0.5rem 0 1.15rem;
  line-height: 1.5;
}

.success-summary {
  text-align: left;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem;
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 1.15rem;
}

/* ============================================================================
   SLIDE-UP CART DRAWER
   ============================================================================ */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 19, 17, 0.52);
  backdrop-filter: blur(4px);
  z-index: 950;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.cart-drawer {
  width: 100%;
  max-width: 640px;
  max-height: 80dvh;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  padding: 0.65rem 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.25);
  animation: drawerUp 0.2s ease-out;
}

@keyframes drawerUp {
  from {
    transform: translateY(28px);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cart-drawer-handle {
  width: 42px;
  height: 4px;
  border-radius: 99px;
  background: var(--border-strong);
  margin: 0 auto 0.15rem;
}

.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
}

.cart-drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-drawer-head h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
}

.cart-drawer-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--crimson-deep);
  background: var(--crimson-soft);
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
}

.cart-drawer-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-clear-cart {
  border: none;
  background: transparent;
  color: var(--danger);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.btn-clear-cart:hover {
  background: var(--crimson-soft);
}

.cart-drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: none;
  background: var(--bg);
  color: var(--ink-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.cart-drawer-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-drawer-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--ink-muted);
  font-size: 0.85rem;
  background: var(--bg);
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--border-strong);
}

.cart-drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.78rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

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

.cart-drawer-item-name {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.cart-drawer-item-sub {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--crimson-deep);
  margin-top: 0.14rem;
  font-variant-numeric: tabular-nums;
}

.cart-drawer-footer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.cart-drawer-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-secondary);
}

.cart-drawer-total-row strong {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ============================================================================
   STICKY CHECKOUT BAR
   ============================================================================ */
.checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(23, 19, 17, 0.08);
  padding: 0.72rem 1rem calc(0.72rem + env(safe-area-inset-bottom, 0px));
  z-index: 900;
}

.checkout-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.checkout-summary-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  border: 1.5px solid var(--border);
  background: var(--bg);
  padding: 0.42rem 0.78rem 0.42rem 0.56rem;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.checkout-summary-btn:hover {
  border-color: var(--border-strong);
  background: var(--bg-warm);
}

.checkout-bag-wrap {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--ink);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.checkout-item-badge {
  position: absolute;
  top: -5px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--crimson);
  color: #ffffff;
  border: 2px solid #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-variant-numeric: tabular-nums;
}

.total-wrap {
  display: flex;
  flex-direction: column;
}

.total-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.total-caret {
  font-size: 0.72rem;
}

.total-amount {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.btn-checkout {
  flex: 1;
  max-width: 260px;
  min-height: 46px;
  border-radius: 12px;
  font-size: 0.88rem;
}

/* ============================================================================
   RESPONSIVE MOBILE TUNING
   ============================================================================ */
@media (max-width: 540px) {
  .order-header {
    padding: 1rem 0.85rem 1.05rem;
  }

  .header-logo-frame {
    width: 66px;
    height: 66px;
    border-radius: 15px;
  }

  .biz-title {
    font-size: 1.32rem;
  }

  .container {
    padding: 0.8rem 0.75rem;
    gap: 0.85rem;
  }

  .card {
    padding: 0.95rem 0.88rem;
    border-radius: 16px;
  }

  .form-grid,
  .half-pizza-grid {
    grid-template-columns: 1fr;
  }

  .prod-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.72rem;
    padding: 0.85rem;
  }

  .prod-action {
    align-self: flex-end;
  }

  .checkout-inner {
    gap: 0.55rem;
  }

  .btn-checkout {
    padding: 0.62rem 0.82rem;
    font-size: 0.82rem;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  .step-pill {
    font-size: 0.7rem;
    padding: 0.36rem 0.4rem;
    gap: 0.28rem;
  }

  .step-connector {
    width: 8px;
  }
}

/* Hide native browser clear X where custom clear button exists */
#pedirSearchInput::-webkit-search-cancel-button,
#pedirSearchInput::-webkit-search-decoration,
#localSearchInput::-webkit-search-cancel-button,
#localSearchInput::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
