/* ============================================================
   FoodBot - Widget CSS - Responsive Full Pro
   ============================================================ */



/* Reset limitado al widget para no alterar la página que lo incluye */
:where(#fb-trigger, #fb-trigger *, #fb-container, #fb-container *,
#fb-container *::before, #fb-container *::after) { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --fb-deep:          #0d0d2b;
  --fb-mid:           #14143f;
  --fb-acento:        #7c3aed;
  --fb-glow:          rgba(124,58,237,.35);
  --fb-white:         #ffffff;
  --fb-surface:       #f5f6fa;
  --fb-border:        #e4e6f0;
  --fb-text:          #1e1e3f;
  --fb-muted:         #676b91; /* contraste AA sobre blanco */
  --fb-success:       #22c55e;
  --fb-radius:        16px;
  --fb-font-h:        'Outfit', sans-serif;
  --fb-font-b:        'Inter', sans-serif;
  --fb-trigger-size:  110px;
  --fb-win-w:         760px;
  --fb-win-h:         820px;
  --fb-panel-w:       220px;
  --fb-panel-mascot:  155px;
  --fb-msg-font:      .9rem;
  --fb-bubble-max:    78%;
}

/* TRIGGER */
#fb-trigger {
  position: fixed;
  bottom: 24px;
  right: 28px;
  width: var(--fb-trigger-size);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10001;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  animation: fb-float 4s ease-in-out infinite;
}
#fb-trigger:hover { transform: scale(1.1) translateY(-5px); }
#fb-trigger.fb-hidden { opacity: 0; transform: scale(0); pointer-events: none; }

.fb-trigger-mascot {
  width: var(--fb-trigger-size);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(124,58,237,.55));
}

.fb-trigger-badge {
  background: var(--fb-acento);
  color: #fff;
  font-family: var(--fb-font-b);
  font-size: .76rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  margin-top: 8px;
  white-space: nowrap;
  box-shadow: 0 4px 14px var(--fb-glow);
  animation: fb-pulse-badge 2.5s ease-in-out infinite;
}

/* CONTAINER */
#fb-container {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 0 24px 24px 0;
}
#fb-container.visible { pointer-events: all; }

/* WINDOW */
#fb-window {
  display: flex;
  width: min(var(--fb-win-w), 90vw);
  height: min(var(--fb-win-h), 94vh);
  max-height: 94vh;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 32px 90px rgba(13,13,43,.55), 0 0 0 1px rgba(255,255,255,.07);
  transform: translateY(32px) scale(.93);
  opacity: 0;
  transition: transform .42s cubic-bezier(.34,1.4,.64,1), opacity .3s ease;
}
#fb-container.visible #fb-window {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* PANEL LATERAL */
#fb-side-panel {
  width: var(--fb-panel-w);
  min-width: var(--fb-panel-w);
  background: linear-gradient(175deg, var(--fb-deep) 0%, var(--fb-mid) 50%, #1e1260 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* Pixel centrado en el alto del panel */
  padding: 56px 14px 32px;
  position: relative;
  overflow: hidden;
}
#fb-side-panel::before {
  content: '. . . . . . . . . . . . . . . . . .';
  position: absolute;
  top: 0; left: 0; right: 0;
  font-size: .4rem;
  color: rgba(255,255,255,.08);
  line-height: 2.2;
  padding: 8px;
  pointer-events: none;
}

.fb-panel-logo {
  position: absolute;
  top: 26px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--fb-font-h);
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.fb-panel-mascot {
  width: var(--fb-panel-mascot);
  height: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 12px 32px rgba(124,58,237,.65));
  animation: fb-float 5s ease-in-out infinite;
  margin: 4px 0 12px;
}

.fb-panel-name {
  font-family: var(--fb-font-h);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 5px;
  text-align: center;
}

.fb-panel-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--fb-font-b);
  font-size: .7rem;
  color: rgba(255,255,255,.55);
}
.fb-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fb-success);
  box-shadow: 0 0 0 3px rgba(34,197,94,.3);
  animation: fb-status-pulse 2s ease-in-out infinite;
}

