@media (max-width: 1200px) {
    .container {
        padding: 0 20px 70px 20px;
    }

    .grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

.hamburger-backdrop {
    display: none;
}


@media (max-width: 900px) {
    .filter-bar {
        position: relative;
        top: auto;
    }

    .fade-overlay {
        height: 120px;
    }

    .dropdown-content {
        max-height: 280px;
    }
}

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

    .filter-bar {
        display: none !important;
        margin-bottom: 30px;
        position: relative;
    }

    .dropdown-content {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%) !important;
        max-width: 90%;
        max-height: 60vh;
        z-index: 9999;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    }

    .hamburger-menu-panel {
        max-height: 80vh;
    }

    .login-modal-box {
        width: 95%;
    }

    .modal-content {
        max-height: 100vh;
    }

    .tabs-content {
        max-height: calc(100vh - 400px);
    }

    .header-inner {
        padding: 12px 16px;
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: 12px;
        align-items: center;
    }

    .header-logo {
        grid-column: 1;
    }

    .header-logo img {
        height: 32px;
    }

    .header-actions {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .btn-header-login {
        width: 100%;
        max-width: 300px;
        padding: 10px 16px;
        font-size: 14px;
        justify-content: center;
        background: var(--text-main);
        color: white;
        border-radius: 8px;
    }

    .btn-header-login span {
        display: inline;
    }

    .mobile-menu-toggle {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 640px) {
    .grid {
        gap: 20px;
    }

    .guest-card-info {
        padding: 18px;
        gap: 16px;
    }

    .guest-card-footer-row {
        padding-top: 16px;
    }

    .filter-grid {
        gap: 6px;
    }

    .filter-btn {
        padding: 7px 10px;
        font-size: 12px;
    }

    #filterMarca {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
    }

    .filter-btn.has-logo {
        height: 55px;
    }

    .brand-logo-filter {
        max-height: 40px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px 50px 12px;
    }

    .filter-bar {
        padding: 10px;
        gap: 10px;
        border-radius: 12px;
    }

    .search-group input {
        padding: 10px 10px 10px 38px;
        font-size: 13px;
    }

    .filter-dropbtn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .price-range-container {
        min-width: 180px;
        padding: 0 8px;
    }

    .price-values {
        font-size: 11px;
    }

    .client-type-filter-btn {
        padding: 5px 10px;
        font-size: 11px;
    }

    .guest-card {
        border-radius: 20px;
    }

    .guest-card-img-wrapper {
        height: 180px;
    }

    .guest-card-info {
        padding: 16px;
        gap: 14px;
    }

    .guest-card-brand-logo {
        width: 36px;
        height: 36px;
    }

    .guest-card-specs-row {
        gap: 8px;
    }

    .spec-pill {
        font-size: 10px;
        padding: 4px 8px;
    }

    .badge-offer {
        font-size: 10px;
        padding: 3px 10px;
        top: 12px;
        left: 12px;
    }

    .dropdown-content {
        max-width: 95%;
        padding: 12px;
    }

    #filterMarca {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 6px;
    }

    .filter-btn.has-logo {
        height: 50px;
    }

    #btnLoadMore {
        padding: 10px 24px;
        font-size: 14px;
    }

    .login-modal-body {
        padding: 20px;
    }

    .login-modal-title {
        font-size: 16px;
    }

    .login-input-group input {
        padding: 8px 14px 8px 36px;
        font-size: 13px;
    }

    .login-btn-confirm {
        padding: 8px 20px;
        font-size: 14px;
    }
}

@media (max-width: 375px) {
    .hero h1 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .guest-card-model {
        font-size: 1.1rem;
    }

    .guest-card-version {
        font-size: 0.8rem;
    }

    .price-main {
        font-size: 1.3rem;
    }

    .btn-showroom-action {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .filter-bar {
        padding: 8px;
    }

    .search-group input {
        font-size: 12px;
    }

    .modal-left {
        height: 160px;
    }

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

    .config-section {
        margin-bottom: 18px;
    }

    .config-label {
        font-size: 10px;
    }

    .btn-option {
        padding: 6px 8px;
        font-size: 11px;
        min-width: 60px;
    }
}

@media (max-width: 320px) {
    .container {
        padding: 0 10px 40px 10px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .filter-bar {
        padding: 6px;
        gap: 8px;
    }

    .guest-card-img-wrapper {
        height: 160px;
    }

    .guest-card-info {
        padding: 14px;
    }

    .guest-card-model {
        font-size: 1rem;
    }

    .price-main {
        font-size: 1.2rem;
    }

    .spec-pill {
        font-size: 9px;
        padding: 3px 6px;
    }
}

@media (hover: none) and (pointer: coarse) {

    .card:hover,
    .guest-card:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    }

    .guest-card:active {
        transform: scale(0.98);
    }

    .filter-btn:hover,
    .btn-option:hover,
    .filter-dropbtn:hover {
        background: inherit;
        border-color: inherit;
    }

    .filter-btn:active,
    .btn-option:active {
        transform: scale(0.95);
    }

    button,
    a,
    .clickable {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

@media (orientation: landscape) and (max-height: 600px) {
    .modal-content {
        height: auto;
        max-height: 100vh;
        overflow-y: auto;
    }

    .modal-left {
        height: 150px;
    }

    .preventivo-content {
        height: 95vh;
    }

    .hero {
        padding: 40px 0 30px 0;
    }

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

    .hero p {
        font-size: 1rem;
    }
}