/* Importação de fontes (opcional, mas recomendado para um design moderno) */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* Reset básico para garantir consistência entre navegadores */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: #f4f4f4; /* Fundo que aparecerá nas laterais em telas grandes */
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #fff; /* Fundo do "celular" */
    color: #333;
    line-height: 1.6;
    
    /* Centraliza o body e define largura máxima para simular um celular */
    max-width: 480px; /* Largura máxima para simular um dispositivo móvel */
    margin: 0 auto; /* Centraliza o body na tela do PC */
    min-height: 100vh; /* Garante que o body ocupe a altura total da viewport */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2); /* Sombra para destacar o "celular" */
    position: relative; /* Para posicionamento de elementos internos */
    padding-top: 70px; /* Espaço para o cabeçalho fixo */
    opacity: 0; /* Começa invisível para o fade-in */
    transition: opacity 0.5s ease-in; /* Transição de opacidade ao carregar */
}

body.page-loaded {
    opacity: 1; /* Torna visível após o carregamento */
}

/* --- Topo Fixo --- */
.header-fixed {
    background-color: #8B0000; /* Vermelho escuro do topo */
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between; /* Espaça os itens: menu, título, login */
    align-items: center;
    position: fixed; /* Fixa o topo na parte superior da tela */
    width: 100%; /* Ocupa 100% da largura do body (que é 480px no PC) */
    max-width: 480px; /* Garante que não ultrapasse a largura do body */
    top: 0;
    left: 50%; /* Centraliza o cabeçalho com base na metade da tela */
    transform: translateX(-50%); /* Ajusta para centralizar perfeitamente */
    z-index: 1000; /* Garante que o topo fique acima de outros elementos */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Sombra para dar profundidade */
}

/* CORREÇÃO AQUI: Remove background-color e padding para ícones do cabeçalho */
.menu-icon, .login-icon {
    font-size: 24px;
    cursor: pointer;
    padding: 0; /* REMOVIDO O PADDING */
    background-color: transparent; /* REMOVIDO O BACKGROUND ESCURO */
    border-radius: 0; /* REMOVIDO O BORDER-RADIUS, se quiser redondo no futuro pode usar 50% aqui */
}

/* Garante que a cor do ícone seja branca */
.login-icon i, .menu-icon i {
    color: white !important; /* Força a cor branca para o ícone */
}
/* Se o ícone estiver dentro de um link, garante que o link também seja branco */
.login-icon a, .menu-icon a {
    color: white !important;
}

.app-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #fff;
    text-align: center;
    flex-grow: 1; /* Ocupa o espaço central disponível */
}

/* --- Menu Hamburguer Deslizante (Sidebar) --- */
.sidebar {
    height: 100%;
    width: 0; /* Inicialmente oculto */
    position: fixed;
    z-index: 1001; /* Acima do topo */
    top: 0;
    left: 50%; /* Centraliza a sidebar com base na metade da tela */
    transform: translateX(-50%); /* Ajusta para centralizar perfeitamente */
    background-color: #600000; /* Vermelho BEM escuro para o corpo da sidebar */
    overflow-x: hidden;
    transition: 0.5s; /* Animação suave de deslizamento */
    padding-top: 60px; /* Espaço para o topo fixo */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3); /* Sombra para a sidebar */
    max-width: 480px; /* Garante que a sidebar não ultrapasse a largura do body */
}

.sidebar.active {
    width: 80%; /* Abre até 80% da largura do body */
}

.sidebar .sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    position: absolute;
    top: 0;
    width: 100%;
    background-color: #400000; /* Vermelho AINDA MAIS ESCURO para o cabeçalho interno da sidebar */
}

.sidebar .sidebar-header h3 {
    color: #fff;
    margin: 0;
}

.sidebar .close-sidebar {
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin-top: 20px; /* Espaço abaixo do cabeçalho */
}

.sidebar ul li a {
    padding: 15px 25px;
    text-decoration: none;
    font-size: 18px;
    color: #fff;
    display: block;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    background-color: #8B0000; /* Vermelho escuro ao passar o mouse */
}

/* Adicionado para espaçar o ícone do texto no menu */
.sidebar ul li a i {
    margin-right: 10px; /* Espaço entre o ícone e o texto */
    width: 20px; /* Garante que os ícones tenham uma largura consistente */
    text-align: center; /* Centraliza o ícone se o width for maior que o ícone */
}

