/* Descontaí - App CSS — Estilo iFood com identidade própria */
:root {
  --red: #EA1D2C;
  --red-dark: #C41020;
  --red-light: #FDECEA;
  /* Hierarquia visual */
  --green: #16A34A;
  --green-dark: #15803D;
  --green-light: #DCFCE7;
  --green-mid: #BBF7D0;   /* acento verde sutil — bordas e indicadores */
  --green-faint: #F0FDF4; /* fundo verdinho ultra-leve */
  --amber: #F59E0B;
  --amber-dark: #D97706;
  --amber-light: #FEF3C7;
  --orange: #EA580C;
  --orange-dark: #C2410C;
  --orange-light: #FFF7ED;
  --yellow: #FFC107;
  --yellow-light: #FFF8E1;
  --yellow-dark: #F9A825;
  --white: #FFFFFF;
  --bg: #F4F6F8;
  --gray-100: #F0F1F3;
  --gray-200: #E3E5E8;
  --gray-300: #C8CDD4;
  --gray-400: #A8AEBA;
  --gray-500: #858D9A;
  --gray-600: #606773;
  --gray-700: #3E444E;
  --text: #1A1C1E;
  --text-secondary: #606773;
  --shadow-sm: 0 1px 5px rgba(0,0,0,0.07), 0 0.5px 2px rgba(0,0,0,0.05);
  --shadow: 0 3px 14px rgba(0,0,0,0.09), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 28px rgba(0,0,0,0.13), 0 2px 8px rgba(0,0,0,0.07);
  --shadow-green: 0 3px 12px rgba(22,163,74,0.15);
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --transition: 0.18s ease;
  --bottom-nav-height: 68px;
  --header-height: 72px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
}
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, textarea, select { font-family: inherit; outline: none; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ── Screens ── */
.screen { display: none; flex-direction: column; background: var(--bg); }
.screen.active {
  display: flex; flex-direction: column;
  height: 100vh;
  height: 100dvh;
  /* NÃO usar overflow:hidden aqui — quebraria position:fixed dos modais no iOS */
}
.scroll-content {
  flex: 1; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  /* padding-bottom garante que o conteúdo não fique atrás da barra inferior */
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 28px);
}

/* ── Header ── */
.app-header {
  background: var(--red);
  padding: 0 16px;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  /* overflow:visible garante que os botões são clicáveis mesmo com z-index */
  overflow: visible;
  box-shadow: 0 2px 10px rgba(234,29,44,0.28), 0 1px 3px rgba(0,0,0,0.1);
}
.header-logo {
  display: flex; align-items: center; gap: 6px;
}
.logo-text {
  font-weight: 900; font-size: 22px; color: white;
  letter-spacing: -0.5px;
}
.logo-tag {
  font-size: 11px; color: rgba(255,255,255,0.85);
  font-weight: 500; margin-top: 2px;
}
.header-actions { display: flex; align-items: center; gap: 8px; position: relative; z-index: 101; }
.icon-btn {
  /* área de toque mínima 44×44px (WCAG 2.5.5 / Apple HIG) */
  min-width: 44px; min-height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 17px; transition: var(--transition);
  cursor: pointer; border: none;
  /* remove delay de 300ms em iOS/Android */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative; z-index: 2;
}
.icon-btn:hover { background: rgba(255,255,255,0.28); }
.icon-btn:active { transform: scale(0.92); }
.avatar-btn {
  /* área de toque mínima 44×44px */
  min-width: 44px; min-height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.22); border: 2px solid rgba(255,255,255,0.7);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; cursor: pointer;
  transition: var(--transition);
  /* remove delay de 300ms em iOS/Android */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative; z-index: 2;
}
.avatar-btn:hover { background: rgba(255,255,255,0.35); }
.avatar-btn:active { transform: scale(0.92); }

/* ── Search Bar ── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: white;
  border-radius: 12px;
  padding: 11px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.09);
  border: 1.5px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-bar:focus-within {
  border-color: var(--green-mid);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07), 0 0 0 3px rgba(22,163,74,0.08);
}
.search-bar i { color: var(--gray-400); font-size: 15px; transition: color 0.2s; }
.search-bar:focus-within i { color: var(--green); }
.search-bar input {
  flex: 1; background: none; border: none;
  font-size: 14px; color: var(--text);
}
.search-bar input::placeholder { color: var(--gray-400); }

/* ── Location Row ── */
.location-row {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 16px 4px;
}
.location-row i { color: var(--red); font-size: 14px; }
.location-label { font-size: 13px; color: var(--gray-600); font-weight: 500; }

/* ── Location Toggle (Geral / Perto de mim) ── */
.loc-toggle {
  display: flex;
  align-items: center;
  background: #F3F4F6;
  border-radius: 20px;
  padding: 3px;
  gap: 2px;
  margin-left: auto;
}
.loc-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 12px;
  border-radius: 16px;
  border: none;
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  color: #6B7280;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  line-height: 1;
}
.loc-toggle-btn i { font-size: 11px; }
.loc-toggle-btn.active {
  background: white;
  color: var(--red);
  box-shadow: 0 1px 5px rgba(0,0,0,0.12);
  border-bottom: 2px solid var(--green);
}
.loc-toggle-btn.active.near {
  color: #1D4ED8;
}
.loc-toggle-btn.active.near i { color: #1D4ED8; }

/* ── Bottom Navigation ── */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--white);
  border-top: 1.5px solid var(--gray-200);
  display: flex; align-items: stretch;
  height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  z-index: 100;
  box-shadow: 0 -3px 16px rgba(0,0,0,0.07);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; color: var(--gray-400);
  font-size: 10px; font-weight: 600; padding: 6px 4px;
  transition: var(--transition);
  text-transform: uppercase; letter-spacing: 0.3px;
  position: relative;
}
.nav-item i { font-size: 21px; }
.nav-item.active { color: var(--red); }
.nav-item.active i { transform: scale(1.08); }
/* Indicador verde na nav ativa */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 3px;
  background: var(--green);
  border-radius: 0 0 4px 4px;
}

/* ── Scrollable Content ── */
/* ── Section Header ── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 10px;
}
.section-title {
  font-size: 17px; font-weight: 800; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
/* Linha verde sutil à esquerda do título de seção */
.section-title::before {
  content: '';
  display: inline-block;
  width: 3px; height: 18px;
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  border-radius: 2px;
  flex-shrink: 0;
}
.section-link { font-size: 13px; color: var(--red); font-weight: 600; }

