/* ── FOODFEED LOGO BAR ── */
.ff-header-logo-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.75rem + env(safe-area-inset-top))
           calc(1rem + env(safe-area-inset-right)) 0.5rem
           calc(1rem + env(safe-area-inset-left));
  background: #000;
  flex-shrink: 0;
}
.ff-header-logo {
  height: 32px !important;
  width: auto !important;
  max-height: 32px !important;
  object-fit: contain !important;
  flex-shrink: 0;
}
/* ================================================================
   foodfeed.css — Jama App
   Feed de videos vertical tipo Reels/TikTok
   Mobile-first, scroll-snap, overlay UI
   ================================================================ */

/* ================================================================
   BOTÓN NAV
   ================================================================ */
.btn-foodfeed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FF3D2E, #FF6B5E);
  color: white;
  font-size: var(--text-sm);
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 12px rgba(255,61,46,.35);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn-foodfeed::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #FF6B5E, #FFC857);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.btn-foodfeed:hover::before { opacity: 1; }
.btn-foodfeed span { position: relative; z-index: 1; }
.btn-foodfeed .ff-nav-icon { width: 22px; height: 22px; color: white; }
.btn-foodfeed .ff-icon { font-size: 15px; position: relative; z-index: 1; }

/* Pulse en el icono */
@keyframes ffPulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.2); }
}
.btn-foodfeed .ff-icon { animation: ffPulse 2s ease infinite; }

/* ================================================================
   VISTA PRINCIPAL DEL FEED
   ================================================================ */
#foodfeed-view {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: #000;
  flex-direction: column;
  align-items: center;
}
#foodfeed-view.active { display: flex; }

/* ================================================================
   TABS — MOBILE (barra superior flotante)
   ================================================================ */
.ff-tabs {
  position: absolute;
  top: 52px; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 10px 14px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,.7) 0%, transparent 100%);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 26px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 26px), transparent);
}
.ff-tabs::-webkit-scrollbar { display: none; }
.ff-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.08);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}
.ff-tab span[data-icon] { width: 14px; height: 14px; display: inline-flex; flex-shrink: 0; }
.ff-tab.active {
  color: white;
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
}
.ff-tab-close {
  position: absolute;
  right: 14px; top: 10px;
  width: 34px; height: 34px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.12);
  color: white; font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast);
  border: none;
}
.ff-tab-close:hover { background: rgba(255,255,255,.25); }
.ff-tab-close svg { width: 18px; height: 18px; }

/* ================================================================
   SCROLL + ITEMS — MOBILE
   ================================================================ */