/* CHAT AREA */
#fb-chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--fb-white);
  overflow: hidden;
  min-width: 0;
}

/* HEADER */
.fb-header {
  background: var(--fb-white);
  border-bottom: 1px solid var(--fb-border);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.fb-header-left { display: flex; align-items: center; }
.fb-header-mascot-mini {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(124,58,237,.6));
  margin-right: 10px;
  flex-shrink: 0;
  display: none;
}
.fb-header-info h2 {
  font-family: var(--fb-font-h);
  font-size: 1rem;
  font-weight: 700;
  color: var(--fb-text);
}
.fb-header-info p {
  font-family: var(--fb-font-b);
  font-size: .74rem;
  color: var(--fb-muted);
  margin-top: 2px;
}
.fb-header-btns { display: flex; gap: 6px; align-items: center; }
.fb-hbtn {
  background: var(--fb-surface);
  border: 1px solid var(--fb-border);
  color: var(--fb-muted);
  width: 32px;
  height: 32px;
  border-radius: 9px;
  cursor: pointer;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}
.fb-hbtn:hover,
.fb-hbtn:active { background: var(--fb-acento); border-color: var(--fb-acento); color: #fff; }
.fb-hbtn--texto { width: auto; padding: 0 12px; gap: 5px; border-radius: 999px; font: 600 .8rem/1 var(--fb-font-b); white-space: nowrap; }
.fb-hbtn--texto span { font-size: 1.05rem; line-height: 1; }

/* MESSAGES */
#fb-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--fb-surface);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}
#fb-messages::-webkit-scrollbar { width: 3px; }
#fb-messages::-webkit-scrollbar-thumb { background: var(--fb-border); border-radius: 2px; }

.fb-msg { display: flex; gap: 9px; animation: fb-in .22s ease; }
.fb-msg.user { justify-content: flex-end; }

.fb-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #ede9fe;   /* el avatar es transparente: fondo suave de la marca */
  border: 1.5px solid #ddd6fe;
}
.fb-msg.user .fb-avatar { display: none; }

.fb-bubble-wrap { display: flex; flex-direction: column; max-width: var(--fb-bubble-max); }
.fb-msg.user .fb-bubble-wrap { align-items: flex-end; }

.fb-bubble {
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  color: var(--fb-text);
  font-family: var(--fb-font-b);
  font-size: var(--fb-msg-font);
  line-height: 1.58;
  padding: 11px 14px;
  border-radius: 16px 16px 16px 4px;
  box-shadow: 0 1px 5px rgba(30,30,63,.07);
}
.fb-msg.user .fb-bubble {
  background: var(--fb-acento);
  border-color: transparent;
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}

.fb-time { font-size: .65rem; color: var(--fb-muted); margin-top: 4px; font-family: var(--fb-font-b); }

/* TYPING */
.fb-typing {
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  padding: 13px 16px;
  border-radius: 16px 16px 16px 4px;
  display: flex;
  gap: 4px;
  align-items: center;
  box-shadow: 0 1px 5px rgba(30,30,63,.07);
}
.fb-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fb-muted);
  animation: fb-dot 1.2s ease-in-out infinite;
}
.fb-typing span:nth-child(2) { animation-delay: .2s; }
.fb-typing span:nth-child(3) { animation-delay: .4s; }