/* ── Categories Scroll Horizontal ── */
.categories-scroll {
  display: flex; gap: 10px; padding: 4px 16px 16px;
  overflow-x: auto; scrollbar-width: none;
  background: white;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  flex-shrink: 0;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: white; border-radius: 13px;
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.2s ease;
  min-width: 64px;
}
.cat-chip:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.cat-chip-icon { font-size: 22px; }
.cat-chip-label { font-size: 11px; font-weight: 600; color: var(--gray-600); white-space: nowrap; }
.cat-chip.active {
  border-color: var(--green-mid);
  background: var(--green-faint);
  box-shadow: var(--shadow-green);
}
.cat-chip.active .cat-chip-label { color: var(--green-dark); font-weight: 700; }

/* ── Categories Grid ── */
.categories-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 10px; padding: 4px 16px 16px;
  background: white;
}
.cat-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: white; border-radius: 13px;
  padding: 14px 8px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.2s ease;
  aspect-ratio: 1;
  justify-content: center;
}
.cat-grid-icon { font-size: 26px; }
.cat-grid-label { font-size: 11px; font-weight: 600; color: var(--gray-600); text-align: center; line-height: 1.2; }
.cat-grid-item.active { border-color: var(--green-mid); background: var(--green-faint); box-shadow: var(--shadow-green); }
.cat-grid-item.active .cat-grid-label { color: var(--green-dark); font-weight: 700; }

/* ── Divider ── */
.divider { height: 8px; background: var(--bg); }

/* ── Product Cards ── */
.products-grid { padding: 0 16px 8px; display: flex; flex-direction: column; gap: 12px; }
.product-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-left-color 0.2s;
  border: 1px solid var(--gray-200);
  /* Linha verde sutil na borda esquerda — indica economia */
  border-left: 3px solid var(--green-mid);
}
.product-card:active { transform: scale(0.985); box-shadow: var(--shadow); }
.product-card:hover { border-left-color: var(--green); box-shadow: var(--shadow); }

.product-img-wrap {
  width: 120px; min-height: 120px; flex-shrink: 0;
  position: relative; overflow: hidden;
  background: var(--gray-100);
  border-radius: 8px 0 0 8px;
}
.product-img {
  width: 120px; height: 120px;
  object-fit: cover; object-position: center;
  display: block;
}
.product-img-placeholder {
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; background: var(--gray-100);
}
.discount-badge-img {
  position: absolute; top: 6px; left: 6px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  padding: 4px 8px; border-radius: 7px;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(234,29,44,0.35);
  letter-spacing: 0.2px;
}

