/* Custom CSS - Tema Verde e Amarelo */

:root {
    --primary-green: #228B22;
    --secondary-green: #32CD32;
    --primary-yellow: #FFD700;
    --secondary-yellow: #FFA500;
    --dark-green: #006400;
    --light-green: #90EE90;
    --gradient-bg: linear-gradient(135deg, var(--primary-green) 0%, var(--secondary-green) 100%);
    --gradient-yellow: linear-gradient(135deg, var(--primary-yellow) 0%, var(--secondary-yellow) 100%);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px;
    background-color: #f8f9fa;
}

/* Navbar Customization */
.navbar {
    background: var(--gradient-bg) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 20px;
    padding: 8px 16px !important;
    margin: 0 5px;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-image {
    text-align: center;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Buttons */
.btn-success {
    background: var(--gradient-bg);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.3);
}

.btn-success:hover {
    background: var(--dark-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 139, 34, 0.4);
}

.btn-warning {
    background: var(--gradient-yellow);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-warning:hover {
    background: var(--secondary-yellow);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    color: #333;
}

/* Filters Section */
.filters-section {
    background: white;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-control,
.form-select {
    border-radius: 20px;
    border: 2px solid #e9ecef;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(34, 139, 34, 0.25);
}

/* Products Section */
.products-section {
    min-height: 600px;
}

.product-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 30px;
    border: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    height: 200px;
    background-size: contain;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(34, 139, 34, 0.1), rgba(255, 215, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-image::before {
    opacity: 1;
}

.product-status {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--gradient-yellow);
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-price {
    color: var(--primary-green);
    font-size: 1.5rem;
    font-weight: 700;
}

.product-location {
    color: #6c757d;
    font-size: 0.9rem;
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: white;
    transform: scale(1.05);
}

/* Modals */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 30px;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    border-top: none;
    padding: 0 30px 30px;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* User Avatar */
#userAvatar {
    border: 2px solid white;
    object-fit: cover;
}

/* Dropdown Menu */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: var(--light-green);
    color: var(--dark-green);
}

/* Footer */
footer {
    background: var(--dark-green) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .product-card {
        margin-bottom: 20px;
    }

    .filters-section .row>div {
        margin-bottom: 15px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

/* Form Validation */
.is-invalid {
    border-color: #dc3545 !important;
}

.is-valid {
    border-color: var(--primary-green) !important;
}

/* Toast Notifications */
.toast {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.toast-success {
    background: var(--gradient-bg);
    color: white;
}

.toast-error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

/* Utility Classes */
.text-success {
    color: var(--primary-green) !important;
}

.bg-success {
    background: var(--gradient-bg) !important;
}

.text-warning {
    color: var(--primary-yellow) !important;
}

.bg-warning {
    background: var(--gradient-yellow) !important;
}


/* Estilos para informações adicionais dos produtos */
.product-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    border-left: 3px solid var(--primary-green);
}

.info-item {
    font-size: 0.85rem;
    line-height: 1.4;
}

.info-item i {
    width: 16px;
    text-align: center;
}

.info-item .fw-bold {
    color: #495057;
}

/* Melhorias no card de produto */
.product-card .card-body {
    padding: 1.25rem;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.product-card .card-text {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}

/* Estilo para descrição com rolagem */
.product-description {
    max-height: 120px;
    /* AUMENTADO de 80px para 120px */
    overflow-y: scroll;
    /* ALTERADO de 'auto' para 'scroll' - força aparição */
    padding: 10px;
    /* MELHORADO padding */
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    /* MELHORADO de 1.4 para 1.5 */
    color: #6c757d;
    border-radius: 6px;
    /* AUMENTADO de 4px para 6px */
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    text-align: justify;
    /* ADICIONADO para melhor formatação */
    word-wrap: break-word;
    /* ADICIONADO para quebra de palavras longas */
}

/* Personalizar scrollbar da descrição */
.product-description::-webkit-scrollbar {
    width: 8px;
    /* AUMENTADO de 4px para 8px - mais visível */
    background-color: #f8f9fa;
    /* ADICIONADO fundo */
}

.product-description::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
    /* AUMENTADO de 2px para 4px */
    margin: 2px;
    /* ADICIONADO margem */
}

.product-description::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
    /* AUMENTADO de 2px para 4px */
    border: 1px solid #fff;
    min-height: 20px;
    /* ADICIONADO altura mínima */
}

.product-description::-webkit-scrollbar-thumb:hover {
    background: var(--dark-green);
}

.product-description::-webkit-scrollbar-thumb:active {
    background: #006400;
    /* ADICIONADO estado ativo */
}

/* Para Firefox */
.product-description {
    scrollbar-width: auto;
    /* ALTERADO de 'thin' para 'auto' */
    scrollbar-color: var(--primary-green) #e9ecef;
}

/* Fallback para navegadores que não suportam scrollbar customizada */
@supports not (scrollbar-width: auto) {
    .product-description {
        border-right: 3px solid var(--primary-green);
    }
}