/* 
 * Neighborhood Components CSS
 * Estilos para componentes relacionados a bairros e localização
 * Parte da implementação da nova interface da TLS
 */

:root {
    --roxo: #6f42c1;
    --laranja: #fd7e14;
    --cinza-claro: #f8f9fa;
    --cinza-medio: #e9ecef;
    --cinza-escuro: #6c757d;
    --verde: #28a745;
    --vermelho: #dc3545;
    --azul: #007bff;
	--branco: #ffffff;
}

/* Estilos para o banner de destaque com localização */
.banner-destaque {
    background: linear-gradient(135deg, var(--roxo) 0%, #9370db 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
}

.banner-destaque-content {
    text-align: center;
    padding: 1rem;
}

.location-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-flex;
}

.location-highlight i {
    margin-right: 0.5rem;
    color: white;
}

.change-neighborhood-btn {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    margin-left: 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.change-neighborhood-btn:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.banner-destaque-btn {
    display: inline-block;
    background-color: var(--laranja);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s;
}

.banner-destaque-btn:hover {
    background-color: #e67300;
    color: white;
    text-decoration: none;
}

/* Modal de troca de bairro */
.neighborhood-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: auto;
}

.neighborhood-modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 1.5rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.neighborhood-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.neighborhood-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--cinza-escuro);
}

.neighborhood-search {
    position: relative;
    margin-bottom: 1rem;
}

.neighborhood-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--cinza-escuro);
}

#neighborhood-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--cinza-medio);
    border-radius: 0.25rem;
    font-size: 1rem;
}

.neighborhood-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.neighborhood-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--cinza-medio);
    cursor: pointer;
}

.neighborhood-item:hover {
    background-color: var(--cinza-claro);
}

.neighborhood-item i {
    margin-right: 0.75rem;
    color: var(--roxo);
}

.neighborhood-item span {
    flex: 1;
}

.neighborhood-count {
    color: var(--cinza-escuro);
    font-size: 0.875rem;
}

.use-my-location {
    text-align: center;
}

#detect-location {
    background-color: var(--cinza-claro);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    color: var(--roxo);
    font-weight: bold;
    transition: background-color 0.2s;
}

#detect-location:hover {
    background-color: var(--cinza-medio);
}

#detect-location i {
    margin-right: 0.5rem;
}

/* Estilos para o banner local */
.banner-local-context {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 2;
}

.banner-local-badge {
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
}

.banner-local-badge i {
    margin-right: 0.5rem;
    color: var(--laranja);
}

/* Estilos para rolagem horizontal (sem auto-scroll) */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding: 0.5rem 0;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

/* Removida a animação de auto-scroll para permitir apenas rolagem manual */

/* Estilos para cards de bairros */
.neighborhoods-container {
    position: relative;
    padding: 0 1rem;
    overflow: hidden;
}

.neighborhood-card {
    min-width: 200px;
    margin-right: 1rem;
    padding: 1rem;
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.neighborhood-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.neighborhood-icon {
    width: 3rem;
    height: 3rem;
    background-color: var(--roxo);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.neighborhood-name {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.25rem;
}

.neighborhood-count {
    display: block;
    font-size: 0.875rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
}

.neighborhood-distance {
    display: block;
    font-size: 0.875rem;
    color: var(--verde);
}

.neighborhood-distance i {
    margin-right: 0.25rem;
}

/* Estilos para categorias com rolagem automática */
.amazon-categories-container {
    position: relative;
    padding: 0 1rem;
    overflow: hidden;
}

.amazon-categories-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.5rem 0;
}

.amazon-categories-carousel::-webkit-scrollbar {
    display: none;
}

.amazon-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    margin-right: 1rem;
    text-decoration: none;
    color: inherit;
}

.category-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    position: relative;
}

.category-circle.color-1 {
    background-color: #ff9800;
}

.category-circle.color-2 {
    background-color: #4caf50;
}

.category-circle.color-3 {
    background-color: #9c27b0;
}

.category-icon {
    font-size: 1.5rem;
    color: white;
}

.amazon-category-name {
    font-size: 0.875rem;
    text-align: center;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Estilos para cards de anúncios */
.ad-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.ad-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.ad-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ad-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.ad-card:hover .ad-card-image img {
    transform: scale(1.05);
}

.ad-card-highlight {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--laranja);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.ad-card-content {
    padding: 1rem;
}

.ad-card-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--roxo);
    margin-bottom: 0.5rem;
}

.ad-card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.5rem;
}

.ad-card-location {
    font-size: 0.875rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ad-card-location i {
    margin-right: 0.25rem;
}

.ad-card-distance {
    color: var(--verde);
    font-size: 0.75rem;
}

.ad-card-date {
    font-size: 0.75rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
}

.ad-card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.ad-card-favorite {
    background: none;
    border: none;
    color: var(--cinza-escuro);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.ad-card-favorite:hover {
    background-color: var(--cinza-claro);
    color: var(--vermelho);
}

.ad-card-favorite.active {
    color: var(--vermelho);
}

.ad-card-whatsapp {
    background-color: var(--verde);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.ad-card-whatsapp:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Estilos para cards de vizinhos */
.neighbor-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.neighbor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.neighbor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.neighbor-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.neighbor-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.neighbor-card:hover .neighbor-card-image img {
    transform: scale(1.05);
}

.neighbor-card-distance {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 1;
}

.neighbor-card-content {
    padding: 1rem;
}

.neighbor-card-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--roxo);
    margin-bottom: 0.5rem;
}

.neighbor-card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.5rem;
}