.product-info { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.product-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; }
.product-store { font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 4px; margin-top: 1px; }
.product-prices { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.price-original { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }
.price-discount {
  font-size: 19px; font-weight: 900; color: var(--green);
  text-shadow: 0 1px 3px rgba(22,163,74,0.12);
}

.product-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 7px; border-radius: 6px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.2px;
  text-transform: uppercase;
}
.tag-expiry { background: var(--orange-light); color: var(--orange); }
.tag-expiry.urgent { background: #FDECEA; color: var(--red); }
.tag-units { background: var(--amber-light); color: var(--amber-dark); }
.tag-discount { background: var(--amber-light); color: var(--amber-dark); }
.tag-distance { background: var(--gray-100); color: var(--gray-600); }
.tag-stock { background: #FFF3E0; color: #E65100; }

/* ── Horizontal Products Scroll ── */
.products-scroll {
  display: flex; gap: 12px;
  padding: 4px 16px 16px;
  overflow-x: auto; scrollbar-width: none;
}
.products-scroll::-webkit-scrollbar { display: none; }
.product-card-v {
  flex-shrink: 0; width: 160px;
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  cursor: pointer; transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--gray-200);
  /* Borda verde sutil no bottom — indica item com desconto ativo */
  border-bottom: 2.5px solid var(--green-mid);
}
.product-card-v:active { transform: scale(0.97); box-shadow: var(--shadow); }
.product-card-v:hover { border-bottom-color: var(--green); box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card-v-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: 160px;
  object-fit: cover; object-position: center;
  display: block;
  background: var(--gray-100);
  border-radius: 8px 8px 0 0;
}
.product-card-v-img-placeholder {
  width: 100%; height: 160px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; background: var(--gray-100);
  border-radius: 8px 8px 0 0;
}
.product-card-v-badge {
  position: absolute; top: 6px; left: 6px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  padding: 4px 8px; border-radius: 7px;
  font-size: 11px; font-weight: 800;
  box-shadow: 0 2px 6px rgba(234,29,44,0.35);
  letter-spacing: 0.2px;
}
.product-card-v-info { padding: 8px 10px 10px; }
.product-card-v-name { font-size: 13px; font-weight: 700; line-height: 1.3; margin-bottom: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card-v-store { font-size: 11px; color: var(--gray-500); margin-bottom: 6px; }
.product-card-v-price { font-size: 16px; font-weight: 900; color: var(--green); text-shadow: 0 1px 3px rgba(22,163,74,0.12); }
.product-card-v-original { font-size: 11px; color: var(--gray-400); text-decoration: line-through; }
/* Tag de economia verde — micro detalhe abaixo do preço */
.product-card-v-saving {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--green-faint);
  border: 1px solid var(--green-mid);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px; font-weight: 700;
  color: var(--green-dark);
  margin-top: 3px;
  letter-spacing: 0.1px;
}

/* ── Banner Urgente ── */
.urgency-banner {
  background: linear-gradient(135deg, var(--red) 0%, #C41020 100%);
  margin: 0 16px 8px;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  color: white;
}
.urgency-banner-icon { font-size: 32px; flex-shrink: 0; }
.urgency-banner-title { font-size: 15px; font-weight: 800; }
.urgency-banner-sub { font-size: 12px; opacity: 0.88; margin-top: 2px; }
.urgency-banner-count {
  margin-left: auto; flex-shrink: 0;
  background: var(--yellow); color: var(--text);
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900;
}

/* ── Countdown ── */
.countdown {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--red); color: white;
  padding: 4px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}
.countdown i { font-size: 11px; }

/* ── Product Detail Modal ── */
.modal-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  display: none;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.modal-overlay.open {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-end;
  align-items: flex-end;
  -webkit-justify-content: center;
  justify-content: center;
}
.modal-sheet {
  background: white;
  border-radius: 20px 20px 0 0;
  width: 100%; min-height: 200px; max-height: 94vh;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: slideUp 0.28s ease;
  padding-bottom: calc(20px + var(--safe-bottom));
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  position: relative; z-index: 1;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-handle {
  width: 36px; height: 4px;
  background: var(--gray-300); border-radius: 100px;
  margin: 10px auto 4px;
}
.modal-product-img {
  width: 100%; height: 220px;
  object-fit: cover; object-position: center;
  display: block;
  border-radius: 0;
  background: var(--gray-100);
}
.modal-product-img-placeholder {
  width: 100%; height: 220px;
  display: flex; align-items: center; justify-content: center;
  font-size: 80px; background: var(--gray-100);
}
.modal-content { padding: 0 18px; }
.modal-product-name { font-size: 21px; font-weight: 900; margin: 14px 0 6px; color: var(--text); line-height: 1.25; }
.modal-store-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.store-logo-sm {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--gray-100); display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.modal-price-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
}
.modal-price-big { font-size: 34px; font-weight: 900; color: var(--red); }
.modal-original { font-size: 15px; color: var(--gray-400); text-decoration: line-through; margin-top: 2px; }
.pct-badge {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  padding: 8px 14px; border-radius: 10px;
  font-size: 18px; font-weight: 900;
  box-shadow: 0 3px 10px rgba(234,29,44,0.3);
}
/* Faixa de economia verde no modal de produto */
.modal-saving-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--green-faint);
  border: 1.5px solid var(--green-mid);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 8px 0;
}
.modal-saving-label {
  font-size: 12px; font-weight: 600; color: var(--green-dark);
  display: flex; align-items: center; gap: 5px;
}
.modal-saving-value {
  font-size: 15px; font-weight: 900; color: var(--green);
}
.info-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--gray-100);
}
.info-icon {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}
.info-icon.red { background: var(--red-light); color: var(--red); }
.info-icon.yellow { background: var(--yellow-light); color: var(--yellow-dark); }
.info-icon.gray { background: var(--gray-100); color: var(--gray-600); }
.info-label { font-size: 11px; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
.info-value { font-size: 14px; font-weight: 700; color: var(--text); margin-top: 1px; }
.reserve-btn {
  width: 100%; padding: 18px; border-radius: 14px;
  background: var(--red); color: white;
  font-size: 17px; font-weight: 800;
  margin-top: 18px; transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  letter-spacing: 0.2px;
}
.reserve-btn:hover { background: var(--red-dark); }
.reserve-btn:disabled { background: var(--gray-300); cursor: not-allowed; }

/* ── Auth Modal ── */
.auth-card {
  background: white;
  border-radius: 20px 20px 0 0;
  flex: 1; padding: 24px 20px;
}
.auth-tabs {
  display: flex; background: var(--gray-100);
  border-radius: 12px; padding: 4px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  border-radius: 9px; font-size: 14px; font-weight: 700;
  color: var(--gray-500); transition: var(--transition); cursor: pointer; border: none; background: none;
}
.auth-tab.active { background: white; color: var(--red); box-shadow: 0 2px 8px rgba(0,0,0,0.10); }
/* Card de escolha no modal de auth */
.auth-choice-card {
  display: flex; align-items: center; gap: 14px;
  background: white; border: 2.5px solid #E5E7EB;
  border-radius: 16px; padding: 18px 16px;
  cursor: pointer; transition: all 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.auth-choice-card:active { transform: scale(0.98); opacity: 0.9; }
/* Badge de features nos cards de escolha */
.auth-badge {
  font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 20px;
  display: inline-block;
}
/* Seletor de tipo (login) — mantido para compatibilidade, agora oculto por padrão */
.user-type-selector { display: flex; gap: 10px; margin-bottom: 18px; }
.user-type-btn {
  flex: 1; padding: 13px 8px; border-radius: 12px;
  border: 2px solid var(--gray-200); background: white;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; color: var(--gray-600);
  transition: var(--transition); cursor: pointer;
}
.user-type-btn i { font-size: 22px; }
.user-type-btn.active { border-color: var(--red); background: var(--red-light); color: var(--red); }

/* ── Form Styles ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 13px; font-weight: 700; color: var(--gray-700); margin-bottom: 5px; }
.form-input {
  width: 100%; padding: 13px 14px;
  border: 2px solid var(--gray-200); border-radius: 10px;
  font-size: 15px; color: var(--text);
  transition: var(--transition); background: white;
}
.form-input:focus { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light); }
.form-input::placeholder { color: var(--gray-300); }

/* ── Password wrapper com botão olho ── */
.pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pwd-wrap .form-input {
  padding-right: 46px;
}
.pwd-toggle {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-400);
  font-size: 17px;
  padding: 0;
  transition: color 0.2s;
}
.pwd-toggle:hover { color: var(--red); }

/* ── Botões flutuantes (Admin e Lojista) ── */
#adminBackBtn, #storeBackBtn {
  animation: adminBtnPop 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
#storeBackBtn button {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#storeBackBtn button:hover {
  transform: scale(1.04);
}
@keyframes adminBtnPop {
  from { transform: scale(0.7) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0);      opacity: 1; }
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-hint { font-size: 11px; color: var(--gray-500); margin-top: 4px; }

/* ── Buttons ── */
.btn-primary {
  width: 100%; padding: 16px;
  background: var(--red); color: white;
  border-radius: 12px; font-size: 16px; font-weight: 800;
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.2px;
}
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { background: var(--gray-300); cursor: not-allowed; }
.btn-secondary {
  width: 100%; padding: 14px;
  background: var(--gray-100); color: var(--gray-700);
  border-radius: 12px; font-size: 15px; font-weight: 700;
  transition: var(--transition);
}
.btn-secondary:hover { background: var(--gray-200); }
.btn-outline {
  padding: 9px 16px; border-radius: 8px;
  border: 2px solid var(--red); color: var(--red);
  font-size: 13px; font-weight: 700; background: none;
  transition: var(--transition);
}
.btn-outline:hover { background: var(--red-light); }
.btn-danger {
  padding: 9px 16px; border-radius: 8px;
  background: var(--red-light); color: var(--red);
  font-size: 13px; font-weight: 700;
  transition: var(--transition);
}
.btn-danger:hover { background: #FECDD3; }

/* ── Dashboard ── */
.dashboard-header {
  background: var(--red);
  padding: 20px 16px 28px; color: white;
}
.stats-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 16px;
  margin-top: -16px;
}
.stat-card {
  background: white; border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow-sm); text-align: center;
}
.stat-number { font-size: 28px; font-weight: 900; color: var(--red); }
.stat-number.yellow { color: var(--yellow-dark); }
.stat-number.gray { color: var(--gray-600); }
.stat-label { font-size: 11px; color: var(--gray-500); margin-top: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }

