/* 
 * Custom Premium Design System - AutoElite Veículos
 * Palette: Dark Blue (#0F3D91), Dark (#0A2963), Gold (#C5A059 / #D4AF37), White (#FFFFFF)
 */

:root {
    --primary-blue: #0F3D91;
    --dark-blue: #0A2963;
    --gold-accent: #C5A059;
    --gold-hover: #B38E46;
    --light-bg: #F8FAFC;
    --text-dark: #1E293B;
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    font-family: var(--font-family);
    background-color: var(--light-bg);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Typography Utilities */
.fw-extrabold { font-weight: 800; }
.text-gold { color: var(--gold-accent) !important; }
.bg-gold { background-color: var(--gold-accent) !important; }
.bg-dark-blue { background-color: var(--dark-blue) !important; }
.text-dark-blue { color: var(--dark-blue) !important; }

.fs-7 { font-size: 0.85rem; }
.fs-8 { font-size: 0.75rem; }
.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }
.truncate-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Buttons */
.btn-gold {
    background-color: var(--gold-accent);
    color: #fff;
    border: none;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background-color: var(--gold-hover);
    color: #fff;
}

.btn-dark-blue {
    background-color: var(--dark-blue);
    color: #fff;
    border: none;
}

.btn-dark-blue:hover {
    background-color: #061A42;
    color: #fff;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #0F3D91 0%, #0A2963 100%);
    color: #fff;
    border: none;
}

.btn-primary-gradient:hover {
    background: linear-gradient(135deg, #0A2963 0%, #051639 100%);
    color: #fff;
}

.btn-hover-grow {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-hover-grow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 61, 145, 0.25);
}

.shadow-gold {
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
}

/* Header & Navbar */
.top-bar {
    background-color: #061A42;
}

.brand-title-box {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.brand-title-box .brand-main-text {
    font-weight: 800;
    font-size: 1.45rem;
    color: #ffffff;
    letter-spacing: 0.5px;
    line-height: 1;
}

.brand-title-box .brand-sub-text {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--gold-accent);
    text-transform: uppercase;
    line-height: 1;
    margin-top: 3px;
    letter-spacing: 1.5px;
    display: block;
}

.navbar.sticky-top {
    z-index: 1050 !important;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--gold-accent) !important;
    font-weight: 600;
}

.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 1rem;
    right: 1rem;
    height: 3px;
    background: var(--gold-accent);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #061838;
        padding: 1.25rem;
        border-radius: 1rem;
        margin-top: 0.75rem;
        border: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }
    .nav-link-custom {
        padding: 0.65rem 0.5rem !important;
    }
    .nav-link-custom.active::after {
        bottom: 2px;
        left: 0.5rem;
        right: 0.5rem;
    }
}

.z-index-2 {
    z-index: 2 !important;
}

/* Tag de Vídeo Animada (Assista o Vídeo) */
.badge-video-animated {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    animation: videoBadgePulse 2.5s infinite ease-in-out;
}

.badge-video-animated i {
    display: inline-block;
    animation: playIconBounce 1.5s infinite ease-in-out;
}

@keyframes videoBadgePulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 6px 20px rgba(220, 53, 69, 0.8);
        transform: scale(1.05);
    }
}

@keyframes playIconBounce {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(2px) scale(1.2);
    }
}

/* Hero Section com Vídeo MP4 */
.hero-section {
    min-height: 88vh;
    position: relative;
    overflow: hidden;
    background-color: #061A42;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
    filter: brightness(0.85);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 26, 66, 0.85) 0%, rgba(15, 61, 145, 0.5) 50%, rgba(6, 26, 66, 0.9) 100%);
    z-index: 1;
}

.hero-title {
    color: #FFFFFF !important;
    font-weight: 800;
    text-shadow: none !important;
    line-height: 1.15;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: none !important;
}

.hero-badge {
    background-color: #D4AF37 !important;
    color: #0F172A !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    letter-spacing: 1px;
}