.ff-scroll {
  flex: 1;
  width: 100%;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ff-scroll::-webkit-scrollbar { display: none; }

.ff-item {
  position: relative;
  width: 100%;
  height: calc(100vh - var(--header-h));
  height: calc(100dvh - var(--header-h));
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Clip del video (mobile: full item) */
.ff-clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ================================================================
   DESKTOP — Grid: sidebar | video centrado | acciones fixed
   ================================================================ */
@media (min-width: 769px) {

  /* Grid de dos columnas — solo cuando está activo */
  #foodfeed-view.active {
    display: grid;
    grid-template-columns: 240px 1fr;
    grid-template-rows: 1fr;
    background: #000;
  }

  /* ── SIDEBAR ── */
  .ff-tabs {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    top: auto; left: auto; right: auto;
    background: #111;
    background-image: none;
    border-right: 1px solid rgba(255,255,255,.07);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 32px 20px 24px;
    gap: 4px;
    z-index: 10;
    height: 100%;
    overflow-y: auto;
  }

  .ff-tabs::before {
    content: 'FoodFeed';
    display: block;
    font-size: 17px;
    font-weight: 900;
    color: white;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    width: 100%;
    flex-shrink: 0;
  }

  .ff-tab {
    width: 100%;
    text-align: left;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 15px;
    background: transparent;
    border: none;
    backdrop-filter: none;
    color: rgba(255,255,255,.6);
    display: flex;
    align-items: center;
  }
  .ff-tab:hover { background: rgba(255,255,255,.07); color: white; }
  .ff-tab.active { background: rgba(255,255,255,.12); color: white; border: none; }

  .ff-tab-close {
    position: absolute;
    top: 18px; right: 14px;
    background: rgba(255,255,255,.08);
  }

  /* ── SCROLL CENTRAL — flex column + align center ── */
  .ff-scroll {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 100%;
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;      /* centra los items horizontalmente */
    overflow-y: scroll;
    overflow-x: hidden;
    scroll-snap-type: y mandatory;
  }

  /* ── ITEM: ancho fijo, centrado ── */
  .ff-item {
    width: 420px;
    flex-shrink: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    position: relative;
  }

  /* El clip sigue siendo full-item */
  .ff-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
  }

  /* ── ACCIONES: fixed, a la derecha del video centrado ──
     Video centrado en (100vw - 240px):
       left edge  = 240 + (100vw - 240 - 420) / 2 = 50vw - 90px
       right edge = 50vw - 90px + 420 = 50vw + 330px
     Acciones empiezan 16px después del borde derecho:
       left = 50vw + 330px + 16px = calc(50vw + 346px)
  ── */
  .ff-item .ff-actions {
    display: none;   /* ocultar de todos los items */
  }
  .ff-item.active-item .ff-actions {
    display: flex;
    position: fixed;
    left: calc(50vw + 346px);
    bottom: 120px;
    top: auto;
    right: auto;
    z-index: 400;
  }

  /* Íconos un poco más grandes en desktop */
  .ff-action-icon {
    width: 52px;
    height: 52px;
    font-size: 24px;
  }
}


/* VIDEO */
.ff-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  background: #000;
  filter: none;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

/* Placeholder cuando no hay video */
.ff-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,.6);
}
.ff-placeholder-emoji { width: 64px; height: 64px; }
.ff-placeholder-emoji svg { width: 100%; height: 100%; }
.ff-placeholder-label { font-size: 14px; font-weight: 600; }

.ff-media-error {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  width: min(260px, calc(100% - 48px));
  transform: translate(-50%, -50%);
  padding: 18px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(18,18,18,.86);
  color: #fff;
  text-align: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ff-media-error[hidden] { display: none; }
.ff-media-error > span { display: block; width: 30px; height: 30px; margin: 0 auto 10px; }
.ff-media-error > span svg { width: 100%; height: 100%; }
.ff-media-error p { margin: 0 0 12px; font-size: 14px; }
.ff-media-error button {
  min-height: 42px;
  padding: 8px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--color-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
}

.ff-network-status {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top));
  left: 50%;
  z-index: 1300;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(28,28,28,.9);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.ff-network-status[hidden] { display: none; }
.ff-network-status.offline { background: rgba(112,39,32,.94); }

/* Gradientes de overlay */
/* ── MUTE BUTTON ── */
.ff-mute-btn {
  position: absolute;
  bottom: 5.5rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.15s, transform 0.15s;
  padding: 0;
}
.ff-mute-btn:hover { background: rgba(0,0,0,0.65); transform: scale(1.08); }
.ff-mute-btn.unmuted { background: rgba(255,61,46,0.6); border-color: rgba(255,61,46,0.4); }
.ff-mute-icon { width: 16px; height: 16px; flex-shrink: 0; }

.ff-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6) 0%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}
.ff-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Play/Pause indicator */
.ff-play-indicator {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: white;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.ff-play-indicator.show {
  opacity: 1;
  animation: playFade 0.8s ease forwards;
}
@keyframes playFade {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.5); }
}

/* FF-06 — feedback del doble toque sin depender de emojis. */
.ff-like-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 12;
  width: 96px;
  height: 96px;
  color: var(--color-red);
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.4));
  animation: ffLikeBurst .72s ease-out forwards;
}
.ff-like-burst svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes ffLikeBurst {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.25) rotate(-12deg); }
  35% { opacity: 1; transform: translate(-50%,-50%) scale(1.15) rotate(5deg); }
  100% { opacity: 0; transform: translate(-50%,-75%) scale(.9) rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  .ff-like-burst { animation-duration: .01ms; }
}