/* Overlay para fechar o menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparente */
    z-index: 999; /* Abaixo da sidebar, acima de outros conteúdos */
    display: none; /* Inicialmente oculto */
    cursor: pointer;
}


/* --- Seção de Banners Carrossel --- */
.banner-carousel {
    position: relative;
    width: 100%;
    margin: 0 auto 20px auto;
    height: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden; /* Garante que as imagens não transbordem */
    z-index: 1;
}

/* O link que envolve a imagem do carrossel */
.carousel-item-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0; /* Escondido por padrão */
    visibility: hidden; /* Escondido para leitores de tela e cliques */
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out; /* TRANSIÇÃO DE 1 SEGUNDO */
    display: block; /* Garante que o link ocupe todo o espaço */
    background-color: #000; /* Cor de fundo para transição (preenche o "branco") */
}

.carousel-item-link.active {
    opacity: 1; /* Visível quando ativo */
    visibility: visible; /* Torna visível */
}

/* A imagem dentro do link do carrossel */
.banner-carousel .carousel-item {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Preenche o espaço, pode cortar as bordas */
    display: block; /* Remove espaços extras abaixo da imagem */
}

/* Navegação do carrossel (setas) */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-size: 28px;
    z-index: 10;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.carousel-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.05);
}

.carousel-button.prev {
    left: 15px;
}

.carousel-button.next {
    right: 15px;
}

/* Indicadores de slide (pontos) */
.carousel-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    height: 14px;
    width: 14px;
    background-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.dot.active {
    background-color: #fff;
    transform: scale(1.3);
    border-color: #8B0000;
}

/* --- Seção: Marituba Delivery (Categorias) --- */
.promotions-section {
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    margin: 20px 0;
}

.promotions-section h2 {
    color: #195898;
    margin-bottom: 30px;
    font-size: 2em;
}

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colunas para promoções */
    gap: 20px;
    justify-content: center;
}

.promotion-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%; /* Garante que o item ocupe a altura total da célula do grid */
}

.promotion-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.promotion-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.promotion-item img {
    width: 100%;
    height: 150px; /* Altura fixa para as imagens de promoção */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.promotion-item h3 {
    font-size: 1.1em;
    color: #333;
    margin: 10px 15px 5px 15px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limita o título a 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.promotion-item p {
    font-size: 0.9em;
    color: #666;
    margin: 0 15px 10px 15px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Limita a descrição a 3 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1; /* Permite que a descrição ocupe o espaço restante */
}

.promotion-item .promotion-date {
    font-size: 0.75em;
    color: #999;
    margin: 0 15px 15px 15px;
    display: block;
    text-align: right;
    margin-top: auto; /* Empurra a data para baixo */
}

.food-marituba-categories-slider {
    padding: 20px 0;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    overflow: hidden;
}

.food-marituba-categories-slider h2 {
    color: #195898; /* Cor azul para o título */
    margin-bottom: 20px;
    font-size: 1.8em;
    padding: 0 20px;
}

.food-categories-slider-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 20px 20px 20px;
    scroll-snap-type: x mandatory;
}

.food-categories-slider-container::-webkit-scrollbar {
    height: 8px;
}

.food-categories-slider-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.food-categories-slider-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.food-category-item-slider {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    background-color: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    padding: 5px;
}

.food-category-item-slider:hover {
    transform: translateY(-3px);
    background-color: #e0f2f7; /* Um azul claro ao passar o mouse */
}

.food-category-item-slider i {
    font-size: 2.5em;
    color: #195898; /* Azul escuro para os ícones de food */
    margin-bottom: 5px;
}

.food-category-item-slider span {
    font-weight: bold;
    color: #333;
    font-size: 0.75em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

/* --- Nova Seção: Empresas de Delivery em Destaque (Slider) --- */
.featured-delivery-businesses-slider {
    padding: 20px 0;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    overflow: hidden;
}

.featured-delivery-businesses-slider h2 {
    color: #195898;
    margin-bottom: 20px;
    font-size: 1.8em;
    padding: 0 20px;
}

.delivery-businesses-slider-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 20px 20px 20px;
    scroll-snap-type: x mandatory;
}

.delivery-businesses-slider-container::-webkit-scrollbar {
    height: 8px;
}

.delivery-businesses-slider-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.delivery-businesses-slider-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.delivery-business-item-slider {
    flex: 0 0 auto;
    width: 120px; /* Largura um pouco maior para a imagem e texto */
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    padding: 10px;
    animation: float 3s ease-in-out infinite; /* EFEITO VOANDO AQUI */
}

/* Define a duração da animação para cada card com um delay diferente */
.delivery-business-item-slider:nth-child(even) { /* Cards pares */
    animation-delay: 0.5s;
}
.delivery-business-item-slider:nth-child(3n) { /* A cada 3 cards */
    animation-delay: 1s;
}

.delivery-business-item-slider:hover {
    transform: translateY(-3px);
    background-color: #e6f7ff; /* Um azul mais claro ao passar o mouse */
}

.delivery-business-item-slider img {
    width: 80px;
    height: 80px;
    border-radius: 50%; /* Imagens redondas para os logos das empresas */
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid #195898; /* Borda azul */
}

.delivery-business-item-slider .business-name {
    font-weight: bold;
    color: #333;
    font-size: 0.9em;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%; /* Garante que o texto ocupe a largura do item */
}

.delivery-business-item-slider .business-category {
    font-size: 0.75em;
    color: #666;
    margin-bottom: 4px;
}

.delivery-business-item-slider .business-rating {
    font-size: 0.8em;
    color: #FFD700; /* Cor da estrela (dourado) */
}

.delivery-business-item-slider .business-rating i {
    margin-right: 3px;
}


/* --- Seção de Categorias de Classificados (SLIDER HORIZONTAL) --- */
.classifieds-categories-slider {
    padding: 20px 0;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    overflow: hidden;
}

.classifieds-categories-slider h2 {
    color: #195899;
    margin-bottom: 20px;
    font-size: 1.8em;
    padding: 0 20px;
}

.categories-slider-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 20px 20px 20px;
    scroll-snap-type: x mandatory;
}

