/* Variáveis globais */
:root {
    --dark-theme: #141d24 !important;
    --dark-theme-lighter: #2f4555 !important;
    --text-light: rgba(255, 255, 255, 0.9) !important;
    --text-muted: rgba(255, 255, 255, 0.7) !important;
    --border-color: #141d24 !important;
    --card-bg: #2f4555 !important;
    --accent-color: #4CAF50 !important;
    --success-color: #4CAF50 !important;
    --primary-color: #4CAF50 !important;
    --text-light-secondary: rgba(255, 255, 255, 0.6) !important;
}

/* Reset e estilos base */
html, body {
    background-color: var(--dark-theme);
    color: var(--text-light);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Estilos para dispositivos móveis */
@media (max-width: 768px) {
    body {
        padding-top: 0 !important;
    }
    
    #main-header {
        position: relative !important;
        margin-bottom: 0 !important;
    }

    .navbar {
        padding: 8px 0 !important;
        margin: 0 !important;
    }

    .navbar-logo {
        max-height: 30px;
        width: auto;
    }

    main.flex-shrink-0 {
        margin-top: 0 !important;
    }

    .container {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }

    h1 {
        margin: 0.5rem 0 1rem 0 !important;
        font-size: 1.75rem !important;
    }

    .row {
        margin-top: 0.5rem !important;
    }
}

/* Estilos específicos para tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .card {
        margin-bottom: 20px !important;
        height: 100% !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-title {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
        height: auto !important;
        min-height: 40px !important;
    }
    
    .specs-container {
        gap: 0.5rem !important;
    }
    
    .spec-item {
        font-size: 0.9rem !important;
    }
    
    .price {
        font-size: 1.5rem !important;
        margin-top: 0.5rem !important;
    }
    
    .custom-card-image {
        padding-bottom: 70% !important; /* Ajuste para tablets */
    }
    
    /* Ajustes para 2 cards por linha */
    .col-md-6 {
        width: 50% !important;
        padding: 0 10px !important;
    }
    
    .row {
        margin: 0 -10px !important;
    }
    
    /* Melhorar espaçamento entre cards */
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
}

/* Container e seções principais */
.container, 
main, 
.py-5, 
.py-4,
section,
.content-area,
.vehicle-listings,
.card-container {
    background-color: var(--dark-theme) !important;
    border: none !important;
}

/* Custom Card Image */
.custom-card-image {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 75% !important; /* Proporção 4:3 */
    overflow: hidden !important;
    background-color: var(--dark-theme-lighter) !important;
    border-radius: 8px 8px 0 0 !important;
    max-height: 300px !important;
}

.custom-card-image img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    min-width: 100% !important;
    min-height: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
}

.custom-card-image .no-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--text-light) !important;
}

.custom-card-image:hover img {
    transform: translate(-50%, -50%) scale(1.05) !important;
}

/* Card styles */
.card {
    background-color: var(--dark-theme-lighter) !important;
    border: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important;
}

.card-body {
    background-color: var(--dark-theme-lighter) !important;
    padding: 1.25rem !important;
}

.card-title {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    margin-bottom: 1rem !important;
    color: var(--text-light) !important;
}

.card-text {
    color: var(--text-light-secondary) !important;
    margin-bottom: 0.5rem !important;
}

.vehicle-listings .card-price {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #FFCA28 !important;
    margin: 1rem 0 !important;
}

