/* Estilos para a Homepage Atualizada */

/* Estilos para o slider principal */
.main-banner {
    margin-bottom: 40px;
}

.banner-slide img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

/* Controles do slider */
.swiper-button-next, 
.swiper-button-prev {
    color: #fff;
    background-color: rgba(0, 0, 0, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.swiper-button-next:hover, 
.swiper-button-prev:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.swiper-button-next:after, 
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #fff;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    background-color: #6e0ad6;
    opacity: 1;
}

/* Estilos para navegação por categorias */
.categories-navigation {
    margin-bottom: 40px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    text-decoration: none;
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.category-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.category-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Estilos para bairros populares */
.popular-neighborhoods {
    margin-bottom: 40px;
}

.neighborhood-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    text-decoration: none;
    color: var(--text-primary);
}

.neighborhood-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.neighborhood-icon {
    width: 60px;
    height: 60px;
    background-color: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.neighborhood-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.neighborhood-count {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Estilos para banners de parceiros */
.partners-banner {
    margin-bottom: 40px;
}

.partner-slide img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Estilos para tabs de categorias */
.category-tabs {
    margin-bottom: 40px;
}

.nav-tabs .nav-link {
    color: var(--text-primary);
    border: 1px solid transparent;
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
}

/* Responsividade */
@media (max-width: 992px) {
    .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-tabs .nav-item {
        flex-shrink: 0;
    }
}

@media (max-width: 768px) {
    .category-offers {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .banner-slide img {
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .category-offers {
        grid-template-columns: 1fr;
    }
    
    .banner-slide img {
        max-height: 300px;
    }
    
    .category-icon,
    .neighborhood-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .category-name,
    .neighborhood-name {
        font-size: 14px;
    }
}

/* Estilos para a seção "Procurados por você" inspirada na OLX */
.recent-searches-section {
    margin-bottom: 40px;
    padding: 30px 0;
    background-color: #fff;
}

/* Estilos para os cards no estilo OLX */
.olx-card {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
    height: 100%;
    position: relative;
}

.olx-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
    transform: translateY(-2px);
}

.olx-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.olx-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.olx-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.olx-card:hover .olx-card-image img {
    transform: scale(1.05);
}

.olx-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #ff8100;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.olx-card-content {
    padding: 12px;
}

.olx-card-price {
    font-size: 18px;
    font-weight: 700;
    color: #4a4a4a;
    margin-bottom: 6px;
}

.olx-card-title {
    font-size: 14px;
    font-weight: 500;
    color: #4a4a4a;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
    line-height: 1.4;
}

.olx-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    color: #757575;
}

.olx-card-location {
    display: flex;
    align-items: center;
}

.olx-card-location i {
    margin-right: 4px;
    font-size: 12px;
}

.olx-card-date {
    font-size: 11px;
}

/* Responsividade para os cards OLX */
@media (max-width: 767px) {
    .olx-card-image {
        height: 140px;
    }
    
    .olx-card-price {
        font-size: 16px;
    }
    
    .olx-card-title {
        font-size: 13px;
        height: 36px;
    }
}

@media (max-width: 576px) {
    .olx-card-image {
        height: 160px;
    }
}

/* Estilos para o carrossel de categorias estilo Amazon */
.amazon-categories-section {
    background-color: #f8f9fa;
    padding: 30px 0;
    margin-bottom: 40px;
}

.amazon-categories-container {
    position: relative;
    padding: 0 40px;
}

.amazon-categories-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 20px;
    padding: 20px 0;
}

.amazon-categories-carousel::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.amazon-category-item {
    flex: 0 0 auto;
    width: 150px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s ease;
}

.amazon-category-item:hover {
    transform: translateY(-5px);
}

.amazon-category-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.amazon-category-image i {
    font-size: 60px;
    color: #6e0ad6;
    transition: color 0.3s ease;
}

.amazon-category-item:hover .amazon-category-image {
    background-color: #6e0ad6;
    transform: scale(1.05);
}

.amazon-category-item:hover .amazon-category-image i {
    color: #ffffff;
}

.amazon-category-name {
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
}

.amazon-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease;
}

.amazon-nav-button:hover {
    background-color: #f8f8f8;
}

.amazon-prev-button {
    left: 0;
}

.amazon-next-button {
    right: 0;
}

@media (max-width: 768px) {
    .amazon-category-image {
        width: 120px;
        height: 120px;
    }
    
    .amazon-category-item {
        width: 120px;
    }
    
    .amazon-category-image i {
        font-size: 40px;
    }
}

@media (max-width: 576px) {
    .amazon-category-image {
        width: 100px;
        height: 100px;
    }
    
    .amazon-category-item {
        width: 100px;
    }
    
    .amazon-category-image i {
        font-size: 30px;
    }
    
    .amazon-categories-container {
        padding: 0 30px;
    }
}