.categories-slider-container::-webkit-scrollbar {
    height: 8px;
}

.categories-slider-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.categories-slider-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.category-item-slider {
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    background-color: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    padding: 5px;
}

.category-item-slider:hover {
    transform: translateY(-3px);
    background-color: #ffe0e0;
}

.category-item-slider i {
    font-size: 2.5em;
    color: #8B0000;
    margin-bottom: 5px;
}

.category-item-slider span {
    font-weight: bold;
    color: #333;
    font-size: 0.75em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}


/* --- Seção de Publicidade "Anuncie Aqui" (PRIMEIRO BANNER) --- */
.ad-banner {
    text-align: center;
    margin-bottom: 30px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    z-index: 0;
    position: relative;
}

.ad-image {
    display: block;
    max-width: 100%; /* Imagem sempre 100% da largura do pai */
    height: auto; /* Mantém a proporção */
    border-radius: 0;
    margin: 0 auto;
}

/* --- NOVA SEÇÃO: Classificados em Destaque (Ajustado para Página Inicial) --- */
.featured-classifieds {
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
}

.featured-classifieds h2 {
    color: #195898;
    margin-bottom: 30px;
    font-size: 2em;
}

.classifieds-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    justify-content: center;
}

.classified-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative; /* Para o badge Premium */
    animation: float 3s ease-in-out infinite; /* EFEITO VOANDO AQUI */
}

/* Define a duração da animação para cada card com um delay diferente */
.classified-item:nth-child(even) { /* Cards pares */
    animation-delay: 0.5s;
}
.classified-item:nth-child(3n) { /* A cada 3 cards */
    animation-delay: 1s;
}


/* Animação para o efeito "flutuante" */
@keyframes float {
    0% { transform: translateY(0px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }
    50% { transform: translateY(-8px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); }
    100% { transform: translateY(0px); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); }
}


.classified-item:hover {
    transform: translateY(-5px);
}

.classified-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.classified-item-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.classified-item h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.classified-item p {
    display: none;
}

.classified-item .price {
    font-size: 1.1em;
    font-weight: bold;
    color: #8B0000;
    margin-top: auto;
}

/* --- NOVO BANNER DE ANUNCIANTES (SEGUNDO BANNER) --- */
.secondary-ad-banner {
    text-align: center;
    margin-bottom: 30px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    z-index: 0;
    position: relative;
}

