/* Tela principal & estrutura */
.home-screen {
  background-color: #f7f9fa;
  padding-bottom: 80px; /* espaço para o bottom-nav fixo */
}

.home-content {
  margin-top: 16px; /* precisa bater com a altura real do .home-header */
  padding: 6px 5px;
}

/* Header fixo */
.home-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #ffffff;
  padding: 0 20px;
  border-bottom: 1px solid #f0f0f0;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.header-left-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

/* Agrupador da marca e localização na esquerda */
.header-brand-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0; /* Previne estouro de layout em telas pequenas */
}

.user-location .greeting {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-dark, #111);
}

/* Estilo da localização */
.location-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 11px;
}

.location-tag small {
  font-size: 11px;
  font-weight: 600;
}


/* Remove qualquer centralização absoluta que a logo tenha */
.brand-logo {
  position: static !important;
  transform: none !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
}

.brand-logo:active {
  opacity: 0.7;
  transform: scale(0.96);
}

.brand-faz {
  color: #0d9488; /* ajuste com a cor do seu projeto */
}

.brand-tche {
  color: #0b2b3c; /* ajuste com a cor do seu projeto */
}

/* Ações do header (mantém na direita) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}

.profile-container {
  position: relative;
}

.profile-avatar-btn {
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: 50%;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.profile-avatar-btn:hover {
  border-color: #0d9488;
}

.profile-avatar-btn img {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}


.profile-dropdown.show {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.dropdown-header {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
}

.dropdown-header strong {
  font-size: 13px;
  color: #0b2b3c;
}

.dropdown-header span {
  font-size: 11px;
  color: #64748b;
}

.profile-dropdown hr {
  border: none;
  border-top: 1px solid #f1f5f9;
  margin: 6px 0;
}

.dropdown-item {
  padding: 8px 16px;
  font-size: 13px;
  color: #334155;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f8fafc;
  color: #0d9488;
}

.dropdown-item.logout-item {
  color: #e11d48;
}

/* Barra de busca */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top:60px;
  padding: 20px 14px;
  background: #f1f3f5;
  border-radius: 20px;
  margin-bottom: 16px;
}

.search-bar input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
}

/* Categorias */
.categories-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 20px 16px; /* era 16px */
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* esconde a scrollbar (Firefox) */
}

.categories-scroll::-webkit-scrollbar {
  display: none; /* esconde a scrollbar (Chrome/Safari) */
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 0;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
}

.category-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background-color: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  color: #64748b;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.category-icon-wrapper img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.category-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  transition: color 0.2s ease;
}

/* Estado ativo: categoria atualmente selecionada no filtro */
.category-item.active .category-icon-wrapper {
  background-color: #e6f4f1;
  border-color: #0d9488;
  color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
  transform: translateY(-2px);
}

.category-item.active .category-label {
  color: #0d9488;
  font-weight: 700;
}

.category-item:active .category-icon-wrapper {
  transform: scale(0.95);
}

/* Card especial "Ver mais" (abre o menu lateral de categorias) */
.category-more-btn .more-wrapper {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #475569;
}

.category-more-btn:active .more-wrapper {
  transform: scale(0.95);
}

/* Banner de promoções */
.banner-carousel {
  padding: 0 0 16px;
}
 
/* Trilho com scroll nativo — é o scroll-snap + overflow-x que permite
   arrastar com o dedo no touch, sem precisar de JS de drag/física. */
.banner-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
 
.banner-track::-webkit-scrollbar {
  display: none;
}
 
.banner-slide {
    flex: 0 0 100%;
    padding: 0 20px;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}
 
.banner-slide img {
    width: 100%;
    aspect-ratio: 2 / 1;
    border-radius: 16px;
    object-fit: cover;
    pointer-events: none;
    display: block;
}
 
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
 
.carousel-dots .dot {
  width: 8px;
  height: 8px;
  background: #ccc;
  border-radius: 50%;
  transition: width 0.2s ease, background-color 0.2s ease, border-radius 0.2s ease;
}
 
.carousel-dots .dot.active {
  width: 20px;
  background: #0b2b3c;
  border-radius: 4px;
}