/* Quick Search Card */
.quick-search-card {
    background-color: #FFFFFF !important;
    color: #0F172A !important;
    border-radius: 24px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.quick-search-card label {
    color: #334155 !important;
    font-weight: 600;
}

.quick-search-card .form-select,
.quick-search-card .form-control {
    background-color: #F8FAFC !important;
    color: #0F172A !important;
    border: 1px solid #CBD5E1 !important;
}

.quick-search-card .form-select:focus,
.quick-search-card .form-control:focus {
    background-color: #FFFFFF !important;
    border-color: #0F3D91 !important;
    box-shadow: 0 0 0 4px rgba(15, 61, 145, 0.15) !important;
}

/* Vehicle Cards */
.card-vehicle {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-vehicle:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(15, 61, 145, 0.12) !important;
}

.vehicle-img-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease;
}

.card-vehicle:hover .vehicle-img-cover {
    transform: scale(1.04);
}

.spec-pill {
    background-color: #F1F5F9;
    color: #475569;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

/* Card Price & Button Formatting - Evita quebras de linha */
.vehicle-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    width: 100%;
}

.vehicle-price-display {
    white-space: nowrap !important;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1.2;
}

.btn-card-details {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 0.45rem 1rem !important;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    color: #fff;
    transform: scale(1.1);
}