/* Progress bar */
.ff-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 18px;
  background: transparent;
  z-index: 10;
  touch-action: none;
}
.ff-progress::before {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.35);
}
.ff-progress-fill {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  background: var(--color-red);
  width: 0%;
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}
.ff-progress-seek {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}
.ff-progress-seek::-webkit-slider-runnable-track { height: 18px; background: transparent; }
.ff-progress-seek::-webkit-slider-thumb {
  width: 15px; height: 15px; margin-top: 3px; border: 0; border-radius: 50%;
  appearance: none; -webkit-appearance: none; background: #fff;
  box-shadow: 0 1px 5px rgba(0,0,0,.45); opacity: 0; transition: opacity .12s;
}
.ff-progress-seek:active::-webkit-slider-thumb,
.ff-progress-seek:focus-visible::-webkit-slider-thumb { opacity: 1; }
.ff-progress-seek::-moz-range-track { height: 18px; background: transparent; }
.ff-progress-seek::-moz-range-thumb {
  width: 15px; height: 15px; border: 0; border-radius: 50%; background: #fff; opacity: 0;
}
.ff-progress-seek:active::-moz-range-thumb,
.ff-progress-seek:focus-visible::-moz-range-thumb { opacity: 1; }

/* ================================================================
   OVERLAY — LADO DERECHO (acciones)
   ================================================================ */
.ff-actions {
  position: absolute;
  right: 12px;
  bottom: calc(120px + env(safe-area-inset-bottom));
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.ff-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: 0;
  background: none;
  padding: 0;
  color: white;
  font: inherit;
}
.ff-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: transform .25s cubic-bezier(0.34,1.56,0.64,1), background var(--transition-fast);
  border: 1.5px solid rgba(255,255,255,.18);
}
.ff-action-icon svg { width: 28px; height: 28px; }
.ff-action-btn:hover .ff-action-icon { transform: scale(1.1); background: rgba(255,255,255,.2); }
.ff-action-btn:active .ff-action-icon {
  transform: scale(0.85);
  background: rgba(255,255,255,.28);
}
.ff-action-count {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
}

/* Like animado */
.ff-action-btn.liked .ff-action-icon {
  background: rgba(255,61,46,.25);
  border-color: rgba(255,61,46,.4);
}
.ff-action-btn.liked .ff-action-icon svg { fill: currentColor; }
@keyframes likeHeart {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.4); }
  60%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.ff-action-btn.liked .ff-action-icon { animation: likeHeart 0.4s ease; }

/* Guardado */
.ff-action-btn.saved .ff-action-icon {
  background: rgba(255,200,87,.2);
  border-color: rgba(255,200,87,.4);
}

/* Avatar del restaurante */
.ff-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-full);
  border: 2.5px solid white;
  object-fit: cover;
  background: var(--color-gray-4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.ff-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ================================================================
   OVERLAY — PARTE INFERIOR (info)
   ================================================================ */
.ff-info {
  position: absolute;
  bottom: 16px;
  left: 14px;
  right: 70px;
  z-index: 10;
  max-height: 55%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.ff-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  margin-bottom: 8px;
  width: fit-content;
}
.ff-badge span[data-icon] {
  width: 16px;
  height: 16px;
  display: inline-flex;
  flex-shrink: 0;
}

.ff-restaurant-name {
  font-size: 17px;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
  display: flex;
  align-items: center;
  gap: 6px;
}
.ff-author-link {
  display: flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.ff-verified { width: 15px; height: 15px; display: inline-flex; color: #63b3ff; }

.ff-description {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  line-height: 1.5;
  margin-bottom: 8px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ff-description.expanded {
  -webkit-line-clamp: unset;
  display: block;
}
.ff-read-more {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  font-weight: 700;
  cursor: pointer;
  display: inline;
}

.ff-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.ff-tag {
  font-size: 12px;
  color: rgba(255,255,255,.75);
  font-weight: 600;
}

/* ================================================================
   BOTÓN PEDIR AHORA
   ================================================================ */
.ff-order-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-red);
  color: white;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(255,61,46,.45);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  width: 100%;
  justify-content: center;
  margin-top: 8px;
  flex-shrink: 0;
}
.ff-order-btn:active {
  transform: scale(0.96);
  background: var(--color-red-dark);
}

/* ================================================================
   LOADING / EMPTY STATE
   ================================================================ */
.ff-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: rgba(255,255,255,.6);
  z-index: 5;
}
.ff-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,.15);
  border-top-color: var(--color-red);
  border-radius: 50%;
  animation: ffSpin 0.7s linear infinite;
}
@keyframes ffSpin { to { transform: rotate(360deg); } }