/* Seção "Perto de Você" */
.section-nearby {
  margin: 24px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 12px;
}

.section-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0b2b3c;
}

.see-all {
  font-size: 12px;
  font-weight: 700;
  color: #0d9488;
  text-decoration: none;
}

.nearby-carousel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 20px 16px; /* era 16px */
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.nearby-carousel::-webkit-scrollbar {
  display: none;
}

.nearby-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 220px;
  overflow: hidden;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.2s ease;
}

.nearby-card:active {
  transform: scale(0.98);
}

.nearby-cover {
  position: relative;
  width: 100%;
  height: 110px;
}

.nearby-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.badge-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  color: #0b2b3c;
}

.nearby-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}

.nearby-title {
  margin: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  color: #0b2b3c;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nearby-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.nearby-distance {
  color: #0d9488;
  font-weight: 700;
}

/* Feed da comunidade */
.feed-timeline {
  padding: 12px 20px;
}

.feed-timeline h2 {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 700;
}

.post-card {
  margin-bottom: 16px;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0b2b3c;
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.category-badge {
  padding: 1px 6px;
  background: #e6f4f1;
  border-radius: 8px;
  color: #0d9488;
  font-weight: 600;
}

.post-text {
  margin-bottom: 12px;
  font-size: 13.5px;
  line-height: 1.4;
  color: #334155;
}

.post-media img {
  width: 100%;
  max-height: 220px;
  margin-bottom: 12px;
  border-radius: 12px;
  object-fit: cover;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
}

.action-btn.liked {
  color: #e11d48;
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Drawer lateral de categorias (estilo iFood) — mesmo padrão de abertura
   do drawer de perfil (overlay + painel deslizando da direita), mas com
   conteúdo em grade de 2 colunas. */

/* Fundo escurecido atrás do drawer */
.categories-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 60, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1100;
}

.categories-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Painel lateral que desliza da direita */
.categories-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 1200;
}

.categories-drawer.active {
  transform: translateX(0);
}

.categories-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.categories-grid-section {
  padding: 16px 20px 24px;
}

.drawer-section-title {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Grade 2 colunas — cada item com ícone + rótulo lado a lado, como no menu do iFood */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid-category-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}

.grid-category-item:active {
  transform: scale(0.97);
}

.grid-category-item.active {
  background-color: #e6f4f1;
  border-color: #0d9488;
}

.grid-category-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #e6f4f1;
  color: #0d9488;
}

.grid-category-item span {
  font-size: 13px;
  font-weight: 700;
  color: #0b2b3c;
  line-height: 1.2;
}

/* Drawer lateral de perfil e segurança — mesmo padrão de abertura do
   drawer de categorias, mas com cartão de usuário + lista de configurações. */

/* Fundo escurecido atrás do drawer */
.profile-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 43, 60, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 1100;
}

.profile-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Painel lateral que desliza da direita */
.profile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 85%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 1200;
}

.profile-drawer.active {
  transform: translateX(0);
}

.profile-drawer-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Cabeçalho do drawer (compartilhado com o drawer de categorias) */
.drawer-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.drawer-header-bar h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: #0b2b3c;
}

.close-drawer-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.close-drawer-btn:hover {
  background: #e2e8f0;
}

/* Cartão com informações básicas do usuário */
.user-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 20px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}

.user-avatar-container {
  width: 84px;
  height: 84px;
}

.user-avatar-lg {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e6f4f1;
}

.user-details {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.user-details h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0b2b3c;
}

.user-email {
  font-size: 12.5px;
  color: #64748b;
}

.verified-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 3px 10px;
  background: #e6f4f1;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: #0d9488;
}

/* Lista de configurações do perfil */
.settings-menu {
  display: flex;
  flex-direction: column;
  padding: 8px 20px 24px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
  color: #0b2b3c;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

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

.menu-item:active {
  opacity: 0.6;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.item-left svg {
  flex-shrink: 0;
  color: #0d9488;
}

.item-left span {
  font-size: 14px;
  font-weight: 600;
}

.menu-item .chevron {
  flex-shrink: 0;
}