.secondary-ad-image {
    display: block;
    max-width: 100%; /* Imagem sempre 100% da largura do pai */
    height: auto; /* Mantém proporção da imagem */
    border-radius: 5px;
    margin: 0 auto;
}

/* --- NOVA SEÇÃO: CATEGORIAS DO GUIA COMERCIAL (SLIDER HORIZONTAL) --- */
.commercial-guide-categories-slider {
    padding: 20px 0;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    overflow: hidden;
}

.commercial-guide-categories-slider h2 {
    color: #195898;
    margin-bottom: 20px;
    font-size: 1.8em;
    padding: 0 20px;
}

.commercial-guide-slider-container {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 10px 20px 20px 20px;
    scroll-snap-type: x mandatory;
}

.commercial-guide-slider-container::-webkit-scrollbar {
    height: 8px;
}

.commercial-guide-slider-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.commercial-guide-slider-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.commercial-guide-item-slider { /* Nova classe para os itens do guia comercial */
    flex: 0 0 auto;
    width: 90px;
    height: 90px;
    background-color: #f0f0f0;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    scroll-snap-align: start;
    padding: 5px;
}

.commercial-guide-item-slider:hover {
    transform: translateY(-3px);
    background-color: #ffe0e0;
}

.commercial-guide-item-slider i {
    font-size: 2.5em;
    color: #195898; /* Azul escuro para os ícones do guia comercial */
    margin-bottom: 5px;
}

.commercial-guide-item-slider span {
    font-weight: bold;
    color: #333;
    font-size: 0.75em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}


/* --- NOVA SEÇÃO: Anúncios do Guia Comercial em Destaque (SEM FLUTUAÇÃO, SÓ SOMBRA) --- */
.featured-commercial-guide {
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
}

.featured-commercial-guide h2 {
    color: #195898; /* Azul escuro personalizado */
    margin-bottom: 30px;
    font-size: 2em;
}

.commercial-guide-grid { /* Adapta o grid para duas colunas */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    justify-content: center;
}

.commercial-guide-item { /* Estilo para cada item do guia comercial */
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.3s ease; /* SOMENTE TRANSIÇÃO DE SOMBRA */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    /* ANIMAÇÃO 'float' E DELAYS REMOVIDOS AQUI */
}

.commercial-guide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* SOMBRA MAIS INTENSA NO HOVER */
}

.commercial-guide-item img {
    width: 100%;
    height: 180px; /* Altura fixa para as imagens */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.commercial-guide-item-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.commercial-guide-item h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commercial-guide-item p { /* Descrição completa para o modal ou futura exibição */
    display: none; /* Não exibe na página inicial, similar ao classificado */
}

.commercial-guide-item .category-name { /* Categoria do estabelecimento (ex: Restaurante, Farmácia) */
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
}

.commercial-guide-item .contact-info { /* Informações de contato ou endereço */
    font-size: 0.85em;
    color: #888;
    margin-top: auto; /* Empurra para baixo */
}

/* --- NOVO BANNER DE ANUNCIANTES (TERCEIRO BANNER) --- */
.tertiary-ad-banner {
    text-align: center;
    margin-bottom: 30px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    z-index: 0;
    position: relative;
}

.tertiary-ad-image {
    display: block;
    max-width: 100%; /* Imagem sempre 100% da largura do pai */
    height: auto; /* Mantém proporção da imagem */
    border-radius: 5px;
    margin: 0 auto;
}


/* --- NOVA SEÇÃO: NOTÍCIAS (SEM FLUTUAÇÃO, SÓ SOMBRA) --- */
.news-section {
    padding: 30px 20px;
    text-align: center;
    background-color: #fff;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ocupa 100% da largura do body */
    margin: 20px 0; /* Mantido para espaçamento vertical */
    display: flex; /* Adicionado para usar flexbox */
    flex-direction: column; /* Organiza os itens em coluna */
    align-items: center; /* Centraliza horizontalmente */
}

.news-section h2 {
    color: #195898;
    margin-bottom: 30px;
    font-size: 2em;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Notícias em 2 colunas */
    gap: 20px;
    justify-content: center;
    width: 100%; /* Garante que o grid ocupe a largura total da seção */
    margin-bottom: 20px; /* Espaço entre o grid e o botão */
}

.news-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.3s ease; /* SOMENTE TRANSIÇÃO DE SOMBRA */
    cursor: pointer;
    display: flex;
    flex-direction: column;
    /* ANIMAÇÃO 'float' E DELAYS REMOVIDOS AQUI */
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); /* SOMBRA MAIS INTENSA NO HOVER */
}

