@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- PERFORMANCE & SKELETON LOADERS --- */
.shimmer {
    background: #f1f5f9;
    background-image: linear-gradient(to right, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%);
    background-repeat: no-repeat;
    background-size: 1000px 100%;
    display: inline-block;
    position: relative;
    animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 420px;
    border: 1px solid var(--border);
}

.skeleton-img {
    height: 200px;
    width: 100%;
}

.skeleton-content {
    padding: 20px;
}

.skeleton-line {
    height: 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.price {
    height: 24px;
    width: 40%;
    margin-top: 15px;
}

/* Image Performance */
img {
    content-visibility: auto;
}

.lazy-img-container {
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    /* Prevent CLS */
}

.lazy-img-container img {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy-img-container img.loaded {
    opacity: 1;
}

.car-image-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

:root {
    --primary: #EE1C24;
    --primary-hover: #D01920;
    --primary-blue: #0047BB;
    --secondary: #0f172a; /* Deeper Slate */
    --background: #f8fafc; /* Lighter/Cleaner Slate */
    --white: #FFFFFF;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --container-max: 1280px;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Slim Banner removed as per preference */

/* Header */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    height: 72px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header .container {
    width: 100%;
    max-width: 1440px;
    padding: 0 40px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo img {
    width: 220px;
    /* Refined desktop standard */
    height: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 28px;
    align-items: center;
    margin: 0 auto;
    /* Perfectly centered */
}

.nav-link {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: var(--primary);
    transform: translateY(-1px);
}

/* Header Badges */
.badge-new {
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    font-size: 7px;
    padding: 0px 3px;
    border-radius: 8px;
    font-weight: 800;
    margin-left: 2px;
}

.dot-notif {
    width: 5px;
    height: 5px;
    background: var(--primary);
    border-radius: 50%;
    margin-left: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-left: 20px;
    border-left: 1px solid #E0E0E0;
    /* Subtler separator */
    height: 30px;
    /* Partial height separator */
}

.action-icon {
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
}

.action-icon i {
    font-size: 18px;
}

/* Header Actions Right Area */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-left: 24px;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    height: 32px;
    /* Centered relative to header height */
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.action-item:hover {
    color: var(--primary);
}

.action-item i {
    font-size: 20px;
}

.action-text {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    color: #111827;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .header {
        height: 60px;
        /* Slimmer on mobile */
    }

    .header .container {
        padding: 0 16px;
    }

    .nav {
        display: none;
        /* Mobile menu hidden by default */
    }

    .header-actions {
        border-left: none;
        padding-left: 0;
        gap: 15px;
    }

    .action-text {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
        margin-left: 15px;
    }

    .logo img {
        width: 155px;
    }
}

/* Hero & Search Overlay */
.hero-new {
    position: relative;
    min-height: 720px;
    height: calc(100vh - 72px);
    max-height: 820px;
    width: 100%;
    margin-bottom: 0;
}

.hero-carousel {
    height: 100%;
    width: 100%;
}

.carousel-item {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

.search-overlay {
    position: absolute;
    bottom: 0;
    /* Align to bottom */
    left: 50%;
    transform: translate(-50%, 50%);
    /* 50% in, 50% out overlap */
    width: 100%;
    z-index: 10;
    display: flex;
    justify-content: center;
}

.search-widget {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.search-tabs {
    display: flex;
    background: #f9f9fb;
}

.search-tab {
    padding: 15px 30px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-tab.active {
    background: var(--white);
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.search-form {
    padding: 30px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 15px;
}

.search-input-wrapper i {
    color: var(--primary);
    font-size: 18px;
    margin-right: 15px;
}

.search-input-wrapper input {
    border: none;
    width: 100%;
    font-size: 16px;
    outline: none;
}

.search-row {
    display: flex;
    gap: 15px;
}

.search-select {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
}

.search-select label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
}

.search-select span {
    font-weight: 600;
    font-size: 14px;
}

.btn-main-search {
    background: var(--primary);
    color: var(--white);
    flex: 1;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
}

/* Brands Section - Support for Search Box Background */
.brands-section {
    padding: 160px 0 60px 0;
    /* Increased padding to clear the search widget overlap */
    background: #f3f4f6;
    position: relative;
    margin-top: 0;
    z-index: 1;
}

.section-title-small {
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 30px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-align: center;
}

.stores-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.store-item {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 100px;
}

.store-item img {
    height: 32px;
    /* Balanced height for institutional look */
    width: auto;
    filter: grayscale(1);
    opacity: 0.55;
    transition: all 220ms ease-out;
}

.store-item:hover img {
    filter: grayscale(0);
    opacity: 1;
    transform: scale(1.04);
}

@media (max-width: 1024px) {
    .brands-section {
        padding: 120px 0 40px 0;
    }

    .stores-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Solutions Grid */
.solutions {
    padding: 40px 0;
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.solution-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.solution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.sol-icon {
    width: 60px;
    height: 60px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: background 0.3s;
}

.solution-card:hover .sol-icon {
    background: var(--primary);
}

.sol-icon i {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 0 !important;
    transition: color 0.3s;
}

.solution-card:hover .sol-icon i {
    color: var(--white);
}

.solution-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
}

.solution-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Main Titles */
.main-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 30px;
}

/* Categories Section */
.categories {
    padding: 60px 0;
    background: #fcfcfc;
}

.categories .main-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.cat-card {
    height: 140px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 15px;
    overflow: hidden;
    cursor: pointer;
}

.cat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
}

.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.carousel-item {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 20%;
    /* Ajustado para mostrar o carro */
    transition: opacity 0.5s ease;
}

/* Searched Cards */
.most-searched {
    padding: 60px 0;
    background: #fff;
}

.searched-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.searched-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.2s;
    cursor: pointer;
}

.searched.car-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.car-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220, 38, 38, 0.2);
}

.car-info {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.car-title {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.car-price {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin: 12px 0;
    letter-spacing: -0.5px;
}

.searched-card p {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
}

.searched-card img {
    width: 100%;
    height: 125px;
    /* Increased by 25% for better visibility */
    object-fit: contain;
    transition: transform 0.3s ease;
}

.searched-card:hover img {
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .searched-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .searched-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .searched-card img {
        height: 100px;
    }
}

.cat-card span {
    position: relative;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}

/* News Section */
.news {
    padding: 60px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.view-all {
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
}

.news-img {
    width: 200px;
    height: 150px;
    background-size: cover;
    background-position: center;
}

.news-content {
    flex: 1;
    padding: 20px;
}

.news-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.news-content p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Quick Links */
.quick-links {
    padding: 40px 0;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.quick-card {
    padding: 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.quick-card.red {
    background: var(--primary);
    color: var(--white);
}

.quick-card i {
    font-size: 24px;
}

.quick-card span {
    font-weight: 700;
    font-size: 14px;
}

/* Footer New */
.footer-new {
    background: var(--secondary);
    color: var(--white);
    padding: 60px 0 20px 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #454545;
    padding-bottom: 20px;
}

.footer-logo img {
    height: 30px;
}

.social-links {
    display: flex;
    gap: 20px;
    font-size: 24px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 14px;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-col a {
    display: block;
    color: #B2B2B2;
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #B2B2B2;
    padding-top: 20px;
    border-top: 1px solid #454545;
}

.legal-links {
    display: flex;
    gap: 20px;
}

/* Search Page Integration (Comprar.html) */
.search-container {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}

.sidebar {
    flex: 0 0 280px;
}

.sidebar-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.filter-section {
    background: var(--white);
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.filter-header {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.brand-mini-card {
    border: 1px solid var(--border);
    padding: 8px;
    text-align: center;
    border-radius: 4px;
}

.brand-mini-card img {
    height: 20px;
}

.search-main {
    flex: 1;
}

.search-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.result-count {
    font-weight: 700;
}

.car-card-search {
    display: flex;
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.car-card-search .car-image {
    width: 300px;
    height: 200px;
    background-size: cover;
    background-position: center;
}

.car-card-search .car-info {
    flex: 1;
    padding: 20px;
}

.badge {
    font-size: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
    margin-right: 5px;
}

.badge-featured {
    background: var(--primary);
    color: white;
}

.badge-fipe {
    background: #28a745;
    color: white;
}

.btn-interest {
    background: var(--secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 15px;
}

/* Vehicle Detail Page (Detalhes.html) */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    padding: 40px 0;
}

/* Gallery */
.detail-gallery {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.main-image {
    width: 100%;
    height: 500px;
    background-size: cover;
    background-position: center;
}

.thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    padding: 10px;
}

.thumb-item {
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumb-item.active {
    border-color: var(--primary);
}

/* Vehicle Info Header */
.vehicle-header {
    margin-bottom: 30px;
}

.vehicle-header h1 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 10px;
}

.price-tag {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary);
}

/* Specs Bar */
.specs-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    background: var(--white);
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    box-shadow: var(--shadow);
}

.spec-item {
    text-align: center;
    border-right: 1px solid var(--border);
}

.spec-item:last-child {
    border-right: none;
}

.spec-item label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.spec-item span {
    font-weight: 700;
    font-size: 14px;
}

/* Description & Features */
.detail-content-box {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.detail-content-box h3 {
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 5px;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.feature-item i {
    color: #28a745;
}

/* Seller Card */
.seller-card {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
}

.seller-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.seller-avatar {
    width: 60px;
    height: 60px;
    background: #f3f3f3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: inherit;
}

.btn-send {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    padding: 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 16px;
    margin-top: 10px;
}

.financing-sim {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dotted var(--border);
    text-align: center;
}

.financing-sim p {
    font-size: 12px;
    color: var(--text-muted);
}

.financing-sim strong {
    color: var(--primary);
    font-size: 18px;
}

/* Media Queries (Mobile Responsiveness) */
@media (max-width: 992px) {
    .detail-container {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        order: -1;
        /* Move seller card above on mobile if needed, or keep at bottom */
    }

    .seller-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }

    .nav {
        display: none;
        /* Simplificação: esconder nav no mobile */
    }

    .hero-new {
        height: 600px;
    }

    .search-widget {
        max-width: 95%;
    }

    .search-row {
        flex-direction: column;
    }

    .stores-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        text-align: center;
    }

    .solutions-grid,
    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        flex-direction: column;
    }

    .news-img {
        width: 100%;
        height: 200px;
    }

    .footer-links {
        grid-template-columns: 1fr 1fr;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .car-card-search {
        flex-direction: column;
    }

    .car-card-search .car-image {
        width: 100%;
    }

    .specs-bar {
        grid-template-columns: 1fr 1fr;
    }

    .spec-item {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-bottom: 10px;
    }

    .spec-item:nth-child(n+3) {
        border-bottom: none;
        padding-top: 10px;
    }
}

@media (max-width: 480px) {

    .solutions-grid,
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .price-tag {
        font-size: 24px;
    }
}

/* INVENTORY PAGE STYLES */
.inventory-page {
    padding: 40px 0;
    background-color: #f6f7f8;
    min-height: 100vh;
}

.inventory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: flex-start;
}

/* Sidebar Filters */
.filters-sidebar {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 100px;
    border: 1px solid #e5e7eb;
}

/* Custom Scrollbar for Sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.filter-group {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
}

.filter-options label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-options label span {
    color: #9ca3af;
    font-size: 12px;
}

.filter-options input[type="checkbox"] {
    margin-right: 10px;
}

.range-inputs {
    display: flex;
    gap: 10px;
}

.range-inputs input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 14px;
}

/* Results Content */
.results-content {
    flex: 1;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.results-header-info h1 {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.results-header-info p {
    color: #6b7280;
    font-size: 14px;
}

.sort-dropdown select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    color: #4b5563;
}

/* Ads Grid (3 columns) */
.ads-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.ad-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.ad-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.ad-image {
    width: 100%;
    height: 180px;
    position: relative;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #f3f4f6;
}

.ad-image img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-image img {
    transform: scale(1.1);
}

.ad-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ad-main {
    margin-bottom: 12px;
}

.ad-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.ad-version {
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 12px;
    text-transform: uppercase;
    line-height: 1.4;
    height: 32px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ad-price {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a1a;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.ad-meta span {
    font-size: 12px;
    color: #6b7280;
}

.ad-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-installments {
    width: 100%;
    padding: 10px;
    background: #1a1a1a;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
}

.btn-installments:hover {
    background: #333;
}


.ad-actions {
    display: flex;
    gap: 15px;
    font-size: 20px;
    color: #6b7280;
}

.ad-actions i {
    cursor: pointer;
    transition: color 0.2s;
}

.ad-actions i:hover {
    color: #ff3333;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-page {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: #4b5563;
}

.btn-page.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.btn-next {
    padding: 0 20px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #1a1a1a;
}

/* Sidebar Internal Scroll for long lists */
.filter-options.scrollable {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-options.scrollable::-webkit-scrollbar {
    width: 4px;
}

.filter-options.scrollable::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #4b5563;
    cursor: pointer;
}

.filter-checkbox input {
    width: 16px;
    height: 16px;
}

.filter-checkbox span {
    margin-left: auto;
    color: #9ca3af;
    font-size: 11px;
}

@media (max-width: 1200px) {
    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ads-grid {
        grid-template-columns: 1fr;
    }
}

/* Featured Offers Home */
.featured-offers {
    padding: 80px 0;
    background-color: var(--white);
}

.car-grid-home {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 40px;
}

.btn-outline-red {
    display: inline-block;
    padding: 12px 35px;
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 700;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    text-transform: uppercase;
    font-size: 14px;
}

.btn-outline-red:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .car-grid-home {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .car-grid-home {
        grid-template-columns: 1fr;
    }
}

/* Sidebar Header & Clear Filters */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border);
}

.btn-clear {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-clear:hover {
    opacity: 0.7;
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-main);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* Sorting Improvements */
.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-wrapper label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
}

.sort-wrapper select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    background: #fff;
}

/* Result Count Enhancement */
.result-count {
    font-size: 16px;
    color: var(--text-main);
}

.result-count span {
    font-weight: 800;
    color: var(--primary);
}

/* Scrollable Filters */
.filter-options.scrollable {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-options.scrollable::-webkit-scrollbar {
    width: 4px;
}

.filter-options.scrollable::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Active Filters Bar */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

/* Detail Page Layout */
.detail-page-wrapper {
    padding: 40px 0;
    background-color: var(--background);
}

.vehicle-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.breadcrumb a {
    color: var(--primary-blue);
    font-weight: 500;
}

.breadcrumb span {
    color: var(--text-main);
    font-weight: 600;
}

/* Gallery */
.gallery-wrapper {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.main-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.main-image-display {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: background-image 0.3s ease-in-out;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-nav button {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-main);
    pointer-events: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.gallery-nav button:hover {
    background: var(--white);
    transform: scale(1.1);
}

.gallery-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.thumbs-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    overflow-x: auto;
    background: #f8fafc;
}

.thumb-item {
    width: 100px;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    flex-shrink: 0;
}

.thumb-item.active {
    border-color: var(--primary);
}

.thumb-item:hover {
    opacity: 0.8;
}

/* Info Sections */
.info-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.info-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--background);
    padding-bottom: 10px;
}

.description-text {
    line-height: 1.8;
    color: #4b5563;
}

.specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 40px;
}

.spec-item-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.spec-item-row label {
    color: var(--text-muted);
    font-size: 14px;
}

.spec-item-row span {
    font-weight: 600;
    font-size: 14px;
}

/* Sidebar Price Card */
.sticky-sidebar {
    position: sticky;
    top: 100px;
}

.price-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.price-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-main);
}

.btn-fav {
    font-size: 24px;
    color: var(--text-muted);
}

.vehicle-title-desktop h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.vehicle-title-desktop p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 25px;
}

.quick-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
}

.q-spec {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    color: var(--text-main);
}

.q-spec i {
    color: var(--primary);
    font-size: 20px;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-primary-red {
    background: var(--primary);
    color: #fff;
    padding: 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
}

.btn-whatsapp {
    background: #25D366;
    color: #fff;
    padding: 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.seller-short {
    margin-top: 25px;
    font-size: 13px;
    text-align: center;
}

.seller-short strong {
    color: var(--primary-blue);
}

/* Similar Section */
.similar-section {
    margin-top: 40px;
}

.section-title {
    font-size: 24px;
    margin-bottom: 30px;
}

/* Responsive Details */
.detail-header-mobile {
    display: none;
}

@media (max-width: 1024px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-header-mobile {
        display: block;
        margin-bottom: 20px;
    }

    .vehicle-title-desktop {
        display: none;
    }
}

/* --- MOBILE RESPONSIVENESS --- */

.desktop-only {
    display: flex !important;
}

/* Mobile Drawers (Global) */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 82vw;
    max-width: 360px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-main);
    cursor: pointer;
}

.drawer-content {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-nav-links a i {
    font-size: 20px;
    color: var(--primary);
}

.mobile-nav-links a:active {
    background: #f8fafc;
}

.drawer-divider {
    height: 1px;
    background: #eee;
    margin: 20px 0;
}

/* Featured Ads & Plans */
.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.car-card.featured {
    border: 2px solid #f59e0b;
    transform: scale(1.02);
    box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.15);
}

.car-card.featured:hover {
    transform: scale(1.04);
}

/* Plan Selection Wizard */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.plan-card {
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    background: white;
}

.plan-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-5px);
}

.plan-card.active {
    border-color: var(--primary-red);
    background: #fffafa;
    box-shadow: 0 10px 25px -5px rgba(239, 68, 68, 0.1);
}

.plan-card i {
    font-size: 32px;
    margin-bottom: 15px;
    display: block;
    color: var(--text-light);
}

.plan-card.active i {
    color: var(--primary-red);
}

.plan-card h3 {
    margin: 0 0 10px;
    font-size: 18px;
}

.plan-card p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.plan-card .price {
    font-size: 24px;
    font-weight: 800;
    margin: 15px 0;
    color: var(--text-main);
}

.plan-card.featured-plan {
    border-color: #f59e0b;
}

.plan-card.featured-plan.active {
    background: #fffbeb;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.2);
}

@media (max-width: 768px) {
    .car-card.featured {
        transform: none;
    }
}

/* Header Adjustments */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }

    .nav {
        display: none;
    }

    /* Novo Header Mobile Minimalista (Estilo App) */
    .mobile-app-header {
        display: none;
        /* Default hidden */
        background: #fff;
        padding: 15px 20px;
        border-bottom: 1px solid #f0f0f0;
        position: sticky;
        top: 0;
        z-index: 1000;
        align-items: center;
        justify-content: center;
    }

    .mobile-app-header .btn-back {
        position: absolute;
        left: 20px;
        font-size: 24px;
        color: var(--text-main);
        background: none;
        border: none;
        cursor: pointer;
    }

    .mobile-app-header h2 {
        font-size: 18px;
        font-weight: 700;
        color: var(--text-main);
    }

    .header-content {
        padding: 10px 0;
        display: flex;
        justify-content: center;
        /* Center logo on mobile as per screenshot */
        position: relative;
    }

    .mobile-menu-toggle {
        position: absolute;
        right: 0;
        font-size: 26px;
        cursor: pointer;
    }

    .logo img {
        height: 42px;
        /* Increased for better prominence */
        width: auto;
        max-width: 100%;
        object-fit: contain;
        display: block;
    }

    .logo {
        display: flex;
        align-items: center;
        overflow: visible;
        /* Ensure no clipping */
    }

    /* Mostrar Header App apenas em páginas específicas */
    .app-style-page .header {
        display: none !important;
    }

    .app-style-page .mobile-app-header {
        display: flex;
    }
}