/* ── Product Manage Cards ── */
.product-manage-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden;
  display: flex; margin: 0 16px 10px;
  position: relative; border: 1px solid var(--gray-200);
}
.product-manage-info { flex: 1; padding: 10px 12px; }
.product-manage-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.product-manage-meta { font-size: 12px; color: var(--gray-500); margin-bottom: 8px; }
.product-manage-actions { display: flex; gap: 8px; }
.product-status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  position: absolute; top: 10px; right: 10px;
}
.dot-active { background: #22C55E; }
.dot-expiring { background: var(--yellow); }
.dot-expired { background: var(--red); }

/* ── Reservation Cards ── */
.reservation-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 14px; margin: 0 16px 10px;
  border: 1px solid var(--gray-200);
}
.reservation-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.reservation-product { font-size: 15px; font-weight: 800; }
.reservation-store { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.status-badge {
  padding: 4px 10px; border-radius: 8px; font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.status-pending { background: var(--yellow-light); color: var(--yellow-dark); }
.status-confirmed { background: #DCFCE7; color: #16A34A; }
.status-completed { background: var(--gray-100); color: var(--gray-600); }
.status-cancelled { background: var(--red-light); color: var(--red); }

.pickup-code-box {
  background: var(--red-light); border: 2px dashed var(--red);
  border-radius: 10px; padding: 12px;
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.pickup-code-label { font-size: 10px; color: var(--red); font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px; }
.pickup-code { font-size: 26px; font-weight: 900; color: var(--red); letter-spacing: 5px; }

/* ── Floating Button ── */
.floating-add-btn {
  position: fixed; bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
  right: 16px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--red); color: white;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(234,29,44,0.4);
  z-index: 200; transition: var(--transition);
}
.floating-add-btn:hover { background: var(--red-dark); transform: scale(1.06); }

/* ── Toast ── */
.toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%) translateY(-80px);
  background: var(--text); color: white;
  padding: 12px 20px; border-radius: 100px;
  font-size: 14px; font-weight: 600; z-index: 9999;
  transition: transform 0.3s ease; white-space: nowrap;
  max-width: calc(100% - 32px); text-align: center;
  display: flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { background: #16A34A; }
.toast.error { background: var(--red); }
.toast.warning { background: var(--yellow-dark); }

/* ── Loading ── */
.loading-overlay {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(255,255,255,0.85);
  display: none; align-items: center; justify-content: center;
  z-index: 9000; backdrop-filter: blur(2px);
}
.loading-overlay.show { display: flex; }
.spinner {
  width: 42px; height: 42px; border-radius: 50%;
  border: 4px solid var(--red-light);
  border-top-color: var(--red);
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.empty-state {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 56px 24px; text-align: center;
}
.empty-icon { font-size: 56px; margin-bottom: 14px; }
.empty-title { font-size: 17px; font-weight: 800; color: var(--gray-700); margin-bottom: 6px; }
.empty-subtitle { font-size: 13px; color: var(--gray-500); line-height: 1.5; max-width: 260px; }

/* ── Alert ── */
.alert {
  padding: 11px 14px; border-radius: 10px;
  font-size: 13px; margin-bottom: 14px;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-warning { background: var(--yellow-light); color: #7C4A00; }
.alert-info { background: #EFF6FF; color: #1E40AF; }
.alert-red { background: var(--red-light); color: var(--red); }

/* ── Profile ── */
.profile-header {
  background: var(--red);
  padding: 30px 20px; display: flex; flex-direction: column;
  align-items: center; color: white;
}
.profile-avatar-wrap {
  position: relative; cursor: pointer; margin-bottom: 10px;
  width: 76px; height: 76px;
}
.profile-avatar-wrap:active { opacity: 0.85; }
.profile-avatar {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--yellow); border: 3px solid white;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; font-weight: 900; color: var(--text);
  overflow: hidden;
}
.profile-avatar-cam {
  position: absolute; bottom: 0; right: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0,0,0,0.65); border: 2px solid white;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 11px;
}
.profile-name { font-size: 20px; font-weight: 900; }
.profile-type { font-size: 13px; opacity: 0.85; margin-top: 3px; }
.menu-item {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; background: white;
  border: none; border-bottom: 1px solid var(--gray-100);
  font-size: 15px; font-weight: 600; color: var(--gray-700);
  transition: var(--transition); cursor: pointer;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
  touch-action: manipulation; box-shadow: none; outline: none;
  font-family: inherit; text-decoration: none;
}
.menu-item:active { background: var(--gray-100); }
.menu-item:focus { outline: none; }
.menu-item i { width: 22px; text-align: center; font-size: 17px; color: var(--red); }
.menu-item .chevron { margin-left: auto; color: var(--gray-300); }
.menu-icon {
  width: 36px; height: 36px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 16px;
}

/* ── Misc ── */
.white-card {
  background: white; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin: 0 16px;
  border: 1px solid var(--gray-200);
}
.pill-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px; border-radius: 100px;
  font-size: 12px; font-weight: 700;
}
.pill-red { background: var(--red); color: white; }
.pill-yellow { background: var(--yellow); color: var(--text); }

@media (min-width: 480px) {
  body { border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); }
  .bottom-nav, .toast { max-width: 480px; }
}

/* ── iPad e telas grandes (>= 600px) ── */
@media (min-width: 600px) {
  html {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    min-height: 100vh;
  }
  body {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    box-shadow: 0 0 48px rgba(0,0,0,0.18);
    border-left: none !important;
    border-right: none !important;
  }
  .bottom-nav { max-width: 480px; left: 50%; transform: translateX(-50%); }
  .toast { max-width: 460px; }
}

/* ── Admin Panel ── */
.btn-admin-nav {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: white; border: 1px solid #E5E7EB; border-radius: 12px;
  padding: 16px 12px; font-size: 13px; font-weight: 600; color: #374151;
  cursor: pointer; transition: var(--transition); position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.btn-admin-nav:hover { background: #F9FAFB; border-color: #D1D5DB; }
.btn-admin-nav:active { transform: scale(0.97); background: #F3F4F6; }
.admin-badge {
  position: absolute; top: 8px; right: 8px;
  background: var(--red); color: white; font-size: 11px; font-weight: 800;
  padding: 2px 7px; border-radius: 20px; min-width: 20px; text-align: center;
}
.admin-stat-card {
  border-radius: 12px; padding: 14px 10px; text-align: center;
}
.admin-stat-num { font-size: 26px; font-weight: 900; line-height: 1; }
.admin-stat-label { font-size: 11px; color: #666; margin-top: 4px; font-weight: 600; }

/* ── Urgency banners (cards consumidor) ── */
.card-urgent {
  border: 2px solid #EA1D2C !important;
  border-radius: 12px;
  overflow: hidden;
}
.card-urgent-h {
  border-left: 4px solid #EA1D2C !important;
}
.urgent-banner-today {
  background: linear-gradient(90deg, #EA1D2C, #C41020);
  color: white; font-size: 10px; font-weight: 900;
  padding: 4px 10px; text-align: center;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.urgent-banner-tomorrow {
  background: linear-gradient(90deg, #F9A825, #F57F17);
  color: white; font-size: 10px; font-weight: 900;
  padding: 4px 10px; text-align: center;
  letter-spacing: 0.5px; text-transform: uppercase;
}
.urgent-img-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #EA1D2C; color: white;
  font-size: 10px; font-weight: 900;
  padding: 3px 0; text-align: center;
  letter-spacing: 0.5px;
}
.countdown-bar {
  background: #FEF2F2; border-radius: 6px;
  padding: 5px 10px; font-size: 12px;
  color: #EA1D2C; font-weight: 700;
  margin: 4px 0; display: flex; align-items: center; gap: 6px;
}
.badge-pulse {
  animation: pulse-badge 1.4s ease-in-out infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(234,29,44,0.45); }
  50%       { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(234,29,44,0); }
}

/* ── Alertas do painel lojista ── */
.alert-urgent-banner {
  background: linear-gradient(135deg, #EA1D2C, #C41020);
  color: white; border-radius: 14px; padding: 14px 16px;
  margin-bottom: 10px;
  animation: glow-red 2s ease-in-out infinite;
}
@keyframes glow-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(234,29,44,0.4); }
  50%       { box-shadow: 0 0 16px 4px rgba(234,29,44,0.35); }
}
.alert-urgent-item {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.15); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px;
}
.alert-warning-banner {
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border: 1.5px solid #FFC107; border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px;
  color: #92400E;
}
.alert-warning-item {
  display: flex; align-items: center; gap: 10px;
  background: white; border-radius: 10px;
  padding: 10px 12px; margin-bottom: 8px;
  border: 1px solid #FDE68A;
}

/* ── Quick price button ── */
.btn-quick-price {
  background: #EA1D2C; color: white;
  border: none; border-radius: 8px;
  padding: 8px 14px; font-size: 12px; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: transform 0.15s;
}
.btn-quick-price:active { transform: scale(0.95); }
.btn-quick-pct {
  background: #F7F7F7; border: 1.5px solid #DDD;
  border-radius: 20px; padding: 6px 14px;
  font-size: 13px; font-weight: 700; color: #1C1C1C;
  cursor: pointer; transition: all 0.15s;
}
.btn-quick-pct:hover, .btn-quick-pct:active {
  background: #EA1D2C; color: white; border-color: #EA1D2C;
}

/* ── MODAL INSTITUCIONAL — SOBRE O DESCONTO TÁ AÍ ── */
.about-sheet { padding-bottom: calc(24px + var(--safe-bottom)); }

.about-hero {
  background: linear-gradient(135deg, #EA1D2C 0%, #c0111e 100%);
  padding: 28px 20px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.about-hero::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.about-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -20px;
  width: 150px; height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.about-hero-icon {
  font-size: 48px;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}
.about-hero-title {
  font-size: 20px;
  font-weight: 900;
  color: white;
  line-height: 1.25;
  position: relative;
  z-index: 1;
  margin: 0;
}

.about-body { padding: 20px 20px 8px; }

.about-lead {
  font-size: 15px;
  color: #1C1C1C;
  line-height: 1.65;
  margin-bottom: 10px;
  font-weight: 500;
}
.about-sub {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 3px solid #EA1D2C;
}

/* Três pilares */
.about-pillars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.about-pillar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
}
.pillar-green { background: #DCFCE7; }
.pillar-red   { background: #FEE2E2; }
.pillar-leaf  { background: #D1FAE5; }

.pillar-icon { font-size: 26px; flex-shrink: 0; }
.pillar-title {
  font-size: 14px;
  font-weight: 800;
  color: #1C1C1C;
  margin-bottom: 2px;
}
.pillar-desc { font-size: 12px; color: #555; line-height: 1.4; }

/* Missão */
.about-mission {
  background: #1C1C1C;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 20px;
}
.about-mission-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 6px;
}
.about-mission-text {
  font-size: 13px;
  color: #F3F4F6;
  line-height: 1.65;
  font-style: italic;
}

/* Versão e botão */
.about-version {
  text-align: center;
  font-size: 11px;
  color: #AAA;
  margin-bottom: 16px;
}
.about-close-btn {
  width: 100%;
  font-size: 15px;
  padding: 14px;
}

/* ── MANUAL IN-APP ── */
.iam-sheet { max-height: 92vh; }

.iam-hero {
  padding: 26px 20px 22px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.iam-hero::before {
  content: ''; position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}
.iam-hero-icon { font-size: 40px; margin-bottom: 8px; position: relative; z-index: 1; }
.iam-hero-title { font-size: 19px; font-weight: 900; color: white; position: relative; z-index: 1; }
.iam-hero-sub { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 4px; position: relative; z-index: 1; }

.iam-body { padding: 8px 16px 12px; }

.iam-section { margin-bottom: 20px; }
.iam-section-title {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 7px;
}

.iam-text { font-size: 13px; color: #374151; line-height: 1.6; margin-bottom: 8px; }

.iam-tip {
  background: #ECFDF5; border-left: 3px solid #16A34A;
  border-radius: 0 10px 10px 0;
  padding: 10px 12px; font-size: 12px; color: #14532D;
  display: flex; gap: 8px; align-items: flex-start;
  margin: 8px 0;
}
.iam-warn {
  background: #FFFBEB; border-left: 3px solid #F59E0B;
  border-radius: 0 10px 10px 0;
  padding: 10px 12px; font-size: 12px; color: #78350F;
  display: flex; gap: 8px; align-items: flex-start;
  margin: 8px 0;
}

.iam-steps { list-style: none; padding: 0; margin: 0 0 8px; }
.iam-steps li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: #374151;
  padding: 6px 0; border-bottom: 1px solid #F3F4F6;
}
.iam-steps li:last-child { border-bottom: none; }
.iam-step-num {
  min-width: 22px; height: 22px; border-radius: 50%;
  background: var(--red); color: white;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}

.iam-table-wrap { overflow-x: auto; margin-bottom: 8px; }
.iam-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.iam-table th {
  background: #F9FAFB; padding: 7px 10px;
  text-align: left; font-weight: 700;
  color: #6B7280; font-size: 11px;
  border-bottom: 1px solid #E5E7EB;
}
.iam-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
  color: #374151; vertical-align: top;
}
.iam-table tr:last-child td { border-bottom: none; }

.iam-pillars { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.iam-pillar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 12px;
}
.iam-pillar-icon { font-size: 24px; flex-shrink: 0; }
.iam-pillar-label { font-size: 13px; font-weight: 800; margin-bottom: 2px; }
.iam-pillar-desc { font-size: 11px; color: #555; line-height: 1.4; }

/* ── LOGO IMAGEM NO HEADER ── */

/* Header home — logo à esquerda, colorido, grande */
.app-header--home {
  height: 64px !important;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* Linha verde sutil no fundo do header */
  border-bottom: 2px solid rgba(22,163,74,0.25);
}
.header-brand {
  display: flex;
  align-items: center;
}
.search-bar-wrap {
  background: linear-gradient(180deg, var(--red) 0%, #D01826 100%);
  padding: 14px 16px 16px;
  box-shadow: 0 3px 12px rgba(234,29,44,0.18);
}/* Retângulo branco com logo — container FIXO igual ao print */
/* header logo: container idêntico ao cat-chip, só horizontal */
.header-logo-box {
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(22,163,74,0.18);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  min-width: 90px;
}
.header-logo-img {
  height: 36px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Botão usuário branco */
.icon-btn--white {
  color: white !important;
}

/* Logo admin (header escuro) — sem filtro, logo colorido aparece bem no fundo escuro */
.header-logo-img--admin {
  height: 34px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  /* sem filter: logo colorido no fundo escuro */
}

/* Classes legadas mantidas */
.header-logo-img {
  height: 52px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}
.header-logo-img--small {
  height: 40px;
  max-width: 140px;
}
/* Remover centralização antiga */
.header-logo-home { display: none; }
.header-logo-home-img { display: none; }

/* ── Analytics / Estatísticas ── */
.apanel { display: none; }
.apanel:first-of-type { display: block; }
#screen-admin-analytics .scroll-content { padding-bottom: 80px; }

/* ── Manual do Lojista — seção Padrão de Fotos ── */
.manual-section { padding: 16px; background: #fff; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.manual-section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.manual-section-icon { font-size: 32px; }
.manual-section-title { font-size: 17px; font-weight: 700; color: var(--gray-800); }
.manual-section-subtitle { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.manual-subtitle { font-size: 14px; font-weight: 700; color: var(--gray-700); margin: 16px 0 8px; display: flex; align-items: center; gap: 6px; }
.manual-subtitle i { color: var(--primary); }
.manual-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
.manual-table th { background: var(--gray-100); padding: 7px 10px; text-align: left; font-weight: 600; color: var(--gray-700); border-bottom: 2px solid var(--gray-200); }
.manual-table td { padding: 7px 10px; border-bottom: 1px solid var(--gray-100); color: var(--gray-700); }
.manual-table tr:last-child td { border-bottom: none; }
.manual-checklist { display: flex; flex-direction: column; gap: 8px; }
.checklist-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; border-radius: 8px; font-size: 13px; }
.checklist-item.good { background: #f0fdf4; color: #166534; }
.checklist-item.good i { color: #22c55e; flex-shrink: 0; margin-top: 2px; }
.checklist-item.bad { background: #fef2f2; color: #991b1b; }
.checklist-item.bad i { color: #ef4444; flex-shrink: 0; margin-top: 2px; }
.manual-steps { padding-left: 20px; font-size: 13px; color: var(--gray-700); line-height: 1.8; }
.manual-steps li { margin-bottom: 4px; }

/* ══ STORE DETAIL — Redesign iFood Premium ══ */
.sd-top-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; gap: 8px; padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); background: transparent; transition: background 0.25s ease; }
.sd-top-bar.scrolled { background: white; box-shadow: 0 1px 8px rgba(0,0,0,0.1); }
.sd-back-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); border: none; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text); cursor: pointer; flex-shrink: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.14); transition: transform 0.14s; }
.sd-back-btn:active { transform: scale(0.92); }
.sd-top-bar.scrolled .sd-back-btn { background: var(--gray-100); box-shadow: none; }
.sd-top-title { flex: 1; font-size: 15px; font-weight: 700; color: transparent; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.2s; }
.sd-top-bar.scrolled .sd-top-title { color: var(--text); }
.sd-top-actions { display: flex; gap: 6px; }
.sd-icon-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.92); backdrop-filter: blur(6px); border: none; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text); cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,0.14); transition: transform 0.14s; }
.sd-icon-btn:active { transform: scale(0.92); }
.sd-icon-btn.fav-active { color: #e74c3c; background: #fff; }
.sd-top-bar.scrolled .sd-icon-btn { background: var(--gray-100); box-shadow: none; }
.sd-scroll { padding-top: 0 !important; background: var(--bg); }
.sd-banner-wrap { position: relative; height: 200px; overflow: hidden; background: #2D2D2D; }
.sd-banner-img { width: 100%; height: 100%; object-fit: cover; }
.sd-banner-gradient { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.45) 100%); }
.sd-banner-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 72px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); }
.sd-main-card { background: white; border-radius: 20px 20px 0 0; margin-top: -20px; padding: 20px 16px 16px; position: relative; z-index: 2; box-shadow: 0 -4px 20px rgba(0,0,0,0.06); }
.sd-logo-wrap { position: absolute; top: -40px; left: 16px; width: 80px; height: 80px; border-radius: 18px; border: 3px solid white; box-shadow: 0 4px 16px rgba(0,0,0,0.18); overflow: hidden; background: white; z-index: 3; }
.sd-logo-img { width: 100%; height: 100%; object-fit: cover; }
.sd-logo-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 36px; background: #f8f8f8; }
.sd-name-row { margin-top: 44px; margin-bottom: 8px; }
.sd-store-name { font-size: 22px; font-weight: 900; color: var(--text); line-height: 1.2; margin-bottom: 4px; }
.sd-cat-chip { display: inline-flex; align-items: center; gap: 4px; background: #f5f5f5; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; color: var(--gray-600); }
.sd-rating-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sd-stars { display: inline-flex; align-items: center; gap: 4px; background: #FFF8E1; color: #E65100; padding: 4px 10px; border-radius: 8px; font-size: 13px; font-weight: 800; }
.sd-review-count { font-size: 12px; color: var(--gray-500); }
.sd-offers-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.sd-badge-offers { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(231,76,60,0.3); }
.sd-badge-today { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #EA580C 0%, #C2410C 100%); color: white; padding: 8px 14px; border-radius: 10px; font-size: 13px; font-weight: 800; box-shadow: 0 2px 8px rgba(234,88,12,0.3); }
.sd-cat-row { margin-bottom: 12px; }
.sd-divider { height: 1px; background: var(--gray-100); margin: 14px 0; }
.sd-info-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 13px; color: #555; text-decoration: none; }
.sd-info-item:last-child { border-bottom: none; }
.sd-info-icon { width: 30px; height: 30px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.sd-info-icon.red { background: #FDECEA; color: #e74c3c; }
.sd-info-icon.blue { background: #EFF6FF; color: #2563EB; }
.sd-info-text { flex: 1; line-height: 1.4; }
.sd-info-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-400); margin-bottom: 2px; }
.sd-info-value { font-size: 13px; color: var(--text); font-weight: 500; }
.sd-description { font-size: 13px; color: var(--gray-600); line-height: 1.6; padding: 12px 0; }
.sd-actions { display: flex; gap: 8px; padding: 16px 16px 20px; background: white; position: sticky; bottom: 0; z-index: 10; border-top: 1px solid var(--gray-100); }
.sd-btn-offers { flex: 1; background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); color: white; border: none; border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 800; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 16px rgba(231,76,60,0.35); transition: transform 0.14s, box-shadow 0.14s; }
.sd-btn-offers:active { transform: scale(0.97); box-shadow: 0 2px 8px rgba(231,76,60,0.25); }
.sd-btn-route { width: 52px; height: 52px; border-radius: 12px; background: white; border: 1.5px solid var(--gray-200); display: flex; align-items: center; justify-content: center; font-size: 20px; color: #2563EB; cursor: pointer; text-decoration: none; transition: transform 0.14s; flex-shrink: 0; }
.sd-btn-route:active { transform: scale(0.93); }
#screen-store-detail { position: relative; isolation: isolate; }
#screen-store-detail .sd-scroll { padding-top: 0 !important; overflow-y: auto; flex: 1; min-height: 0; }
/* ══ STORE OFFERS — Redesign iFood Premium ══ */
.so-header { background: white; border-bottom: 1px solid var(--gray-100); box-shadow: 0 1px 6px rgba(0,0,0,0.06); position: sticky; top: 0; z-index: 50; flex-shrink: 0; }
.so-header-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px 8px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
.so-back { background: var(--gray-100) !important; box-shadow: none !important; }
.so-store-name { flex: 1; font-size: 16px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.so-filter-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--gray-100); border: none; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text); cursor: pointer; transition: background 0.15s; }
.so-filter-btn.active { background: #FDECEA; color: #e74c3c; }
.so-search-wrap { position: relative; margin: 0 14px 10px; }
.so-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 13px; pointer-events: none; }
.so-search-input { width: 100%; padding: 9px 36px 9px 34px; border: 1.5px solid var(--gray-200); border-radius: 10px; font-size: 13px; color: var(--text); background: var(--gray-100); outline: none; transition: border-color 0.15s; }
.so-search-input:focus { border-color: #e74c3c; background: white; }
.so-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 12px; color: var(--gray-400); cursor: pointer; padding: 4px; }
.so-filters-panel { padding: 6px 14px 12px; border-top: 1px solid var(--gray-100); }
.so-filter-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.so-filter-row:last-child { margin-bottom: 0; }
.so-filter-label { font-size: 11px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.4px; padding-top: 5px; white-space: nowrap; flex-shrink: 0; min-width: 60px; }
.so-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.so-chip { padding: 4px 12px; border-radius: 20px; border: 1.5px solid var(--gray-200); background: white; font-size: 12px; font-weight: 600; color: var(--gray-600); cursor: pointer; transition: all 0.15s; white-space: nowrap; }
.so-chip.active { background: #e74c3c; color: white; border-color: #e74c3c; }
.so-scroll { background: var(--bg); }
.so-offers-wrap { padding: 12px 0 24px; }
.so-urgency-section { margin-bottom: 4px; }
.so-section-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px 8px; }
.so-section-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.so-section-title { font-size: 14px; font-weight: 800; color: var(--text); flex: 1; }
.so-section-count { font-size: 12px; font-weight: 600; color: white; background: var(--gray-400); padding: 2px 8px; border-radius: 20px; }
.so-section-divider { height: 1px; background: linear-gradient(to right, transparent, var(--gray-200) 10%, var(--gray-200) 90%, transparent); margin: 0 16px 8px; }
.so-today .so-section-dot { background: #EA1D2C; } .so-today .so-section-title { color: #EA1D2C; } .so-today .so-section-count { background: #EA1D2C; }
.so-tomorrow .so-section-dot { background: #EA580C; } .so-tomorrow .so-section-title { color: #EA580C; } .so-tomorrow .so-section-count { background: #EA580C; }
.so-in2days .so-section-dot { background: #F59E0B; } .so-in2days .so-section-title { color: #D97706; } .so-in2days .so-section-count { background: #F59E0B; }
.so-in3days .so-section-dot { background: #16A34A; } .so-in3days .so-section-title { color: #16A34A; } .so-in3days .so-section-count { background: #16A34A; }
.so-more .so-section-dot { background: var(--gray-400); } .so-more .so-section-count { background: var(--gray-400); }
.so-cards-list { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.so-card { background: white; border-radius: 16px; overflow: hidden; display: flex; border: 1px solid var(--gray-200); box-shadow: 0 1px 6px rgba(0,0,0,0.06); cursor: pointer; transition: transform 0.14s, box-shadow 0.14s; position: relative; }
.so-card:active { transform: scale(0.985); box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
.so-card.urgency-today { border-left: 4px solid #EA1D2C; }
.so-card.urgency-tomorrow { border-left: 4px solid #EA580C; }
.so-card.urgency-2days { border-left: 4px solid #F59E0B; }
.so-card.urgency-3days { border-left: 4px solid #16A34A; }
.so-card.urgency-more { border-left: 4px solid var(--gray-200); }
.so-card-img-wrap { width: 110px; flex-shrink: 0; position: relative; overflow: hidden; background: var(--gray-100); }
.so-card-img { width: 110px; height: 110px; object-fit: cover; display: block; }
.so-card-img-ph { width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; font-size: 42px; background: var(--gray-100); }
.so-card-badge { position: absolute; top: 6px; left: 6px; background: linear-gradient(135deg, #EA1D2C, #C41020); color: white; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 900; }
.so-card-urgency-stamp { position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 6px; font-size: 10px; font-weight: 800; text-align: center; text-transform: uppercase; }
.stamp-today { background: rgba(234,29,44,0.88); color: white; }
.stamp-tomorrow { background: rgba(234,88,12,0.88); color: white; }
.stamp-2days { background: rgba(245,158,11,0.88); color: white; }
.stamp-3days { background: rgba(22,163,74,0.88); color: white; }
.so-card-info { flex: 1; padding: 10px 12px 10px 14px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.so-card-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.3; overflow: hidden; }
.so-card-qty { font-size: 11px; color: var(--gray-500); }
.so-card-prices { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.so-card-price-new { font-size: 20px; font-weight: 900; color: #16A34A; }
.so-card-price-old { font-size: 12px; color: var(--gray-400); text-decoration: line-through; }
.so-card-savings { font-size: 11px; font-weight: 700; color: #16A34A; background: #F0FDF4; border: 1px solid #BBF7D0; padding: 2px 7px; border-radius: 6px; margin-top: 4px; align-self: flex-start; }
.so-load-more-btn { width: 100%; padding: 13px; border: 1.5px solid #e74c3c; border-radius: 12px; color: #e74c3c; background: white; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.so-load-more-btn:active { background: #FDECEA; }
.so-skeleton-card { background: white; border-radius: 16px; overflow: hidden; display: flex; border: 1px solid var(--gray-100); height: 110px; margin: 0 16px; }
.skel { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: skel-anim 1.4s infinite; border-radius: 4px; }
@keyframes skel-anim { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.so-empty { text-align: center; padding: 60px 32px; }
.so-empty-icon { font-size: 52px; margin-bottom: 12px; opacity: 0.35; }
.so-empty-title { font-size: 17px; font-weight: 800; color: var(--gray-700); margin-bottom: 6px; }
.so-empty-sub { font-size: 13px; color: var(--gray-500); line-height: 1.5; }
/* #screen-store-offers herda display:none e display:flex do seletor global .screen / .screen.active */
#screen-store-offers .so-scroll { flex: 1; overflow-y: auto; min-height: 0; }

/* ══ Botão Voltar Universal ══ */
#universalBackBtn { display: flex; }
#universalBackBtn:active { transform: scale(0.88); box-shadow: 0 1px 6px rgba(0,0,0,0.14); }

/* ══════════════════════════════════════════════════════════
   REDESIGN v2 — Acentos verdes sutis + Refinamentos visuais
   Mantém identidade vermelha · Verde apenas em micro-detalhes
   ══════════════════════════════════════════════════════════ */

/* ── Botão "Ver Lojas Parceiras" redesenhado ── */
.btn-ver-lojas {
  width: 100%;
  background: linear-gradient(135deg, #C41020 0%, #EA1D2C 60%, #D01826 100%);
  color: white; border: none; border-radius: 16px;
  padding: 15px 20px;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 16px rgba(192,57,43,0.32), 0 1px 4px rgba(0,0,0,0.12);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  border-bottom: 2px solid rgba(22,163,74,0.4);
  letter-spacing: 0.1px;
}
.btn-ver-lojas:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(192,57,43,0.28); }

/* ── Tag de Economia Verde ── */
.eco-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--green-faint);
  border: 1px solid var(--green-mid);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px; font-weight: 700;
  color: var(--green-dark);
  letter-spacing: 0.1px;
  white-space: nowrap;
  margin-top: 3px;
}

/* ── Store Card redesenhado ── */
.store-card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid var(--gray-200);
  border-top: 3px solid var(--green-mid);
}
.store-card:active { transform: scale(0.983); box-shadow: var(--shadow); }

/* ── Indicador de Oferta Ativa nos store cards ── */
.store-offers-indicator {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--green-faint);
  border: 1px solid var(--green-mid);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px; font-weight: 700;
  color: var(--green-dark);
}
.store-offers-indicator::before {
  content: '';
  width: 7px; height: 7px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse-green 2s ease-in-out infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0.45); }
  50%       { box-shadow: 0 0 0 4px rgba(22,163,74,0); }
}

/* ── Botão Reservar atualizado ── */
.btn-reserve {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white; border: none; border-radius: 14px;
  font-size: 16px; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 18px rgba(234,29,44,0.35);
  transition: transform 0.16s, box-shadow 0.16s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  letter-spacing: 0.2px;
  border-bottom: 2px solid rgba(22,163,74,0.35);
}
.btn-reserve:active { transform: scale(0.98); box-shadow: 0 2px 10px rgba(234,29,44,0.25); }

/* ── Botão Outline com acento verde ── */
.btn-outline {
  background: white;
  border: 1.5px solid var(--green-mid);
  border-radius: 10px;
  color: var(--green-dark);
  font-size: 13px; font-weight: 700;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.18s;
  display: inline-flex; align-items: center; gap: 6px;
}
.btn-outline:hover { background: var(--green-faint); border-color: var(--green); }
.btn-outline:active { transform: scale(0.97); }

/* ── Live Badge (ofertas ao vivo) ── */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--green-faint);
  border: 1.5px solid var(--green-mid);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 700;
  color: var(--green-dark);
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse-green 1.8s ease-in-out infinite;
}

/* ── Microanimação de entrada nos cards ── */
@keyframes card-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card, .product-card-v {
  animation: card-in 0.22s ease both;
}