.news-item img {
    width: 100%;
    height: 180px; /* Altura fixa para imagem da notícia */
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.news-item-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-item h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-item .news-date {
    font-size: 0.85em;
    color: #999;
    margin-top: auto; /* Empurra a data para baixo */
}

/* Botões de seção */
.news-section-button {
    display: block; /* Ocupa a largura total */
    width: fit-content; /* Ajusta a largura ao conteúdo */
    margin: 20px auto; /* Centraliza o botão e adiciona margem vertical */
    padding: 12px 25px;
    background-color: #195898; /* Azul */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.news-section-button:hover {
    background-color: #144a7a; /* Azul mais escuro ao hover */
    transform: translateY(-2px);
}


/* --- Rodapé --- */
.app-footer {
    background-color: #8B0000; /* Mesma cor do topo */
    color: #fff;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2); /* Sombra superior para destacar */
    z-index: 999; /* Garante que fique acima de outros conteúdos */
    position: relative; /* Para garantir que o z-index funcione corretamente */
    width: 100%; /* Ocupa 100% da largura do body */
    max-width: 480px; /* Garante que não ultrapasse a largura do body */
    left: 50%; /* Centraliza o rodapé com base na metade da tela */
    transform: translateX(-50%); /* Ajusta para centralizar perfeitamente */
}

.footer-content {
    display: flex;
    flex-direction: column; /* Organiza os itens verticalmente */
    justify-content: center;
    align-items: center; /* Centraliza horizontalmente */
    gap: 10px; /* Espaço entre os grupos de itens */
    flex-wrap: wrap; /* Permite que os itens quebrem para a próxima linha em telas menores (se necessário) */
}

.social-links {
    margin-bottom: 10px; /* Espaço entre os ícones e o texto */
}

.social-links a {
    color: #fff;
    font-size: 1.5em;
    margin: 0 10px;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.social-links a:hover {
    opacity: 1;
}

.app-footer p {
    margin: 0;
    font-size: 0.9em;
}


/* --- ESTILOS DO MODAL --- */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: fadeIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content .close-button {
    color: #aaa;
    float: right;
    font-size: 35px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    z-index: 2001;
}

.modal-content .close-button:hover,
.modal-content .close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

/* Estilos para o modal de classificados */
.modal-images {
    flex: 1;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    height: 300px;
    background-color: #eee;
    border-radius: 8px;
}

.modal-detail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0; /* Escondido por padrão, JavaScript controlará a opacidade */
    transition: opacity 0.5s ease-in-out; /* Transição de fade */
}

.modal-detail-img.active {
    opacity: 1;
}

.modal-img-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 5;
    padding: 0 10px;
}

.modal-img-nav span {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 20px;
    user-select: none;
    transition: background-color 0.3s;
}

.modal-img-nav span:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


.modal-details {
    flex: 1;
    min-width: 300px;
    padding-top: 10px;
    display: flex; /* Adicionado para usar flexbox */
    flex-direction: column; /* Organiza os itens em coluna */
    justify-content: space-between; /* Espaça os itens verticalmente */
}

.modal-details h3 {
    font-size: 1.8em;
    color: #195898;
    margin-bottom: 10px;
}

.modal-details p#modal-description {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.6;
    flex-grow: 1; /* Permite que a descrição ocupe o espaço disponível */
}

.modal-details .modal-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #8B0000;
    margin-top: 15px;
    margin-bottom: 15px; /* Espaço abaixo do preço */
}

/* NOVO ESTILO: Botão "Ver mais no Classificados" */
.classified-modal-button {
    display: block; /* Ocupa a largura total */
    width: fit-content; /* Ajusta a largura ao conteúdo */
    margin: 0 auto; /* Centraliza o botão */
    padding: 12px 25px;
    background-color: #8B0000; /* Vermelho escuro */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    margin-top: auto; /* Empurra o botão para o final do modal-details */
}

.classified-modal-button:hover {
    background-color: #700000; /* Vermelho mais escuro ao hover */
    transform: translateY(-2px);
}