/* Home Page Mobile */
@media (max-width: 600px) {
    .search-widget {
        padding: 15px;
    }

    .search-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }

    .search-tab {
        font-size: 11px;
        padding: 10px 15px;
    }

    .search-input-wrapper input {
        font-size: 14px;
    }

    .search-row {
        flex-direction: column;
        gap: 15px;
    }

    .search-select {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-bottom: 15px;
    }

    .btn-main-search {
        width: 100%;
        padding: 18px;
    }

    .main-title {
        font-size: 22px;
    }

    .stores-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Inventory Page Mobile */
/* Barra Fixa Superior (Exibir, Ordenar, Filtrar) */
.mobile-filter-bar {
    display: flex;
    position: sticky;
    top: 56px;
    /* Altura do mobile-app-header */
    z-index: 900;
    background: #fff;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    justify-content: space-around;
    align-items: center;
}

.filter-action-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
}

.filter-action-item i {
    font-size: 18px;
    color: var(--text-main);
}

.filter-action-item.active {
    color: var(--primary);
}

.filter-action-item .badge-count {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    min-width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -2px;
    margin-top: -10px;
}

.results-header-info h1 {
    font-size: 20px;
}

.sort-wrapper {
    display: none;
}

/* Cards Estilo App (Webmotors Pattern) */
.ads-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
}