/* ACTIONS / CHIPS */
#fb-actions {
  background: var(--fb-white);
  border-top: 1px solid var(--fb-border);
  padding: 11px 14px 9px;
  flex-shrink: 0;
}
.fb-actions-lbl {
  font-family: var(--fb-font-b);
  font-size: .68rem;
  font-weight: 600;
  color: var(--fb-muted);
  letter-spacing: .7px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
#fb-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.fb-chip {
  background: var(--fb-white);
  border: 1.5px solid var(--fb-border);
  color: var(--fb-text);
  font-family: var(--fb-font-b);
  font-size: .82rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all .18s;
  white-space: normal;
  text-align: left;
  max-width: 100%;
  line-height: 1.3;
  touch-action: manipulation;
}
.fb-chip:hover,
.fb-chip:active {
  border-color: var(--fb-acento);
  color: var(--fb-acento);
  background: rgba(124,58,237,.05);
  transform: translateY(-1px);
}
.fb-chip.primary { background: var(--fb-acento); border-color: var(--fb-acento); color: #fff; font-weight: 600; }
.fb-chip.primary:hover,
.fb-chip.primary:active { background: #6d28d9; }

/* LEAD INPUTS */
.fb-lead-wrap {
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 15px;
  animation: fb-in .22s ease;
}
.fb-lead-input {
  width: 100%;
  border: 1.5px solid var(--fb-border);
  border-radius: 11px;
  padding: 11px 15px;
  font-family: var(--fb-font-b);
  font-size: 16px;
  color: var(--fb-text);
  outline: none;
  background: var(--fb-surface);
  transition: border-color .2s;
}
.fb-lead-input:focus { border-color: var(--fb-acento); }
.fb-lead-input.shake { animation: fb-shake .4s ease; }
.fb-lead-btn {
  background: var(--fb-acento);
  border: none;
  color: #fff;
  font-family: var(--fb-font-b);
  font-size: .9rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 11px;
  cursor: pointer;
  transition: background .2s;
  align-self: flex-end;
  touch-action: manipulation;
}
.fb-lead-btn:hover,
.fb-lead-btn:active { background: #6d28d9; }
.fb-inline-hint { color: #dc2626; font-family: var(--fb-font-b); font-size: .76rem; }

/* CHECKBOXES */
.fb-check-wrap {
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  animation: fb-in .22s ease;
}
.fb-check-row { display: flex; align-items: center; gap: 9px; }
.fb-check-copy { display: flex; flex-direction: column; gap: 2px; }
.fb-check-title { font-family: var(--fb-font-b); font-size: .86rem; color: var(--fb-text); }
.fb-check-price { color: var(--fb-muted); font-family: var(--fb-font-b); font-size: .74rem; }
.fb-check-row input[type=checkbox],
.fb-check-row input[type=radio] {
  width: 18px;
  height: 18px;
  accent-color: var(--fb-acento);
  cursor: pointer;
  flex-shrink: 0;
}
.fb-check-row label { font-family: var(--fb-font-b); font-size: .86rem; color: var(--fb-text); cursor: pointer; }
.fb-check-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.fb-btn-ok {
  background: var(--fb-acento);
  border: none;
  color: #fff;
  font-family: var(--fb-font-b);
  font-size: .86rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 11px;
  cursor: pointer;
  align-self: flex-start;
  transition: background .2s;
  margin-top: 4px;
  touch-action: manipulation;
}
.fb-btn-ok:hover,
.fb-btn-ok:active { background: #6d28d9; }
.fb-btn-skip {
  background: transparent;
  border: 1.5px solid var(--fb-border);
  color: var(--fb-muted);
  font-family: var(--fb-font-b);
  font-size: .82rem;
  padding: 8px 16px;
  border-radius: 11px;
  cursor: pointer;
  align-self: flex-start;
  transition: all .2s;
  margin-top: 4px;
  touch-action: manipulation;
}
.fb-btn-skip:hover,
.fb-btn-skip:active { border-color: var(--fb-acento); color: var(--fb-acento); }

/* CONTADOR DE UNIDADES */
.fb-counter-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 16px;
  animation: fb-in .22s ease;
  flex-wrap: wrap;
}
.fb-counter-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--fb-acento);
  background: transparent;
  color: var(--fb-acento);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s;
  touch-action: manipulation;
}
.fb-counter-btn:hover,
.fb-counter-btn:active {
  background: var(--fb-acento);
  color: #fff;
  transform: scale(1.1);
}
.fb-counter-display {
  font-family: var(--fb-font-h);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--fb-text);
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.fb-counter-confirm {
  flex: 1;
  min-width: 140px;
  background: var(--fb-acento);
  border: none;
  color: #fff;
  font-family: var(--fb-font-b);
  font-size: .9rem;
  font-weight: 600;
  padding: 11px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s;
  touch-action: manipulation;
}
.fb-counter-confirm:hover,
.fb-counter-confirm:active { background: #6d28d9; }

/* PRODUCT CARD */
.fb-product-card { display: flex; gap: 13px; align-items: flex-start; }
.fb-product-image { width: 80px; height: 80px; object-fit: cover; border-radius: 14px; border: 1px solid var(--fb-border); flex-shrink: 0; }
.fb-product-info { display: flex; flex-direction: column; gap: 6px; }
.fb-product-copy { font-size: .85rem; color: var(--fb-muted); }
.fb-product-card .fb-product-info { max-width: calc(var(--fb-win-w) - var(--fb-panel-w) - 160px); }
.fb-product-price { color: var(--fb-acento); font-weight: 700; }
.fb-mod-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fb-mod-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; background: #ede9fe; color: #6d28d9; font-size: .7rem; font-weight: 700; }
.fb-mod-badge.req { background: #fee2e2; color: #b91c1c; }
.fb-mod-note { display: block; margin-top: 6px; color: var(--fb-muted); }
.fb-total-highlight { color: var(--fb-acento); }

/* KEYFRAMES */
@keyframes fb-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-11px); }
}
@keyframes fb-pulse-badge {
  0%, 100% { box-shadow: 0 4px 14px var(--fb-glow); }
  50%      { box-shadow: 0 7px 24px var(--fb-glow); }
}
@keyframes fb-status-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,.3); }
  50%      { box-shadow: 0 0 0 7px rgba(34,197,94,.08); }
}
@keyframes fb-dot {
  0%, 80%, 100% { transform: scale(.55); opacity: .4; }
  40%           { transform: scale(1);   opacity: 1; }
}
@keyframes fb-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fb-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