/* --- Estilos específicos para o Modal de Notícias --- */
.news-modal-body {
    display: block;
    text-align: left;
}

.news-modal-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}

.news-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-modal-details h3 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

.news-modal-details .news-modal-date {
    font-size: 0.9em;
    color: #777;
    text-align: center;
    margin-bottom: 15px;
    display: block;
}

.news-modal-details .news-modal-content {
    font-size: 1em;
    color: #444;
    line-height: 1.7;
    text-align: justify;
}

/* --- Estilos específicos para o Novo Modal do Guia Comercial --- */
.commercial-guide-modal-body {
    display: block; /* Para empilhar imagem e detalhes verticalmente */
    text-align: left;
}

.commercial-guide-modal-image {
    width: 100%;
    height: 250px; /* Altura fixa para a imagem do estabelecimento */
    overflow: hidden;
    background-color: #eee;
    border-radius: 8px;
    margin-bottom: 20px;
}

.commercial-guide-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Para preencher a área da imagem */
    display: block;
}

.commercial-guide-modal-details {
    padding-top: 10px;
}

.commercial-guide-modal-details h3 {
    font-size: 1.8em;
    color: #195898;
    margin-bottom: 8px;
    text-align: center;
}

.commercial-guide-modal-details .commercial-guide-modal-category {
    font-size: 1em;
    color: #666;
    margin-bottom: 5px;
    text-align: center;
}

.commercial-guide-modal-details .commercial-guide-modal-contact {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
    text-align: center;
}

.commercial-guide-modal-details .commercial-guide-modal-description {
    font-size: 1em;
    color: #444;
    line-height: 1.7;
    text-align: justify;
    margin-bottom: 20px;
}