.ff-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,.5);
  padding: 32px;
  text-align: center;
}
.ff-empty-icon { width: 48px; height: 48px; }
.ff-empty-icon svg { width: 100%; height: 100%; }
.ff-empty h3 { font-size: 18px; font-weight: 800; color: rgba(255,255,255,.8); }
.ff-empty p  { font-size: 14px; line-height: 1.5; }

.ff-feed-status {
  width: 100%;
  min-height: 96px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: rgba(255,255,255,.72);
  text-align: center;
}

.ff-feed-error { color: #ffc2bc; }

.ff-retry-btn {
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 999px;
  padding: 9px 18px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

/* ================================================================
   MODAL: COMENTARIOS
   ================================================================ */
.ff-comments-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  background: transparent;
  pointer-events: none;
}
.ff-comments-overlay.open { pointer-events: all; }

.ff-comments-sheet {
  width: 100%;
  background: var(--color-dark-2, #1e1e1e);
  border-radius: 20px 20px 0 0;
  max-height: 65%;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--transition-base);
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
}
.ff-comments-overlay.open .ff-comments-sheet { transform: translateY(0); }

.ff-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.ff-comments-title {
  font-size: 15px;
  font-weight: 800;
  color: white;
}
.ff-comments-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.ff-comments-close svg { width: 16px; height: 16px; }

.ff-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  scrollbar-width: none;
}
.ff-comments-list::-webkit-scrollbar { display: none; }

.ff-comment-item {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.ff-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--color-gray-4);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  overflow: hidden;
}
.ff-comment-avatar svg { width: 18px; height: 18px; }
.ff-comment-pending { opacity: .62; }
.ff-comment-body { flex: 1; }
.ff-comment-user  { font-size: 12px; font-weight: 800; color: rgba(255,255,255,.7); margin-bottom: 2px; }
.ff-comment-text  { font-size: 13px; color: rgba(255,255,255,.9); line-height: 1.5; }
.ff-comment-time  { font-size: 11px; color: rgba(255,255,255,.35); margin-top: 2px; }
.ff-comment-actions { display: flex; align-items: flex-start; gap: 4px; }
.ff-comment-actions button {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.55); cursor: pointer;
}
.ff-comment-actions button:hover { background: rgba(255,255,255,.1); color: #fff; }
.ff-comment-actions button:disabled { opacity: .4; }
.ff-comment-actions svg { width: 16px; height: 16px; }

.ff-comment-empty {
  text-align: center;
  padding: 32px 0;
  color: rgba(255,255,255,.3);
  font-size: 13px;
}
.ff-comment-empty span[data-icon] {
  width: 24px;
  height: 24px;
  display: block;
  margin: 0 auto 8px;
}
.ff-comment-empty .ff-retry-btn { display: block; margin: 14px auto 0; }

.ff-comments-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.ff-comment-input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-full);
  padding: 9px 16px;
  color: white;
  font-size: 13px;
  font-family: var(--font-body);
  outline: none;
}
.ff-comment-input::placeholder { color: rgba(255,255,255,.3); }
.ff-comment-input:focus { border-color: rgba(255,61,46,.5); }
.ff-comment-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--color-red);
  color: white;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: background var(--transition-fast);
}
.ff-comment-send:hover { background: var(--color-red-dark); }
.ff-comment-send:disabled { opacity: .55; cursor: wait; }
.ff-comment-send svg { width: 18px; height: 18px; }