.whatsapp-badge {
    position: absolute;
    right: 70px;
    background-color: #1E293B;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Gallery Thumbnails */
.gallery-thumb {
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.gallery-thumb {
    transition: all 0.2s ease;
    opacity: 0.7;
}

.gallery-thumb:hover {
    opacity: 1;
}

.gallery-thumb.active-thumb {
    opacity: 1 !important;
    border-color: var(--gold-accent) !important;
    border-width: 2px !important;
    box-shadow: 0 0 12px rgba(197, 160, 89, 0.5) !important;
}

/* Footer Social Buttons */
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-btn:hover {
    background-color: var(--gold-accent);
    color: #fff;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--gold-accent);
}

.avatar-initial {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Spec Pills & Modern Flat Icons */
.spec-pill {
    background-color: #f1f5f9;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 50rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid #e2e8f0;
}

.spec-pill i {
    color: #64748b;
    font-size: 0.85rem;
}

.hover-gold {
    transition: color 0.2s ease-in-out;
}

.hover-gold:hover {
    color: #D4AF37 !important;
}

/* Webmotors Clean Form Theme */
.wm-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.wm-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f2b5c;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.wm-card > form > .mb-4:first-child .wm-title,
.wm-card > .wm-title:first-child,
.wm-card form > div:first-child .wm-title,
.wm-title:first-child {
    margin-top: 0;
}

.wm-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.4rem;
    display: block;
}

.wm-input,
.wm-select {
    width: 100%;
    height: 48px;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.wm-input:focus,
.wm-select:focus {
    border-color: #0f3d91;
    box-shadow: 0 0 0 3px rgba(15, 61, 145, 0.12);
}

.wm-input::placeholder {
    color: #94a3b8;
    font-size: 0.9rem;
}

textarea.wm-input {
    height: auto;
    min-height: 100px;
}

.wm-btn-submit {
    background-color: #0f2b5c;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.85rem 1.5rem;
    border-radius: 8px;
    border: none;
    width: 100%;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 12px rgba(15, 43, 92, 0.2);
}

.wm-btn-submit:hover {
    background-color: #0b1f42;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 43, 92, 0.3);
}

/* Custom File Upload Webmotors */
.wm-file-box {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
    height: 48px;
}

.wm-file-btn {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0 1.25rem;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid #cbd5e1;
    cursor: pointer;
}

.wm-file-btn:hover {
    background: #e2e8f0;
}

.wm-file-name {
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Spec Box Organizador para Ficha Técnica */
.spec-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.spec-box:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.spec-box i {
    color: #D4AF37;
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.spec-box-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.2rem;
    display: block;
}

.spec-box-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Thumbnails de Navegação da Galeria do Veículo */
.gallery-thumb {
    transition: all 0.2s ease-in-out;
    border: 2px solid transparent !important;
    border-radius: 0.5rem;
    opacity: 0.75;
}

.gallery-thumb:hover {
    opacity: 1;
    border-color: #D4AF37 !important;
    transform: translateY(-2px);
}

/* Gallery Navigation Arrows */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 5;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    backdrop-filter: blur(4px);
}

.gallery-nav-btn:hover {
    background-color: #D4AF37;
    color: #0f172a;
    transform: translateY(-50%) scale(1.08);
}

.gallery-nav-btn.nav-prev {
    left: 12px !important;
}

.gallery-nav-btn.nav-next {
    right: 12px !important;
}

/* Offcanvas Mobile Navigation Menu Moderno */
.mobile-nav-offcanvas {
    background-color: var(--dark-blue, #0A2963) !important;
    width: 310px !important;
    max-width: 85vw !important;
    z-index: 1055 !important;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.offcanvas-backdrop {
    z-index: 1045 !important;
    background-color: rgba(10, 41, 99, 0.6) !important;
    backdrop-filter: blur(4px);
}

.btn-close-custom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
    border: none;
    outline: none;
    z-index: 1060;
    cursor: pointer;
}

.btn-close-custom:hover {
    background-color: #D4AF37;
    color: #0A2963;
    transform: scale(1.05);
}

.mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease-in-out;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: #D4AF37 !important;
    background-color: rgba(255, 255, 255, 0.08);
    padding-left: 1.25rem;
}

.mobile-nav-item i {
    width: 24px;
    text-align: center;
}

/* Responsive Mobile Enhancements & Layout Shift Fix */
html, body {
    overflow-x: hidden;
    width: 100%;
}

body.offcanvas-open,
body.modal-open,
body[style*="overflow: hidden"] {
    padding-right: 0 !important;
}

.sticky-top,
.fixed-top,
.navbar {
    padding-right: 0 !important;
}

@media (max-width: 767.98px) {
    .container, .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .navbar {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .navbar-brand .brand-main-text {
        font-size: 1.05rem !important;
    }

    .hero-section {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .hero-title {
        font-size: 2.1rem !important;
        line-height: 1.25 !important;
    }

    .hero-subtitle {
        font-size: 0.95rem !important;
    }

    .hero-badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.85rem !important;
    }

    .quick-search-card,
    .wm-card,
    .filter-card {
        padding: 1.15rem !important;
        border-radius: 1.25rem !important;
    }

    .spec-box {
        padding: 0.65rem 0.35rem !important;
    }

    .spec-box-label {
        font-size: 0.68rem !important;
    }

    .spec-box-value {
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
    }

    .whatsapp-float {
        bottom: 16px !important;
        right: 14px !important;
        width: 46px !important;
        height: 46px !important;
        font-size: 24px !important;
        z-index: 999 !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25) !important;
    }

    .vehicle-img-cover {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16 / 10 !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    .main-gallery-view img {
        max-height: 320px !important;
    }

    .gallery-nav-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 0.9rem !important;
    }
}

/* Swiper Destaques Styles */
.swiper-destaques {
    padding-left: 5px;
    padding-right: 5px;
}

.swiper-destaques .swiper-slide {
    height: auto;
    display: flex;
}

.swiper-destaques .card-vehicle {
    width: 100%;
}

.swiper-destaques .swiper-pagination-bullet {
    background: var(--dark-blue);
    opacity: 0.3;
    width: 10px;
    height: 10px;
    transition: all 0.3s ease;
}

.swiper-destaques .swiper-pagination-bullet-active {
    background: var(--gold-accent);
    opacity: 1;
    width: 28px;
    border-radius: 5px;
}

.swiper-destaques-prev,
.swiper-destaques-next {
    color: var(--gold-accent) !important;
    background: rgba(10, 41, 99, 0.85);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.swiper-destaques-prev:after,
.swiper-destaques-next:after {
    font-size: 1.1rem !important;
    font-weight: bold;
}

.swiper-destaques-prev:hover,
.swiper-destaques-next:hover {
    background: var(--gold-accent);
    color: #fff !important;
    transform: scale(1.1);
}

@media (max-width: 767.98px) {
    .swiper-destaques-prev,
    .swiper-destaques-next {
        display: none !important;
    }
}