/* RESPONSIVE */

@media (max-width: 900px) {
  :root {
    --fb-win-w:        520px;
    --fb-win-h:        650px;
    --fb-panel-w:      160px;
    --fb-panel-mascot: 138px;
    --fb-trigger-size: 100px;
  }
}

/* Desktop larger screens: make the chat wider and taller for desktops */
@media (min-width: 1200px) {
  :root {
    --fb-win-w: 760px;
    --fb-win-h: 820px;
    --fb-panel-w: 220px;
    --fb-panel-mascot: 190px;
    --fb-bubble-max: 82%;
  }
  #fb-container { padding-right: 40px; padding-bottom: 40px; }
}

@media (min-width: 1600px) {
  :root {
    --fb-win-w: 920px;
    --fb-win-h: 880px;
    --fb-panel-w: 260px;
    --fb-panel-mascot: 210px;
    --fb-bubble-max: 84%;
  }
  #fb-container { padding-right: 60px; padding-bottom: 60px; }
}

/* Center widget on large screens */
@media (min-width: 1000px) {
  #fb-container {
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  #fb-window {
    /* Do not force transform/opacity here — let #fb-container.visible control animations */
    box-shadow: 0 40px 120px rgba(13,13,43,.6);
  }
}

/* PAYMENT MODAL */
.fb-payment-modal {
  background: rgba(0,0,0,.03);
  border: 1px solid var(--fb-border);
  padding: 12px;
  border-radius: 12px;
  margin: 10px 0;
}
.fb-payment-modal-inner h4 { margin: 0 0 6px; font-family: var(--fb-font-h); }
.fb-payment-modal-inner #fb-payment-status { font-family: var(--fb-font-b); font-size: .95rem; color: var(--fb-text); }
.fb-btn { background: var(--fb-acento); color: #fff; border: none; padding: 8px 12px; border-radius: 8px; cursor: pointer; }

@media (max-width: 700px) {
  :root {
    --fb-panel-w:      140px;
    --fb-panel-mascot: 120px;
    --fb-trigger-size: 90px;
    --fb-msg-font:     .88rem;
  }
  #fb-container { padding: 0; }
  #fb-window    { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  #fb-trigger   { bottom: 16px; right: 16px; }
}

@media (max-width: 500px) {
  :root {
    --fb-trigger-size: 84px;
    --fb-msg-font:     .87rem;
    --fb-bubble-max:   88%;
  }
  #fb-side-panel { display: none; }
  .fb-header {
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--fb-deep) 0%, var(--fb-mid) 100%);
  }
  .fb-header-mascot-mini { display: block; }
  .fb-header-info h2     { color: #fff; font-size: .95rem; }
  .fb-header-info p      { color: rgba(255,255,255,.55); }
  .fb-hbtn               { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
  .fb-hbtn:hover,
  .fb-hbtn:active        { background: var(--fb-acento); border-color: var(--fb-acento); }
  #fb-messages           { padding: 13px 12px 8px; gap: 10px; }
  .fb-chip               { font-size: .8rem; padding: 8px 13px; }
  #fb-chips              { gap: 6px; }
  .fb-product-image      { width: 68px; height: 68px; }
  #fb-trigger            { bottom: 14px; right: 14px; }
  .fb-trigger-badge      { font-size: .7rem; padding: 5px 11px; }
}

@media (max-width: 380px) {
  :root {
    --fb-trigger-size: 76px;
    --fb-bubble-max:   92%;
  }
  #fb-messages        { padding: 10px 10px 6px; }
  .fb-bubble          { padding: 9px 11px; }
  .fb-chip            { font-size: .76rem; padding: 7px 11px; }
  .fb-trigger-badge   { display: none; }
  .fb-counter-btn     { width: 38px; height: 38px; font-size: 1.3rem; }
  .fb-counter-display { font-size: 1.5rem; }
  .fb-counter-confirm { font-size: .82rem; padding: 9px 12px; }
}

@media (max-height: 500px) and (orientation: landscape) {
  #fb-side-panel { display: none; }
  .fb-header {
    padding: 8px 14px;
    background: linear-gradient(135deg, var(--fb-deep) 0%, var(--fb-mid) 100%);
  }
  .fb-header-mascot-mini { display: block; }
  .fb-header-info h2     { color: #fff; }
  .fb-header-info p      { color: rgba(255,255,255,.55); }
  .fb-hbtn     { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }
  #fb-messages { padding: 8px 12px; gap: 7px; }
  #fb-actions  { padding: 7px 12px 6px; }
}
/* ELIMINAR PRODUCTOS DEL CARRITO */
.fb-elim-wrap {
  background: #fff8f8;
  border: 1.5px solid #fecaca;
  border-radius: var(--fb-radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: fb-in .22s ease;
  margin-top: 4px;
}
.fb-elim-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.fb-chip-elim {
  background: #fff !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
  font-size: .8rem !important;
}
.fb-chip-elim:hover,
.fb-chip-elim:active {
  background: #fee2e2 !important;
  border-color: #dc2626 !important;
  color: #b91c1c !important;
  transform: none !important;
}

/* Separador en chips del carrito */
.fb-elim-sep {
  width: 100%;
  font-family: var(--fb-font-b);
  font-size: .68rem;
  font-weight: 600;
  color: var(--fb-muted);
  letter-spacing: .7px;
  text-transform: uppercase;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px solid var(--fb-border);
}

/* RESUMEN DE PEDIDO Y CONFIRMACIÓN */
.fb-summary-card {
  background: #ffffff;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(13,13,43,0.04);
  margin-top: 4px;
}
.fb-summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f1f3f9;
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.fb-summary-header h4 {
  font-family: var(--fb-font-h);
  font-size: 1rem;
  color: var(--fb-text);
  margin: 0;
}
.fb-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.86rem;
  color: var(--fb-text);
  margin-bottom: 6px;
}
.fb-summary-row small { color: var(--fb-muted); }
.fb-summary-total {
  border-top: 1.5px dashed var(--fb-border);
  margin-top: 10px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 0.98rem;
  color: var(--fb-acento);
}

/* TRACKING TIMELINE */
.fb-tracking-card {
  background: #ffffff;
  border: 1px solid var(--fb-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin-top: 6px;
}
.fb-timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 6px;
  position: relative;
  padding-left: 24px;
}
.fb-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}
.fb-step {
  position: relative;
  font-size: 0.84rem;
  color: var(--fb-muted);
}
.fb-step::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #cbd5e1;
  border: 2px solid #ffffff;
}
.fb-step.done {
  color: var(--fb-text);
  font-weight: 600;
}
.fb-step.done::before {
  background: var(--fb-success);
}
.fb-step.active {
  color: var(--fb-acento);
  font-weight: 700;
}
.fb-step.active::before {
  background: var(--fb-acento);
  box-shadow: 0 0 0 4px var(--fb-glow);
}