.commercial-guide-modal-button {
    display: block; /* Ocupa a largura total */
    width: fit-content; /* Ajusta a largura ao conteúdo */
    margin: 0 auto; /* Centraliza o botão */
    padding: 12px 25px;
    background-color: #195898; /* Azul */
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.commercial-guide-modal-button:hover {
    background-color: #144a7a; /* Azul mais escuro ao hover */
    transform: translateY(-2px);
}


/* --- Media Queries para Responsividade --- */
/* Estilos para telas maiores que 480px (PCs) */
@media (min-width: 481px) {
    .banner-carousel .carousel-item {
        object-fit: cover; /* Mantido cover para preencher o banner */
    }
}

@media (max-width: 768px) {
    body {
        max-width: 100%;
        box-shadow: none;
    }

    .header-fixed, .app-footer {
        max-width: 100%;
        left: 0;
        transform: translateX(0);
    }

    .sidebar {
        max-width: 100%;
        left: 0;
        transform: translateX(0);
    }

    .header-fixed {
        padding: 10px 15px;
    }

    .app-title {
        font-size: 24px;
    }

    .sidebar.active {
        width: 70%;
    }

    .banner-carousel {
        height: 250px;
    }

    .carousel-button {
        font-size: 20px;
        padding: 8px 12px;
    }

    .classifieds-categories-slider h2,
    .commercial-guide-categories-slider h2,
    .featured-commercial-guide h2,
    .news-section h2,
    .food-marituba-categories-slider h2,
    .featured-delivery-businesses-slider h2 {
        font-size: 1.6em;
    }

    .categories-slider-container,
    .commercial-guide-slider-container,
    .food-categories-slider-container,
    .delivery-businesses-slider-container {
        padding: 10px 15px 20px 15px;
    }

    .category-item-slider,
    .commercial-guide-item-slider,
    .food-category-item-slider {
        width: 80px;
        height: 80px;
    }
    .delivery-business-item-slider {
        width: 100px;
        padding: 8px;
    }

    .category-item-slider i,
    .commercial-guide-item-slider i,
    .food-category-item-slider i {
        font-size: 2.2em;
    }
    .delivery-business-item-slider img {
        width: 60px;
        height: 60px;
    }
    .delivery-business-item-slider .business-name {
        font-size: 0.8em;
    }
    .delivery-business-item-slider .business-category,
    .delivery-business-item-slider .business-rating {
        font-size: 0.7em;
    }


    .category-item-slider span,
    .commercial-guide-item-slider span,
    .food-category-item-slider span {
        font-size: 0.7em;
    }

    .featured-classifieds h2 {
        font-size: 1.8em;
    }
    
    .classifieds-grid,
    .commercial-guide-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 15px;
    }

    .classified-item img,
    .commercial-guide-item img,
    .news-item img {
        height: 150px;
    }

    /* Modal responsivo */
    .modal-content {
        width: 95%;
        padding: 15px;
    }
    
    .news-modal-body {
        gap: 0;
    }

    .modal-images {
        min-width: unset;
        height: 250px;
    }
    .news-modal-image {
        height: 200px;
    }

    .modal-details {
        min-width: unset;
        padding-top: 15px;
    }

    .modal-details h3 {
        font-size: 1.5em;
    }

    .modal-details p#modal-description {
        font-size: 0.95em;
    }

    .modal-details .modal-price {
        font-size: 1.3em;
    }

    /* Ajustes para o modal do guia comercial em telas menores */
    .commercial-guide-modal-image {
        height: 200px;
    }
    .commercial-guide-modal-details h3 {
        font-size: 1.5em;
    }
    .commercial-guide-modal-details .commercial-guide-modal-category,
    .commercial-guide-modal-details .commercial-guide-modal-contact,
    .commercial-guide-modal-details .commercial-guide-modal-description {
        font-size: 0.9em;
    }
    .commercial-guide-modal-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    /* Ajustes para o botão do modal de classificados em telas menores */
    .classified-modal-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    /* Ajustes para o botão da seção de notícias em telas menores */
    .news-section-button {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .header-fixed {
        padding: 8px 10px;
    }

    .app-title {
        font-size: 20px;
    }

    .menu-icon, .login-icon {
        font-size: 20px;
    }

    .sidebar.active {
        width: 85%;
    }

    .banner-carousel {
        height: 180px;
    }

    .classifieds-categories-slider h2,
    .commercial-guide-categories-slider h2,
    .featured-commercial-guide h2,
    .news-section h2,
    .food-marituba-categories-slider h2,
    .featured-delivery-businesses-slider h2 {
        font-size: 1.4em;
    }

    .categories-slider-container,
    .commercial-guide-slider-container,
    .food-categories-slider-container,
    .delivery-businesses-slider-container {
        padding: 10px 10px 20px 10px;
    }

    .category-item-slider,
    .commercial-guide-item-slider,
    .food-category-item-slider {
        width: 70px;
        height: 70px;
    }
    /* Ajuste para o item de empresa de delivery em telas muito pequenas */
    .delivery-business-item-slider {
        width: 90px; /* Ainda menor */
        padding: 6px;
    }

    .category-item-slider i,
    .commercial-guide-item-slider i,
    .food-category-item-slider i {
        font-size: 2em;
    }
    .delivery-business-item-slider img {
        width: 50px;
        height: 50px;
    }
    .delivery-business-item-slider .business-name {
        font-size: 0.75em;
    }
    .delivery-business-item-slider .business-category,
    .delivery-business-item-slider .business-rating {
        font-size: 0.65em;
    }


    .category-item-slider span,
    .commercial-guide-item-slider span,
    .food-category-item-slider span {
        font-size: 0.65em;
    }

    .featured-classifieds h2 {
        font-size: 1.5em;
    }
    
    .classifieds-grid,
    .commercial-guide-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 10px;
    }

    .classified-item img,
    .commercial-guide-item img,
    .news-item img {
        height: 120px;
    }

    .news-modal-image {
        height: 150px;
    }

    /* Ajustes para o modal do guia comercial em telas muito pequenas */
    .commercial-guide-modal-image {
        height: 150px;
    }
    .commercial-guide-modal-details h3 {
        font-size: 1.3em;
    }
    .commercial-guide-modal-details .commercial-guide-modal-category,
    .commercial-guide-modal-details .commercial-guide-modal-contact,
    .commercial-guide-modal-details .commercial-guide-modal-description {
        font-size: 0.85em;
    }
    .commercial-guide-modal-button {
        padding: 8px 15px;
        font-size: 0.8em;
    }

    /* Ajustes para o botão do modal de classificados em telas muito pequenas */
    .classified-modal-button {
        padding: 8px 15px;
        font-size: 0.8em;
    }

    /* Ajustes para o botão da seção de notícias em telas muito pequenas */
    .news-section-button {
        padding: 8px 15px;
        font-size: 0.8em;
    }
}