.btn-primary {
    width: 100% !important;
    padding: 0.75rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    border-radius: 6px !important;
    background-color: var(--accent-color) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-secondary {
    background-color: var(--dark-theme-lighter) !important;
    border: none !important;
    color: #ffffff !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    border: none !important;
    color: #ffffff !important;
}

.badge {
    background-color: var(--accent-color) !important;
    color: #ffffff !important;
}

.form-control, .form-select {
    background-color: var(--dark-theme-lighter) !important;
    border-color: var(--border-color) !important;
    color: var(--text-light) !important;
}

.form-control:focus, .form-select:focus {
    background-color: var(--dark-theme-lighter) !important;
    border-color: #ffffff !important;
    color: var(--text-light) !important;
}

.input-group-text {
    background-color: var(--dark-theme-lighter) !important;
    border-color: var(--border-color) !important;
    color: var(--text-light) !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .custom-card-image {
        padding-bottom: 75% !important;
    }
    
    .custom-card-image img {
        width: auto !important;
        height: 100% !important;
        max-width: none !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .card-title {
        font-size: 1.25rem !important;
    }
    
    .card-price {
        font-size: 1.5rem !important;
    }
}

/* Grid spacing */
.row {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

.col {
    margin-bottom: 1.5rem;
}

/* Mobile Adjustments */
@media (max-width: 576px) {
    .image-wrapper {
        height: 180px;
        max-height: 180px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .image-wrapper {
        padding-top: 70%; /* Slightly taller for tablets */
    }
}

@media (max-width: 768px) {
    .image-wrapper {
        padding-top: 56.25% !important; /* Força 16:9 mesmo no mobile */
    }
    
    .image-wrapper .card-img {
        object-fit: contain !important;
    }
}

/* Header e navegação */
#main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.3s ease-in-out;
    background-color: var(--dark-theme);
    border: none !important;
}

#main-header.header-hidden {
    transform: translateY(-100%);
}

.navbar {
    background-color: var(--dark-theme);
    padding: 15px 0;
    border: none !important;
}

.navbar-logo {
    height: 50px;
    width: auto;
}

/* Ajustes para mobile */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem;
    }

    .navbar-logo {
        max-height: 40px;
        width: auto;
    }

    main.flex-shrink-0 {
        margin-top: -20px;
    }

    .container.mt-4 {
        margin-top: 0 !important;
    }
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-light);
}

p, span, div {
    color: var(--text-light);
}

/* Links e botões */
a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--text-light);
    text-decoration: none;
}

/* Footer */
footer {
    background-color: var(--dark-theme) !important;
    border: none !important;
    margin-top: auto;
    padding: 20px 0;
}

footer h5 {
    color: var(--text-light);
    margin-bottom: 1rem;
}

footer ul li {
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-light);
    text-decoration: none;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-3px);
}

footer hr {
    border-color: var(--border-color);
    margin: 2rem 0;
}

footer .text-muted {
    color: var(--text-muted) !important;
}

/* Utilitários */
.text-muted {
    color: var(--text-muted) !important;
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar-logo {
        height: 40px;
    }
}

@media (max-width: 768px) {
    /* Ajustes gerais */
    body {
        font-size: 14px;
    }

    /* Navbar */
    .navbar {
        padding: 0.5rem;
    }

    .navbar-brand img {
        max-height: 40px;
    }

    /* Cards */
    .card-veiculo {
        margin-bottom: 1rem;
    }

    .card-veiculo .card-body {
        padding: 1rem;
    }

    .card-veiculo .price {
        font-size: 1.1rem;
    }

    /* Botões */
    .btn {
        width: 100%;
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }

    /* Grid */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col-md-4 {
        padding-left: 10px;
        padding-right: 10px;
    }
}

@media (max-width: 576px) {
    /* Navbar */
    .navbar-brand img {
        max-height: 35px;
    }

    /* Cards */
    .card-veiculo .card-title {
        font-size: 1.1rem;
    }

    /* Footer */
    footer {
        text-align: center;
    }

    footer .col-md-4 {
        margin-bottom: 1.5rem;
    }
}

/* Grid adjustments */
.row-cols-1 > * {
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .row-cols-md-3 > * {
        margin-bottom: 2rem;
    }
}

/* Estilos da Galeria de Imagens */
#carImageGallery,
#carImageGallery .carousel-inner,
#carImageGallery .carousel-item,
#carImageGallery .carousel-item img {
    background-color: var(--dark-theme) !important;
}

/* Controles do Carousel */

/* Cookie Consent */
#cookieConsentContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    pointer-events: none;
}

#cookieConsentContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    z-index: 9998;
}

.cookie-consent-overlay.show {
    opacity: 1;
}

