/* Modern Car Dealership Styling */

/* Color Variables */
:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --secondary-color: #34a853;
    --accent-color: #ea4335;
    --dark-gray: #202124;
    --medium-gray: #5f6368;
    --light-gray: #f1f3f4;
    --border-color: #dadce0;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15);
    --shadow-md: 0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15);
    --shadow-lg: 0 2px 6px 2px rgba(60,64,67,.15), 0 8px 16px 4px rgba(60,64,67,.15);
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--white);
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 16px;
}

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

a:hover {
    color: var(--primary-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo a {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav a {
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.nav a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.header-icons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.icon-link {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: var(--white);
    color: var(--dark-gray);
}

.icon-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.icon-link.whatsapp:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-login, .btn-logout {
    padding: 8px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 500;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    transition: all 0.3s ease;
}

.btn-login:hover, .btn-logout:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    color: var(--white);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.mobile-menu-toggle span {
    width: 32px;
    height: 3px;
    background-color: var(--dark-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: 1px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 32px;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Sections */
.catalog-preview,
.reviews-preview {
    padding: 80px 0;
    background-color: var(--white);
}

.catalog-preview:nth-child(even) {
    background-color: var(--light-gray);
}

.catalog-preview h2,
.reviews-preview h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
    color: var(--dark-gray);
}

.catalog-preview h2::after,
.reviews-preview h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 16px auto 0;
    border-radius: 2px;
}

/* Vehicle Grid */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.vehicle-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.vehicle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.vehicle-card img,
.no-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e8eaed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    font-size: 14px;
}

.vehicle-card h3 {
    padding: 20px 20px 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-gray);
}

.vehicle-info {
    padding: 0 20px 12px;
    color: var(--medium-gray);
    font-size: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.vehicle-info span {
    background-color: var(--light-gray);
    padding: 4px 12px;
    border-radius: 16px;
    font-weight: 500;
}

.vehicle-price {
    padding: 12px 20px;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    border-top: 1px solid var(--border-color);
    background-color: var(--light-gray);
}

.vehicle-actions {
    padding: 16px;
    display: flex;
    gap: 12px;
}

.btn-favorite,
.btn-view {
    flex: 1;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-favorite {
    background-color: var(--accent-color);
    color: var(--white);
    border: none;
    cursor: pointer;
}

.btn-favorite:hover {
    background-color: #d33b2c;
    transform: scale(1.05);
}

.btn-view {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
}

.btn-view:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* Reviews */
.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 48px;
}

.review-card {
    background-color: var(--white);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.review-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.review-rating {
    font-size: 20px;
    margin-bottom: 12px;
    color: #fbbc04;
}

.review-comment {
    font-size: 15px;
    line-height: 1.6;
    color: var(--dark-gray);
    margin-bottom: 16px;
    font-style: italic;
}

.review-author {
    font-size: 14px;
    font-weight: 600;
    color: var(--medium-gray);
}

/* Contact Section */
.contact-quick {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 0;
    margin: 0;
}

.contact-box {
    text-align: center;
    color: var(--white);
}

.contact-box h2 {
    font-size: 36px;
    margin-bottom: 24px;
}

.contact-info {
    margin: 32px 0;
    font-size: 18px;
}

.contact-info p {
    margin: 12px 0;
}

.contact-info a {
    color: var(--white);
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 64px 0 32px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--white);
    position: relative;
    padding-bottom: 12px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 14px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.75);
    transition: all 0.3s ease;
    font-size: 15px;
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 4px;
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-bottom p {
    margin: 0;
}

/* Filters */
.filters {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(26, 115, 232, 0.1);
}

.filters-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-title::before {
    content: "🔍";
    font-size: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

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

.filter-group label {
    font-size: 13px;
    font-weight: 600;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--primary-color);
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-wrapper:hover::after {
    color: #0d5bbd;
}

.select-wrapper select {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 18px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dadce0;
    border-radius: 12px;
    color: var(--dark-gray);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.select-wrapper select:hover {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom, #ffffff 0%, #f1f3f4 100%);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.select-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12), 0 2px 8px rgba(26, 115, 232, 0.2);
    background: #ffffff;
    transform: translateY(0);
}

/* Input Wrapper */
.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 52px;
    padding: 0 40px 0 18px;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #dadce0;
    border-radius: 12px;
    color: var(--dark-gray);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.input-wrapper input::placeholder {
    color: #9aa0a6;
    font-weight: 400;
}

.input-wrapper input:hover {
    border-color: var(--primary-color);
    background: linear-gradient(to bottom, #ffffff 0%, #f1f3f4 100%);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.12), 0 2px 8px rgba(26, 115, 232, 0.2);
    background: #ffffff;
    transform: translateY(0);
}

.input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-color);
    pointer-events: none;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e8eaed;
}

.btn-filter,
.btn-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 52px;
    height: 52px;
    padding: 0 32px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    line-height: 1;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    vertical-align: top;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.btn-filter {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d5bbd 100%);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(26, 115, 232, 0.35);
    border: 2px solid var(--primary-color);
}

.btn-filter:hover {
    background: linear-gradient(135deg, #0d5bbd 0%, #0a4a9c 100%);
    box-shadow: 0 5px 15px rgba(26, 115, 232, 0.45);
    transform: translateY(-2px);
}

.btn-filter:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.btn-reset {
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
    color: #5f6368;
    border: 2px solid #dadce0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-reset:hover {
    background: linear-gradient(to bottom, #f8f9fa 0%, #f1f3f4 100%);
    border-color: #bdc1c6;
    color: var(--dark-gray);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.btn-reset:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-filter svg,
.btn-reset svg {
    flex-shrink: 0;
    display: block;
    width: 18px;
    height: 18px;
}

/* Forms */
.auth-form,
.contact-box form {
    max-width: 500px;
    margin: 64px auto;
    padding: 40px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--dark-gray);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Form Submit Buttons */
.form-group button[type="submit"],
form button[type="submit"],
.auth-form button,
.contact-box button {
    width: 100%;
    padding: 16px 32px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.form-group button[type="submit"]:hover,
form button[type="submit"]:hover,
.auth-form button:hover,
.contact-box button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--medium-gray);
}

.auth-link a {
    color: var(--primary-color);
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert-error {
    background-color: #fce8e6;
    color: #c5221f;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #e6f4ea;
    color: #137333;
    border: 1px solid #34a853;
}

/* Utility Classes */
.text-center {
    text-align: center;
    margin-top: 32px;
}

/* Page Headings */
main h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 48px 0 32px;
    color: var(--dark-gray);
    position: relative;
    padding-bottom: 16px;
}

main h1::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Page Container */
main > .container {
    padding-top: 24px;
    padding-bottom: 24px;
}

/* Vehicle Detail Page */
.vehicle-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin: 48px 0;
}

.vehicle-gallery {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 16px;
}

.no-image-large {
    width: 100%;
    height: 450px;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e8eaed 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--medium-gray);
    font-size: 18px;
    margin-bottom: 16px;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.thumb:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.vehicle-videos h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.vehicle-videos video {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.vehicle-info-detail h1 {
    font-size: 32px;
    margin: 0 0 16px 0;
}

.vehicle-price-large {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.vehicle-specs {
    background-color: var(--light-gray);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
}

.spec {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.spec:last-child {
    border-bottom: none;
}

.spec strong {
    color: var(--dark-gray);
    margin-right: 8px;
}

.vehicle-description,
.vehicle-options {
    margin-bottom: 32px;
}

.vehicle-description h3,
.vehicle-options h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--dark-gray);
}

.vehicle-description p,
.vehicle-options p {
    line-height: 1.8;
    color: var(--medium-gray);
}

.vehicle-actions-detail {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-favorite-large,
.btn-contact-whatsapp {
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-favorite-large {
    background-color: var(--accent-color);
    color: var(--white);
}

.btn-favorite-large:hover {
    background-color: #d33b2c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-contact-whatsapp {
    background-color: var(--secondary-color);
    color: var(--white);
    display: block;
}

.btn-contact-whatsapp:hover {
    background-color: #2d8e47;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .logo {
        order: 1;
    }

    .nav {
        display: none;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        order: 3;
        margin-top: 16px;
    }

    .nav.active {
        display: flex;
    }

    .nav a {
        text-align: center;
        padding: 14px 16px;
        background-color: var(--light-gray);
        border-radius: 8px;
        font-weight: 600;
        border: 2px solid transparent;
    }

    .nav a:hover,
    .nav a:active {
        background-color: var(--primary-color);
        color: var(--white);
        border-color: var(--primary-dark);
    }

    .header-icons {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 8px;
        order: 4;
    }

    .header-icons.active {
        display: flex;
    }

    .icon-link,
    .btn-login,
    .btn-logout {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .catalog-preview h2,
    .reviews-preview h2 {
        font-size: 28px;
    }

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

    .filter-row {
        grid-template-columns: 1fr;
    }

    .filters {
        padding: 24px 20px;
    }

    .filters-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .filter-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-filter,
    .btn-reset {
        width: 100%;
        justify-content: center;
    }

    .catalog-preview,
    .reviews-preview {
        padding: 48px 0;
    }

    main h1 {
        font-size: 28px;
        margin: 32px 0 24px;
    }

    .vehicle-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Larger gallery thumbnails for mobile touch */
    .gallery-thumbs {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .thumb {
        height: 100px;
        border: 3px solid var(--border-color);
    }

    .thumb:active {
        border-color: var(--primary-color);
        transform: scale(0.95);
    }

    /* Ensure all buttons and inputs have minimum touch targets (48px) */
    .btn-favorite, .btn-view, .btn-favorite-large {
        min-height: 48px;
        padding: 12px 24px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    input[type="number"],
    select,
    textarea {
        min-height: 48px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    button[type="submit"],
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
        font-size: 16px;
    }

    .vehicle-gallery {
        position: relative;
        top: 0;
    }

    .main-image,
    .no-image-large {
        height: 300px;
    }

    .auth-form,
    .contact-box form {
        padding: 32px 24px;
        margin: 32px 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 48px 0;
    }

    .hero-content h1 {
        font-size: 24px;
    }

    .hero-content p {
        font-size: 14px;
    }

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

    .contact-box h2 {
        font-size: 28px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vehicle-card,
.review-card {
    animation: fadeIn 0.5s ease-out;
}