/* ================================================================
   FF-04 — REPORTE Y OCULTAMIENTO
   ================================================================ */
.ff-report-overlay {
  position: absolute; inset: 0; z-index: 80; display: flex; align-items: flex-end;
  background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.ff-report-overlay.open { opacity: 1; pointer-events: auto; }
.ff-report-sheet {
  width: 100%; max-height: 88%; overflow-y: auto; padding: 20px 18px calc(20px + env(safe-area-inset-bottom));
  background: #1f1b19; color: #fff; border-radius: 22px 22px 0 0;
  transform: translateY(100%); transition: transform .25s ease;
}
.ff-report-overlay.open .ff-report-sheet { transform: translateY(0); }
.ff-report-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ff-report-header h2 { margin: 0; font-size: 18px; }
.ff-report-header button {
  width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.ff-report-header svg { width: 18px; height: 18px; }
.ff-report-sheet > p { color: rgba(255,255,255,.65); font-size: 13px; line-height: 1.45; margin: 10px 0 16px; }
.ff-report-reasons { display: grid; gap: 8px; }
.ff-report-reasons label {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 12px; font-size: 14px; cursor: pointer;
}
.ff-report-reasons input { accent-color: var(--color-red); }
.ff-report-details-label { display: block; margin: 16px 0 7px; font-size: 12px; font-weight: 700; }
#ff-report-details {
  width: 100%; min-height: 74px; resize: vertical; padding: 11px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); color: #fff; font: inherit;
}
.ff-report-submit {
  width: 100%; min-height: 46px; margin-top: 14px; border: 0; border-radius: 999px;
  background: var(--color-red); color: #fff; font: inherit; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 7px;
}
.ff-report-submit:disabled { opacity: .55; cursor: wait; }
.ff-report-submit svg { width: 17px; height: 17px; }
body.ff-report-open #active-order-btn,
body.ff-report-open .mobile-bottom-nav { display: none !important; }

/* Compartir conserva Reportar como acción secundaria. */
.ff-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 1450;
  display: flex;
  align-items: flex-end;
  background: rgba(0,0,0,.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.ff-share-overlay.open { opacity: 1; pointer-events: auto; }
.ff-share-sheet {
  width: 100%;
  padding: 20px 18px calc(18px + env(safe-area-inset-bottom));
  color: #fff;
  background: #1f1b19;
  border-radius: 22px 22px 0 0;
  transform: translateY(100%);
  transition: transform .24s ease;
}
.ff-share-overlay.open .ff-share-sheet { transform: translateY(0); }
.ff-share-header { display: flex; align-items: center; justify-content: space-between; }
.ff-share-header h2 { margin: 0; font-size: 18px; }
.ff-share-header button {
  width: 40px; height: 40px; border: 0; border-radius: 50%; color: #fff;
  background: rgba(255,255,255,.1); display: grid; place-items: center;
}
.ff-share-header svg { width: 18px; height: 18px; }
.ff-share-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 20px 0; }
.ff-share-options button {
  min-height: 86px; padding: 12px 6px; border: 0; border-radius: 14px;
  background: rgba(255,255,255,.08); color: #fff; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 12px; font-weight: 700;
}
.ff-share-options svg, .ff-whatsapp-mark { width: 27px; height: 27px; }
.ff-whatsapp-mark {
  display: grid; place-items: center; color: #53d769;
}
.ff-share-report {
  width: 100%; min-height: 46px; border: 0; border-top: 1px solid rgba(255,255,255,.1);
  background: transparent; color: rgba(255,255,255,.75); display: flex;
  align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700;
}
.ff-share-report svg { width: 18px; height: 18px; }