.ad-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid #f0f0f0;
}

.ad-image {
    height: 220px;
    position: relative;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges no Overlay */
.badge-360 {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.badge-price {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: var(--primary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.ad-info {
    padding: 15px;
}

.ad-main h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.ad-main p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.ad-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 0;
    border-top: 1px solid #f8f8f8;
    border-bottom: 1px solid #f8f8f8;
}

.meta-item {
    font-size: 12px;
    color: var(--text-main);
    font-weight: 500;
}

.ad-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ad-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-main);
}

.btn-card-cta {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.btn-finance {
    background: #f8fafc;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
}

/* Modal / Drawer Bottom Sheet */
.bottom-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 90vh;
    background: #fff;
    z-index: 2100;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
}

.bottom-drawer.active {
    bottom: 0;
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.drawer-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.btn-drawer-clear {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
}

/* List Mode Styles (Mobile) */
.ads-grid.list-mode {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 0;
}

.ads-grid.list-mode .ad-card {
    flex-direction: row;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: none;
    height: 140px;
}

.ads-grid.list-mode .ad-image {
    width: 40%;
    height: 100%;
    min-width: 140px;
}

.ads-grid.list-mode .ad-info {
    width: 60%;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ads-grid.list-mode .ad-main h3 {
    font-size: 14px;
    margin-bottom: 2px;
}

.ads-grid.list-mode .ad-meta {
    padding: 4px 0;
    margin: 0;
    border: none;
    gap: 8px;
}

.ads-grid.list-mode .ad-price {
    font-size: 18px;
}

.ads-grid.list-mode .card-actions,
.ads-grid.list-mode .badge-360 {
    display: none;
}

.ads-grid.list-mode .badge-price {
    bottom: 5px;
    left: 5px;
    padding: 2px 6px;
    font-size: 8px;
}

.btn-drawer-apply {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-weight: 700;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-mobile-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--text-main);
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    border: none;
}

.btn-mobile-filter span {
    background: var(--primary);
    color: #fff;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 601px) and (max-width: 1200px) {
    .ads-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Auth Modal Premium */
.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    display: flex;
    opacity: 1;
}

.auth-modal {
    background: #fff;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.auth-overlay.active .auth-modal {
    transform: translateY(0);
}

.auth-header {
    padding: 30px 30px 10px;
    text-align: center;
}

.auth-tabs {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 25px;
    border-bottom: 1px solid #f0f0f0;
    padding: 0 30px;
}

.auth-tab {
    padding: 12px 0;
    font-weight: 700;
    font-size: 16px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-content {
    padding: 0 30px 30px;
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 15px;
}

.auth-form.active {
    display: flex;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.input-group input {
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.1);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #f0f0f0;
}

.auth-divider span {
    padding: 0 10px;
}

.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-google:hover {
    background: #f8fafc;
}

.auth-footer {
    padding: 20px 30px;
    background: #f8fafc;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
}

/* User Profile Dropdown */
.user-menu-container {
    position: relative;
    display: none;
}

.user-menu-container.active {
    display: flex;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: 0.2s;
}

.user-trigger:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    width: 220px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f0f0;
    padding: 8px;
    display: none;
    z-index: 2000;
}

.user-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }

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

.dropdown-user-info {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.dropdown-user-info p {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-main);
}

.dropdown-user-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    border-radius: 8px;
    transition: 0.2s;
    cursor: pointer;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary);
}