/* PAGO INSTRUCCIONES */
.fb-payment-instructions {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.84rem;
  color: #334155;
  margin-top: 6px;
}
.fb-bank-badge {
  display: inline-block;
  background: #ede9fe;
  color: #6d28d9;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.78rem;
  margin-bottom: 6px;
}
/* ── Mejoras de usabilidad y accesibilidad ─────────────────── */
#fb-container button:focus-visible,
#fb-container input:focus-visible,
#fb-container select:focus-visible,
#fb-trigger:focus-visible { outline: 3px solid var(--fb-acento); outline-offset: 2px; }

.fb-chip.disabled,
.fb-chip:disabled { opacity: .55; cursor: not-allowed; text-decoration: line-through; transform: none; border-color: var(--fb-border); color: var(--fb-muted); background: var(--fb-surface); }

.fb-muted-note { display: block; color: var(--fb-muted); font-size: .76rem; margin-top: 4px; }
.fb-mod-plus  { color: #047857; }
.fb-mod-minus { color: #b91c1c; }
.fb-ok   { color: #15803d; }
.fb-err  { color: #b91c1c; }
.fb-warn { color: #a16207; }

.fb-summary-row { gap: 12px; }
.fb-summary-row > :last-child { text-align: right; flex-shrink: 0; }
.fb-summary-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.fb-summary-sep { margin-top: 10px; border-top: 1px solid #f1f3f9; padding-top: 8px; }
.fb-summary-block { margin-top: 8px; border-top: 1px solid #f1f3f9; padding-top: 8px; }
.fb-summary-note { margin-top: 10px; font-size: .84rem; line-height: 1.45; color: var(--fb-text); }

/* Formularios de varios campos (pagos, seguimiento) */
.fb-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--fb-white);
  border: 1px solid var(--fb-border);
  border-radius: var(--fb-radius);
  padding: 15px;
  animation: fb-in .22s ease;
}
.fb-form-row { display: flex; flex-direction: column; gap: 4px; }
.fb-form-label { font-family: var(--fb-font-b); font-size: .78rem; font-weight: 600; color: var(--fb-text); }
/* Cédula: tipo (V, E, J, P) + número */
.fb-cedula { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 6px; }
.fb-cedula .fb-lead-input { min-width: 0; width: 100%; }
.fb-cedula__tipo { text-align: center; font-weight: 700; padding-inline: 8px; }
.fb-cedula.shake { animation: fb-shake .4s ease; }
.fb-select { appearance: auto; cursor: pointer; }

.fb-counter-wrap .fb-note-input { flex-basis: 100%; order: 4; }
.fb-counter-wrap .fb-counter-confirm { order: 5; }

.fb-link-btn {
  display: inline-block;
  margin-top: 8px;
  background: var(--fb-acento);
  color: #fff !important;
  padding: 9px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.fb-payment-status { font-family: var(--fb-font-b); font-size: .9rem; color: var(--fb-text); }

@media (max-width: 500px) {
  #fb-chips { max-height: 42vh; overflow-y: auto; }
  .fb-product-card .fb-product-info { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  #fb-container *, #fb-trigger, #fb-trigger * { animation: none !important; transition: none !important; }
}
/* Tarjetas y formularios alineados a la izquierda (el contenedor del widget centra el texto) */
.fb-bubble, .fb-tracking-card, .fb-summary-card, .fb-form-wrap, .fb-lead-wrap, .fb-check-wrap { text-align: left; }

/* CLAVE OTP DEL DÉBITO INMEDIATO */
.fb-otp-input {
  font-family: var(--fb-font-h);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .45em;
  text-align: center;
  padding: 12px 10px 12px calc(10px + .45em);
  font-variant-numeric: tabular-nums;
}
.fb-otp-input::placeholder { color: #b9bcd6; letter-spacing: .3em; }
.fb-otp-wrap .fb-check-actions { justify-content: space-between; }
.fb-otp-wrap .fb-btn-skip:disabled,
.fb-otp-wrap .fb-btn-ok:disabled { opacity: .55; cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   PLATOS EN TARJETAS GRANDES Y FOTO AMPLIADA
════════════════════════════════════════════════ */
.fb-platos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin: 2px 0 4px;
}
.fb-plato {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--fb-border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px -18px rgba(30, 30, 63, .45);
  animation: fb-plato-in .35s cubic-bezier(.16, 1, .3, 1) both;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}
@keyframes fb-plato-in { from { opacity: 0; transform: translateY(10px); } }

.fb-plato__foto {
  position: relative;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #ede9fe, #f5f6fa);
  overflow: hidden;
  cursor: zoom-in;
}
.fb-plato__foto img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .35s cubic-bezier(.16, 1, .3, 1);
}
.fb-plato__foto--vacia { cursor: default; display: grid; place-items: center; }
.fb-plato__foto--vacia::after { content: "🍽️"; font-size: 2.2rem; opacity: .55; }

/* Lupa dibujada con CSS: círculo + mango */
.fb-plato__zoom {
  position: absolute; top: 8px; right: 8px;
  width: 36px; height: 36px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 12px rgba(13, 13, 43, .25);
  display: grid; place-items: center;
  transition: transform .15s ease, background-color .2s ease;
}
.fb-lupa { position: relative; width: 13px; height: 13px; border: 2px solid var(--fb-text); border-radius: 50%; margin: -3px 0 0 -3px; }
.fb-lupa::after {
  content: ""; position: absolute; width: 2px; height: 7px; background: var(--fb-text); border-radius: 2px;
  right: -4px; bottom: -6px; transform: rotate(-45deg);
}
.fb-plato__zoom:active { transform: scale(.92); }

.fb-plato__agotado {
  position: absolute; left: 8px; bottom: 8px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(13, 13, 43, .82); color: #fff;
  font: 600 .72rem/1.2 var(--fb-font-b);
}

.fb-plato__info { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; flex: 1; }
.fb-plato__nombre { font: 700 .95rem/1.25 var(--fb-font-h); color: var(--fb-text); }
.fb-plato__desc {
  margin: 0; font-size: .78rem; line-height: 1.4; color: var(--fb-muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fb-plato__pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px 12px; }
.fb-plato__precio { font: 800 1.02rem/1 var(--fb-font-h); color: var(--fb-acento); }
.fb-plato__pedir {
  min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--fb-acento); color: #fff; font: 600 .82rem/1 var(--fb-font-b);
  transition: transform .15s ease, background-color .2s ease;
}
.fb-plato__pedir:active { transform: scale(.95); }
.fb-plato__pedir:disabled { background: var(--fb-border); color: var(--fb-muted); cursor: not-allowed; }
.fb-plato__zoom:focus-visible, .fb-plato__pedir:focus-visible { outline: 3px solid var(--fb-acento); outline-offset: 2px; }

@media (hover: hover) {
  .fb-plato:not(.fb-plato--agotado):hover { transform: translateY(-3px); box-shadow: 0 16px 30px -18px rgba(76, 29, 149, .55); }
  .fb-plato:hover .fb-plato__foto img { transform: scale(1.05); }
  .fb-plato__zoom:hover { background: #fff; transform: scale(1.08); }
  .fb-plato__pedir:not(:disabled):hover { background: #6d28d9; }
}

.fb-plato--agotado .fb-plato__foto img { filter: grayscale(1); opacity: .7; }
.fb-plato--agotado .fb-plato__info { cursor: default; }

/* Lista ya usada: queda como historial, sin acciones */
.fb-platos--usado .fb-plato { opacity: .55; box-shadow: none; }
.fb-platos--usado .fb-plato__info { cursor: default; }
.fb-platos--usado .fb-plato__pedir { display: none; }
.fb-platos--usado .fb-plato--elegido { opacity: 1; border-color: var(--fb-acento); box-shadow: 0 0 0 2px var(--fb-acento) inset; }

/* Foto del detalle del plato: grande y ampliable */
.fb-product-zoom { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 14px; flex-shrink: 0; }
.fb-product-zoom .fb-product-image { width: 112px; height: 112px; }

/* Foto ampliada */
#fb-window { position: relative; }
.fb-zoom {
  position: absolute; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: 56px 20px 20px;
  background: rgba(13, 13, 43, .82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .18s ease;
}
.fb-zoom.visible { opacity: 1; }
.fb-zoom__caja {
  margin: 0; width: min(100%, 560px); max-height: 100%;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
  transform: scale(.94); transition: transform .22s cubic-bezier(.16, 1, .3, 1);
}
.fb-zoom.visible .fb-zoom__caja { transform: scale(1); }
.fb-zoom__caja img { width: 100%; min-height: 0; flex: 1 1 auto; max-height: 62vh; object-fit: cover; display: block; background: #f5f6fa; }
.fb-zoom__caja figcaption { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; }
.fb-zoom__caja figcaption strong { display: block; font: 700 1.1rem/1.25 var(--fb-font-h); color: var(--fb-text); }
.fb-zoom__caja figcaption span:not(.fb-zoom__precio):not(.fb-zoom__agotado) { display: block; margin-top: 4px; font-size: .84rem; line-height: 1.45; color: var(--fb-muted); }
.fb-zoom__accion { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.fb-zoom__precio { font: 800 1.2rem/1 var(--fb-font-h); color: var(--fb-acento); }
.fb-zoom__pedir {
  min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--fb-acento); color: #fff; font: 600 .9rem/1 var(--fb-font-b);
  transition: transform .15s ease;
}
.fb-zoom__pedir:active { transform: scale(.96); }
.fb-zoom__agotado { font-weight: 600; color: var(--fb-muted); }
.fb-zoom__cerrar {
  position: absolute; top: 12px; right: 12px;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font: 400 1.6rem/1 var(--fb-font-b);
  display: grid; place-items: center;
}
.fb-zoom__cerrar:hover { background: rgba(255, 255, 255, .28); }
.fb-zoom__cerrar:focus-visible, .fb-zoom__pedir:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 500px) {
  .fb-platos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fb-plato__info { padding: 8px 10px 0; }
  .fb-plato__pie { padding: 8px 10px 10px; flex-wrap: wrap; }
  .fb-plato__nombre { font-size: .88rem; }
  .fb-plato__pedir { flex: 1 0 100%; }
  .fb-zoom { padding: 60px 12px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-plato, .fb-plato__foto img, .fb-zoom, .fb-zoom__caja { animation: none; transition: none; }
}

/* Precios en bolívares (tasa BCV del día) */
.fb-plato__precio .fb-plato__bs { display: block; font: 600 .72rem/1.2 var(--fb-font-b); color: var(--fb-muted); margin-top: 2px; }
.fb-zoom__precio .fb-zoom__bs { display: block; font: 600 .82rem/1.2 var(--fb-font-b); color: var(--fb-muted); margin-top: 3px; }
.fb-summary-total .fb-summary-bs { display: block; font-size: .85rem; font-weight: 600; color: var(--fb-muted); margin-top: 2px; }