/* ================================================================
   MODAL: PEDIR AHORA
   ================================================================ */
.ff-order-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  backdrop-filter: blur(6px);
}
.ff-order-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.ff-order-sheet {
  width: 100%;
  background: white;
  border-radius: 24px 24px 0 0;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform var(--transition-base);
  padding-bottom: env(safe-area-inset-bottom);
}
.ff-order-overlay.open .ff-order-sheet { transform: translateY(0); }
.ff-order-error {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 180px;
  padding: 24px;
  color: var(--color-gray-2);
  text-align: center;
}
.ff-order-error p { margin: 0; }

.ff-order-handle {
  width: 36px;
  height: 4px;
  background: var(--color-gray-4);
  border-radius: 99px;
  margin: 12px auto 4px;
}
.ff-order-header {
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--color-gray-4);
}
.ff-order-rest-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.ff-order-rest-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-bg-2);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  overflow: hidden;
  flex-shrink: 0;
}
.ff-order-rest-logo img { width: 100%; height: 100%; object-fit: cover; }
.ff-order-rest-name { font-size: 16px; font-weight: 800; color: var(--color-dark); }
.ff-order-rest-meta { font-size: 12px; color: var(--color-gray-2); }

.ff-order-body { padding: 16px 20px; }
.ff-order-section-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--color-gray-2);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.ff-product-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-gray-4);
}
.ff-product-row:last-child { border-bottom: none; }
.ff-product-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background: var(--color-bg-2);
  object-fit: cover;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  overflow: hidden;
}
.ff-product-img img { width: 100%; height: 100%; object-fit: cover; }
.ff-product-info { flex: 1; }
.ff-product-name  { font-size: 14px; font-weight: 800; color: var(--color-dark); margin-bottom: 2px; }
.ff-product-desc  { font-size: 12px; color: var(--color-gray-2); line-height: 1.4; }
.ff-product-price { font-size: 15px; font-weight: 800; color: var(--color-dark); margin-top: 4px; }

.ff-product-add {
  width: 44px;
  height: 44px;
  border-radius: 0;
  background: transparent;
  color: var(--color-red);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}
.ff-product-add svg { width: 25px; height: 25px; stroke-width: 2.5; }
.ff-product-add:hover { background: transparent; color: var(--color-red-dark); transform: scale(1.08); }
.ff-product-add.added { background: transparent; color: #16803a; animation: addPop 0.3s ease; }
@keyframes addPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.ff-order-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--color-gray-4);
}
.ff-order-cta {
  width: 100%;
  padding: 15px;
  background: var(--color-red);
  color: white;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,61,46,.35);
  transition: all var(--transition-fast);
}
.ff-order-cta:hover { background: var(--color-red-dark); }

/* ================================================================
   RESPONSIVO DESKTOP — estilos adicionales
   ================================================================ */
@media (min-width: 769px) {
  .ff-order-sheet  { max-width: 480px; margin: 0 auto; border-radius: 24px 24px 0 0; }
  .ff-comments-sheet { max-width: 480px; margin: 0 auto; }
}

/* ================================================================
   FF-05 — EXPERIENCIA MÓVIL INMERSIVA
   Un solo lienzo de video. La navegación global queda fuera mientras el
   usuario consume el feed y vuelve al cerrar FoodFeed.
   ================================================================ */