.dropdown-item.logout {
    color: #dc2626;
}

.dropdown-item i {
    font-size: 18px;
}

/* Auth Loading State */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-top: -10px;
    margin-left: -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Mobile Adjustments for Auth */
@media (max-width: 600px) {
    .auth-modal {
        max-width: 100%;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        position: absolute;
        bottom: 0;
    }

    .auth-overlay {
        padding: 0;
        align-items: flex-end;
    }
}

.btn-toggle-fav.active {
    color: var(--primary);
    transform: scale(1.1);
}

.card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.btn-outline-fav {
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 6px;
    width: 100%;
    font-weight: 600;
    gap: 10px;
    font-size: 14px;
    color: var(--text-main);
}

.btn-outline-fav.active {
    background: #fff5f5;
    border-color: var(--primary);
}

/* Header Badge */
.fav-count-badge {
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 3px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-main);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Header Active Link */
.action-item.active {
    color: var(--primary);
}

.mobile-nav-links a.active {
    background: #fff5f5;
    color: var(--primary);
}

/* --- FINAL POLISH & QA --- */

html {
    scroll-behavior: smooth;
}

/* Image object-fit safety */
img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.ad-image img {
    aspect-ratio: 4 / 3;
    width: 100%;
}

/* Mobile Tweak: Prevent small text truncation */
.ad-title {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-version {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 1.2em;
}

/* Fix mobile spacing on categories */
@media (max-width: 480px) {
    .categories-grid {
        gap: 10px;
    }

    .cat-card {
        height: 100px;
    }

    .cat-card span {
        font-size: 12px;
    }

    .main-title {
        font-size: 18px;
    }
}

/* Ensure empty states look good on all screens */
.empty-state {
    padding: 60px 20px;
    text-align: center;
    width: 100%;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: block;
}

/* Header shadow refinement */
.header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-btn:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.lang-btn.active {
    color: var(--primary);
    background: #fff5f5;
}

.lang-divider {
    color: #e2e8f0;
    font-size: 12px;
}

.mobile-only.lang-switcher {
    gap: 15px;
}

.mobile-only .lang-btn {
    font-size: 14px;
    padding: 8px 15px;
    border: 1px solid #e2e8f0;
}

.mobile-only .lang-btn.active {
    border-color: var(--primary);
}

/* ============================================================
   MOBILE APP-LIKE REFACTOR (PREMIUM EXPERIENCE)
   ============================================================ */

@media (max-width: 1024px) {
    body {
        padding-bottom: 80px;
        /* Space for Bottom Nav */
    }

    /* 1. Bottom Navigation */
    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 72px;
        background: #ffffff;
        display: flex;
        justify-content: space-around;
        align-items: center;
        border-top: 1px solid #f1f5f9;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.05);
        z-index: 1000;
        padding-bottom: env(safe-area-inset-bottom);
    }

    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        text-decoration: none;
        color: #64748b;
        font-size: 11px;
        font-weight: 600;
        transition: color 0.2s;
    }

    .bottom-nav-item i {
        font-size: 24px;
    }

    .bottom-nav-item.active {
        color: var(--primary);
    }

    /* 2. Mobile Header Superior */
    .header {
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(8px);
        z-index: 999;
    }

    /* 3. Premium Mobile Cards */
    .ad-card {
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: 1px solid #f1f5f9;
    }

    .ad-image {
        height: 220px;
    }

    .ad-image .badge-premium {
        position: absolute;
        top: 12px;
        left: 12px;
        background: #22c55e;
        color: #fff;
        padding: 4px 10px;
        border-radius: 4px;
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 2;
    }

    .card-fav-btn {
        width: 36px;
        height: 36px;
        background: #ffffff !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .ad-info {
        padding: 16px;
    }

    .ad-title {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .ad-price {
        font-size: 22px;
        font-weight: 800;
        color: var(--text-main);
        margin: 12px 0;
    }

    .ad-meta {
        background: #f8fafc;
        padding: 8px 12px;
        border-radius: 8px;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        font-size: 12px;
        color: #64748b;
    }

    .btn-installments {
        margin-top: 15px;
        background: #f1f5f9;
        color: var(--text-main);
        font-weight: 700;
        border-radius: 8px;
        height: 48px;
    }

    /* 4. Drawer de Filtros (App Style) */
    .filters-sidebar {
        border-radius: 20px 20px 0 0 !important;
        height: 90% !important;
        top: auto !important;
        bottom: -100%;
        left: 0 !important;
        width: 100% !important;
        transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .filters-sidebar.active {
        bottom: 0 !important;
    }

    .sidebar-footer {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 20px;
        background: #fff;
        border-top: 1px solid #f1f5f9;
        display: flex;
        gap: 12px;
    }

    .btn-apply-filters {
        flex: 2;
        background: var(--primary);
        color: #fff;
        border: none;
        padding: 15px;
        border-radius: 8px;
        font-weight: 700;
    }

    .btn-clear-filters {
        flex: 1;
        background: #f1f5f9;
        color: var(--text-main);
        border: none;
        padding: 15px;
        border-radius: 8px;
        font-weight: 700;
    }

    /* 5. Inventory Mobile Bar (Fixed) */
    .mobile-filter-bar {
        position: sticky;
        top: 60px;
        background: #fff;
        z-index: 998;
        padding: 12px 16px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .filter-trigger {
        flex: 1;
        background: #fff;
        border: 1px solid #e2e8f0;
        padding: 10px;
        border-radius: 8px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    #sort-select-mobile {
        background: #f8fafc;
        border: none;
        padding: 10px 15px;
        border-radius: 8px;
        font-weight: 700;
        font-size: 14px;
        color: var(--text-main);
    }
}

/* Hide drawer-only elements on desktop */
@media (min-width: 1025px) {

    .bottom-nav,
    .mobile-filter-bar {
        display: none !important;
    }
}

/* 
   ============================================================
   MOBILE BANNER & HERO REFINEMENT
   ============================================================ 
*/
@media (max-width: 768px) {
    .header {
        height: auto !important;
        padding-top: env(safe-area-inset-top, 15px) !important;
        padding-bottom: 10px !important;
    }

    .hero-new {
        background-image: url('../assets/banners/bannermobile.jpeg') !important;
        background-size: cover !important;
        background-position: center top !important;
        background-repeat: no-repeat !important;
        min-height: 520px !important;
        height: auto !important;
        position: relative !important;
        padding-bottom: 180px !important;
        display: block !important;
    }

    .carousel-item {
        display: none !important;
    }

    .search-overlay,
    .search-widget,
    .hero-search-card {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: -90px !important;
        /* Ajuste fino para sobreposição premium */
        top: auto !important;
        width: calc(100% - 32px) !important;
        max-width: 420px !important;
        margin-top: 0 !important;
        z-index: 20 !important;
    }

    .search-overlay {
        background: transparent !important;
        box-shadow: none !important;
    }
}

/* Sell Flow (Wizard) */
.sell-container {
    padding: 40px 20px;
    background: #f8fafc;
    min-height: 100vh;
}

.sell-wizard-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.sell-wizard-header {
    text-align: center;
    margin-bottom: 40px;
}

.sell-wizard-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-main);
}