.cookie-consent {
    position: relative;
    background-color: white;
    color: #333;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    width: 500px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: auto;
    margin: 20px;
    width: 500px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-consent.show {
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.cookie-consent-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
}

.cookie-consent-button {
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.cookie-accept {
    background-color: #4CAF50;
    color: white;
}

.cookie-accept:hover {
    background-color: #45a049;
}

.cookie-settings {
    background-color: transparent;
    color: #90CAF9;
    border: 1px solid #90CAF9;
}

.cookie-settings:hover {
    background-color: rgba(144, 202, 249, 0.1);
}

.cookie-essential {
    background-color: transparent;
    color: white;
    border: 1px solid white;
}

.cookie-essential:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Estilos do painel de preferências de cookies */
.cookie-consent-preferences {
    display: none;
    position: relative;
    background-color: white;
    color: #333;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    width: 500px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    margin: 20px;
}

.cookie-consent-preferences.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.cookie-consent-preferences h3 {
    margin-top: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.cookie-intro {
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
}

.cookie-options {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 10px;
}

.cookie-option {
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-name {
    font-weight: 600;
    margin-left: 15px;
    font-size: 14px;
}

.cookie-required {
    font-size: 12px;
    color: #999;
    margin-left: 10px;
}

.cookie-description {
    font-size: 13px;
    color: #666;
    margin: 0;
    padding-left: 50px;
}

/* Estilos do switch de toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 22px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cookie-slider {
    background-color: #4CAF50;
}

input:focus + .cookie-slider {
    box-shadow: 0 0 1px #4CAF50;
}

input:checked + .cookie-slider:before {
    transform: translateX(18px);
}

input:disabled + .cookie-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Botões do painel de preferências */
.cookie-back {
    background-color: #f1f1f1;
    color: #333;
}

.cookie-back:hover {
    background-color: #e1e1e1;
}

.cookie-save {
    background-color: #4CAF50;
    color: white;
}

.cookie-save:hover {
    background-color: #45a049;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}
.carousel-control-prev,
.carousel-control-next {
    width: 5% !important;
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.carousel-inner {
    background-color: var(--dark-theme) !important;
}

/* Força o fundo escuro em todos os elementos do carousel */
.carousel,
.carousel-inner,
.carousel-item,
.carousel-item img {
    background-color: var(--dark-theme) !important;
}

/* Estilos para os detalhes do carro */
.car-details-card {
    background-color: var(--dark-theme-lighter) !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3) !important;
}

.car-details-card .card-body {
    padding: 1.5rem !important;
    background-color: var(--dark-theme-lighter) !important;
}

.details-section p {
    margin-bottom: 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
}

.details-section .detail-value {
    font-size: 1.1rem !important;
    margin-top: 0.3rem !important;
    display: flex !important;
    align-items: center !important;
    color: var(--text-light) !important;
}

.details-section .detail-icon {
    width: 24px !important;
    margin-right: 10px !important;
    color: var(--text-light) !important;
}

.material-symbols-outlined {
    vertical-align: middle !important;
    font-size: 20px !important;
    color: var(--text-light) !important;
    margin-right: 10px !important;
}

.details-section strong {
    color: var(--text-light-secondary) !important;
    font-size: 0.85rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.price-tag {
    padding: 15px 0 !important;
    margin-bottom: 20px !important;
    border-bottom: 2px solid var(--border-color) !important;
    display: flex !important;
    align-items: center !important;
}

.price-tag i {
    font-size: 1.8rem !important;
    margin-right: 10px !important;
    color: var(--primary-color) !important;
}

.price-tag h3 {
    font-size: 2rem !important;
    font-weight: bold !important;
    color: var(--primary-color) !important;
    margin: 0 !important;
}

.details-section h4 {
    color: var(--text-light) !important;
    font-size: 1.2rem !important;
    margin: 1.5rem 0 !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.card-title {
    color: var(--text-light) !important;
    font-weight: bold !important;
    margin-bottom: 1rem !important;
}

.detail-row {
    margin-bottom: 0.5rem !important;
}

/* Estilos para cards clicáveis */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.card-link:hover {
    text-decoration: none;
    color: inherit;
}

.card-link .card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card-link:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Estilos dos botões de contato */
.contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.contact-btn {
    flex: 1;
    max-width: 200px;
    padding: 0.75rem !important;
    white-space: normal !important;
    height: auto !important;
}

.contact-btn-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact-btn-content .icon {
    margin: 0 !important;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.btn-text span {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .contact-buttons {
        gap: 0.75rem;
    }

    .contact-btn {
        padding: 0.5rem 0.75rem !important;
    }

    .contact-btn-content {
        gap: 0.5rem;
    }

    .btn-text span {
        font-size: 0.85rem;
    }
}