@media (max-width: 768px) {
  body.foodfeed-active {
    padding-bottom: 0 !important;
    background: #000;
    overscroll-behavior: none;
  }

  body.foodfeed-active #main-header,
  body.foodfeed-active .mobile-search-bar,
  body.foodfeed-active .mobile-bottom-nav,
  body.foodfeed-active #active-order-btn {
    display: none !important;
  }

  #foodfeed-view {
    top: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    bottom: auto;
    z-index: 1200;
    overflow: hidden;
  }

  .ff-tab-close {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: calc(10px + env(safe-area-inset-left));
    right: auto;
    z-index: 40;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    color: #fff;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,.75));
    backdrop-filter: none;
  }
  .ff-tab-close svg { width: 28px; height: 28px; }

  .ff-tabs {
    top: calc(10px + env(safe-area-inset-top));
    padding: 5px calc(12px + env(safe-area-inset-right)) 8px calc(60px + env(safe-area-inset-left));
    gap: 5px;
    background: transparent;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .ff-tab {
    min-height: 34px;
    padding: 6px 11px;
    font-size: 12px;
    background: rgba(8,8,8,.34);
    border-color: rgba(255,255,255,.12);
    backdrop-filter: blur(10px);
  }

  .ff-tab.active {
    background: rgba(255,255,255,.92);
    color: #17120f;
    border-color: transparent;
  }

  .ff-scroll,
  .ff-item {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
  }

  .ff-item { flex-shrink: 0; }
  .ff-gradient-top { display: none; }
  .ff-gradient-bottom { display: none; }

  .ff-mute-btn {
    top: calc(64px + env(safe-area-inset-top));
    right: calc(14px + env(safe-area-inset-right));
    bottom: auto;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.75));
  }
  .ff-mute-btn.unmuted { background: transparent; border: 0; }

  .ff-actions {
    right: calc(10px + env(safe-area-inset-right));
    bottom: calc(30px + env(safe-area-inset-bottom));
    gap: 15px;
  }

  .ff-action-btn { gap: 3px; min-width: 44px; min-height: 44px; }
  .ff-action-icon {
    width: 34px; height: 34px; border: 0; border-radius: 0;
    background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.75));
  }
  .ff-action-icon svg { width: 28px; height: 28px; }
  .ff-action-btn:hover .ff-action-icon,
  .ff-action-btn:active .ff-action-icon,
  .ff-action-btn.liked .ff-action-icon,
  .ff-action-btn.saved .ff-action-icon { background: transparent; border-color: transparent; }
  .ff-avatar { width: 43px; height: 43px; font-size: 18px; }
  .ff-action-count { font-size: 11px; }

  .ff-info {
    left: calc(14px + env(safe-area-inset-left));
    right: calc(68px + env(safe-area-inset-right));
    bottom: calc(22px + env(safe-area-inset-bottom));
    max-height: 48%;
  }

  .ff-badge { margin-bottom: 6px; background: rgba(8,8,8,.38); }
  .ff-restaurant-name { font-size: 16px; margin-bottom: 5px; }
  .ff-description { font-size: 13px; line-height: 1.38; margin-bottom: 5px; }
  .ff-tags { margin-bottom: 5px; }
  .ff-order-btn {
    width: auto;
    align-self: flex-start;
    min-height: 42px;
    padding: 10px 18px;
    margin-top: 5px;
    box-shadow: 0 5px 20px rgba(255,61,46,.4);
  }

  .ff-progress { bottom: env(safe-area-inset-bottom); height: 18px; }

  .ff-comments-overlay { position: fixed; inset: 0; z-index: 1400; background: transparent; }
  .ff-comments-overlay.open { background: rgba(0,0,0,.42); }
  .ff-comments-sheet {
    max-height: min(72dvh, 620px);
    padding-bottom: 0;
    border-radius: 22px 22px 0 0;
  }
  .ff-comments-close { width: 40px; height: 40px; }
  .ff-comments-input-wrap { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }

  .ff-report-overlay, .ff-share-overlay { position: fixed; inset: 0; z-index: 1450; }
  .ff-empty { padding-top: calc(88px + env(safe-area-inset-top)); }
}

@media (max-width: 370px) {
  .ff-tab { padding-inline: 9px; }
  .ff-actions { gap: 8px; }
  .ff-action-icon { width: 32px; height: 32px; }
  .ff-avatar { width: 40px; height: 40px; }
  .ff-info { right: 62px; }
}