.sell-wizard-header p {
    color: var(--text-muted);
}

.wizard-progress {
    margin-top: 30px;
    position: relative;
}

.progress-bar {
    height: 4px;
    background: #f0f0f0;
    border-radius: 10px;
    position: relative;
    margin-bottom: -15px;
    top: 15px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.step-item {
    width: 34px;
    height: 34px;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-muted);
    transition: 0.3s;
    z-index: 1;
}

.step-item.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.step-item.completed {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.wizard-step.active {
    display: block;
}

.wizard-step h2 {
    font-size: 20px;
    margin-bottom: 25px;
    border-left: 4px solid var(--primary);
    padding-left: 15px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.price-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
}

.price-input-wrapper span {
    padding: 0 15px;
    font-weight: 700;
    color: var(--text-muted);
    border-right: 1px solid #e2e8f0;
}

.price-input-wrapper input {
    border: none;
    background: transparent;
    padding: 14px;
    flex: 1;
}

.photo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-dropzone {
    border: 2px dashed #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: 0.2s;
    background: #f8fafc;
}

.upload-dropzone:hover {
    border-color: var(--primary);
    background: rgba(185, 28, 28, 0.02);
}

.upload-dropzone i {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 15px;
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.photo-preview-item {
    aspect-ratio: 1;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    position: relative;
    border: 2px solid transparent;
}

.photo-preview-item.is-main {
    border-color: var(--primary);
}

.photo-preview-item.is-main::after {
    content: "CAPA";
    position: absolute;
    top: 5px;
    left: 5px;
    background: var(--primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.photo-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #ef4444;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.review-card {
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
}

.review-header {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8fafc;
}

.review-main-img {
    width: 120px;
    height: 90px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: #ddd;
}

.review-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-top: 5px;
}

.review-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 20px;
}

.review-item label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.review-item span {
    font-weight: 600;
    color: var(--text-main);
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Mobile Adjustments for Sell */
@media (max-width: 600px) {
    .sell-container {
        padding: 0;
        background: #fff;
    }

    .sell-wizard-wrapper {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .wizard-actions {
        position: fixed;
        bottom: 70px;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 15px 20px;
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.05);
        margin-top: 0;
        z-index: 100;
    }

    .sell-page-body {
        padding-bottom: 150px;
    }
}

/* --- DEALER PUBLIC & PREMIUM STYLES --- */
.dealer-badge-mini {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #fff;
    color: #3b82f6;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 5;
    border: 1px solid #e2e8f0;
}

.seller-premium-info {
    padding: 15px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 20px;
}

.seller-logo-small {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.seller-logo-small i {
    font-size: 24px;
    color: #cbd5e1;
}

.btn-text-red {
    color: var(--primary-red);
    font-size: 14px;
    transition: opacity 0.2s;
}

.btn-text-red:hover {
    opacity: 0.8;
}

.seller-card-premium {
    margin-top: 15px;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

/* --- DEALER ANALYTICS DASHBOARD --- */
.period-pills {
    display: flex;
    gap: 8px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 100px;
}

.period-pills .pill {
    padding: 6px 16px;
    border-radius: 100px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.period-pills .pill.active {
    background: white;
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ranking-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ranking-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-info {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.ranking-title {
    font-weight: 700;
    color: var(--text-main);
}

.ranking-count {
    color: #64748b;
    font-weight: 600;
}

.ranking-bar-bg {
    height: 8px;
    background: #f1f5f9;
    border-radius: 100px;
    overflow: hidden;
}

.ranking-bar-fill {
    height: 100%;
    background: var(--primary-red);
    border-radius: 100px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- COMPARE BAR PREMIUM --- */
.compare-bar {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 15px 25px;
}

.compare-bar.active {
    bottom: 0;
}

.compare-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.compare-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compare-count {
    background: var(--primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.compare-info span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

.compare-thumbnails {
    display: flex;
    gap: 10px;
    flex: 1;
}

.compare-thumb {
    width: 45px;
    height: 35px;
    border-radius: 4px;
    background-size: cover;
    background-position: center;
    border: 1px solid #e2e8f0;
    animation: thumbEnter 0.3s ease-out;
}

@keyframes thumbEnter {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.compare-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-clear-compare {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    transition: color 0.2s;
}

.btn-clear-compare:hover {
    color: var(--primary);
}

.btn-compare-go {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-compare-go:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(238, 28, 36, 0.3);
}

/* Card Actions Update */
.card-actions-top {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.btn-compare {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.btn-compare:hover {
    background: white;
    color: var(--primary-blue);
    transform: scale(1.1);
}

.btn-compare.active {
    background: var(--primary-blue);
    color: white;
}

/* Comparar Page Styles */
.compare-container {
    padding: 40px 0;
}

.compare-grid {
    display: grid;
    grid-template-columns: 200px repeat(auto-fill, minmax(250px, 1fr));
    gap: 0;
    background: white;
    border-radius: 16px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

.compare-row {
    display: contents;
}

.compare-label {
    padding: 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 14px;
}

.compare-value {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #f1f5f9;
    text-align: center;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.compare-header-cell {
    background: white;
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #e2e8f0;
    border-left: 1px solid #f1f5f9;
    position: relative;
}

.compare-remove-item {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s;
}

.compare-remove-item:hover {
    background: #fee2e2;
    color: #ef4444;
}

.compare-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.compare-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 5px;
}

.compare-price-val {
    color: var(--primary);
    font-weight: 800;
    font-size: 16px;
}

@media (max-width: 1024px) {
    .compare-bar {
        width: 100%;
        border-radius: 16px 16px 0 0;
        padding: 12px 20px;
    }
    
    .compare-thumbnails {
        display: none;
    }
}

/* Comparador - Detalhes */
.detail-actions-top {
    display: flex;
    gap: 12px;
}

.detail-actions-top .btn-compare,
.detail-actions-top .btn-toggle-fav {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.detail-actions-top .btn-compare.active {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.detail-actions-top .btn-toggle-fav.active {
    background: #FFEDEF;
    border-color: #FFC1C8;
    color: var(--primary-red);
}

.detail-actions-top .btn-compare:hover,
.detail-actions-top .btn-toggle-fav:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.1);
}