.neighbor-card-seller {
    font-size: 0.875rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
}

.neighbor-card-seller i {
    margin-right: 0.25rem;
    color: var(--roxo);
}

.neighbor-card-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.neighbor-card-favorite {
    background: none;
    border: none;
    color: var(--cinza-escuro);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.neighbor-card-favorite:hover {
    background-color: var(--cinza-claro);
    color: var(--vermelho);
}

.neighbor-card-favorite.active {
    color: var(--vermelho);
}

.neighbor-card-whatsapp {
    background-color: var(--verde);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.neighbor-card-whatsapp:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Estilos para ofertas populares */
.popular-offer-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.popular-offer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.popular-offer-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.popular-offer-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.popular-offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.popular-offer-card:hover .popular-offer-image img {
    transform: scale(1.05);
}

.popular-offer-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background-color: var(--laranja);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 1;
}

.popular-offer-views {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 1;
}

.popular-offer-content {
    padding: 1rem;
}

.popular-offer-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--roxo);
    margin-bottom: 0.5rem;
}

.popular-offer-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.5rem;
}

.popular-offer-location {
    font-size: 0.875rem;
    color: var(--cinza-escuro);
    margin-bottom: 0.5rem;
}

.popular-offer-location i {
    margin-right: 0.25rem;
}

.popular-offer-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
}

.popular-offer-favorite {
    background: none;
    border: none;
    color: var(--cinza-escuro);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.popular-offer-favorite:hover {
    background-color: var(--cinza-claro);
    color: var(--vermelho);
}

.popular-offer-favorite.active {
    color: var(--vermelho);
}

.popular-offer-whatsapp {
    background-color: var(--verde);
    color: white;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.popular-offer-whatsapp:hover {
    background-color: #218838;
    color: white;
    text-decoration: none;
}

/* Estilos para negócios locais */
.local-business-card {
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

.local-business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.local-business-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.local-business-image {
    position: relative;
    height: 120px;
    overflow: hidden;
}

.local-business-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.local-business-card:hover .local-business-image img {
    transform: scale(1.05);
}

.local-business-distance {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 1;
}

.local-business-verified {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--azul);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    z-index: 1;
}

.local-business-content {
    padding: 1rem;
    position: relative;
}

.local-business-logo {
    position: absolute;
    top: -2rem;
    left: 1rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: white;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.local-business-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.local-business-logo-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--roxo);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.local-business-name {
    font-size: 1rem;
    font-weight: bold;
    margin: 1.5rem 0 0.5rem;
    display: flex;
    align-items: center;
}

.local-business-trust-badge {
    margin-left: 0.5rem;
    color: var(--laranja);
    font-size: 1rem;
}

.local-business-rating {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.local-business-rating .stars {
    color: var(--laranja);
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

.local-business-rating .rating-value {
    font-weight: bold;
    margin-right: 0.25rem;
    font-size: 0.875rem;
}

.local-business-rating .rating-count {
    color: var(--cinza-escuro);
    font-size: 0.75rem;
}

.local-business-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--cinza-escuro);
}

.local-business-category i,
.local-business-ads-count i {
    margin-right: 0.25rem;
}

/* Estilos para carrosséis de anúncios */
.ads-swiper {
    padding: 1rem 0;
}

.swiper-slide {
    height: auto;
}

/* Estilos para Mais Visualizados */
.mais-vendidos-section {
    padding: 2rem 0;
}

.mais-vendidos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.mais-vendidos-title {
    font-size: 1.5rem;
    margin: 0;
}

.mais-vendidos-view-all {
    color: var(--roxo);
    text-decoration: none;
    font-weight: 500;
}

.mais-vendidos-tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--cinza-medio);
    scrollbar-width: none;
}

.mais-vendidos-tabs::-webkit-scrollbar {
    display: none;
}

.mais-vendidos-tab {
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.mais-vendidos-tab:hover {
    color: var(--roxo);
}

.mais-vendidos-tab.active {
    color: var(--branco);
    border-bottom-color: var(--roxo);
    font-weight: 500;
}

.mais-vendidos-carousel-container {
    position: relative;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.mais-vendidos-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding: 0.5rem 0;
}

.mais-vendidos-carousel::-webkit-scrollbar {
    display: none;
}

.mais-vendidos-loading {
    padding: 2rem;
    text-align: center;
    color: var(--cinza-escuro);
}

.mais-vendidos-loading i {
    margin-right: 0.5rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .neighborhood-card {
        min-width: 150px;
    }
    
    .ad-card-image,
    .neighbor-card-image,
    .popular-offer-image {
        height: 150px;
    }
    
    .local-business-image {
        height: 100px;
    }
    
    .local-business-logo {
        width: 3rem;
        height: 3rem;
        top: -1.5rem;
    }
    
    .local-business-name {
        margin-top: 1rem;
    }
}

@media (max-width: 576px) {
    .banner-destaque-content h1 {
        font-size: 1.5rem;
    }
    
    .banner-destaque-content p {
        font-size: 1rem;
    }
    
    .location-highlight {
        font-size: 1rem;
    }
    
    .neighborhood-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .ad-card-actions,
    .neighbor-card-actions,
    .popular-offer-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .ad-card-whatsapp,
    .neighbor-card-whatsapp,
    .popular-offer-whatsapp {
        width: 100%;
        text-align: center;
    }
}
