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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

:root {
    /* Dark Theme Colors */
    --primary: #667eea;
    --secondary: #764ba2;
    --accent: #f093fb;
    --dark: #1a1a2e;
    --darker: #0f0f1e;
    --light: #2d2d44;
    --lighter: #3a3a52;
    --text: #e0e0e0;
    --text-secondary: #b0b0b0;
    --border: #404060;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --bg: #0f0f1e;
    --card-bg: #1a1a2e;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    /* Layer 1: overlay (full area). Layer 2: full image — use contain, not cover, so nothing is cropped */
    background-image:
        linear-gradient(180deg, rgba(15, 15, 30, 0.78) 0%, rgba(15, 15, 30, 0.95) 100%),
        url('../images/julian-auto-sales-nm-bg.png');
    background-size: cover, contain;
    background-position: center top, center top;
    /* Scroll with page so the full image can be seen; fixed + cover was hiding most of the image */
    background-attachment: scroll;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 20px 0 10px 0;
    font-weight: 600;
    color: var(--text);
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.5em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: rgba(102, 126, 234, 0.2);
}

a,
button,
.btn,
[role='button'] {
    touch-action: manipulation;
}

a:hover {
    color: var(--accent);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

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

.btn-secondary:hover {
    background-color: #f073e0;
}

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

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

.btn-small {
    padding: 8px 16px;
    font-size: 14px;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section */
.section {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    font-size: 2.5em;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1em;
    color: var(--text-secondary);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    background-color: var(--lighter);
    color: var(--text);
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    background-color: var(--light);
}

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

/* Grid */
.grid {
    display: grid;
    gap: 20px;
}

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

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

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

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.3em;
    margin-bottom: 10px;
    color: var(--text);
}

.card-text {
    color: var(--text-secondary);
    margin-bottom: 15px;
    font-size: 0.95em;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(39, 174, 96, 0.5);
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 1.5em;
    }

    .section {
        padding: 36px 16px;
    }

    .section-title {
        margin-bottom: 28px;
    }

    .section-title h2 {
        font-size: 1.65em;
        line-height: 1.2;
    }

    .container {
        padding: 0 16px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    /* Prevent iOS zoom on focus (keep inputs at least 16px) */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
    }

    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .btn-small {
        min-height: 40px;
        padding: 10px 16px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.p-20 {
    padding: 20px;
}

.hidden {
    display: none;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Add this to style.css */

.filter-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 40px;
    margin-top: 30px;
}

.filter-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #333;
}

.filter-dropdowns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    align-items: flex-end;
}

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

.filter-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 0.95rem;
}

.filter-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    color: #1a1a2e;
    cursor: pointer;
    transition: border-color 0.3s;
}

.filter-select:hover {
    border-color: #667eea;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-select:disabled {
    background-color: #e9ecef;
    color: #1a1a2e;
    cursor: not-allowed;
    opacity: 1;
}

#apply-filters,
#reset-filters {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#apply-filters {
    background-color: #667eea;
    color: white;
}

#apply-filters:hover {
    background-color: #5568d3;
}

#reset-filters {
    background-color: #6c757d;
    color: white;
}

#reset-filters:hover {
    background-color: #5a6268;
}

/* Responsive */
@media (max-width: 768px) {
    .filter-dropdowns {
        grid-template-columns: 1fr;
    }

    #apply-filters,
    #reset-filters {
        width: 100%;
    }
}
.hero {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    padding: 96px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(120deg, rgba(8, 12, 24, 0.9) 0%, rgba(21, 35, 62, 0.85) 60%, rgba(25, 50, 90, 0.8) 100%),
        radial-gradient(circle at 15% 20%, rgba(102, 126, 234, 0.3), transparent 45%),
        radial-gradient(circle at 85% 30%, rgba(118, 75, 162, 0.25), transparent 40%),
        linear-gradient(135deg, #0b1220 0%, #1b2b4c 100%);
    background-size: 100% 100%, 180% 180%, 180% 180%, 100% 100%;
    animation: heroShimmer 16s ease-in-out infinite alternate;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.45));
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 980px;
    width: 100%;
}

.hero-content-split {
    max-width: 1180px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 28px;
    align-items: center;
}

.hero-main {
    text-align: left;
}

.hero-kicker {
    display: inline-block;
    margin-bottom: 12px;
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
}

.hero-content h1 {
    margin: 6px 0 16px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.1;
    color: #fff;
    font-weight: 700;
}

.hero-content p {
    margin: 0;
    max-width: 700px;
    font-size: clamp(1rem, 2.1vw, 1.2rem);
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.hero-outline-btn {
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.hero-outline-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.hero-highlights {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.hero-highlights span {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
}

.hero-review-snippet {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    align-items: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.92rem;
}

.hero-stars {
    letter-spacing: 0.08em;
    color: #fbbf24;
    font-weight: 700;
}

.hero-quick-search {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(2px);
}

.hero-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-search-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 600;
}

.hero-search-field input,
.hero-search-field select {
    width: 100%;
    height: 44px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.95rem;
}

.hero-search-field input::placeholder {
    color: rgba(255, 255, 255, 0.62);
}

.hero-search-field select option {
    color: #111827;
}

.hero-search-actions {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-inline-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-inline-link:hover {
    color: #fff;
}

.hero-side {
    display: grid;
    gap: 12px;
}

.hero-feature-card {
    border-radius: 14px;
    overflow: hidden;
    background: rgba(12, 18, 34, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35);
}

.hero-feature-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.hero-feature-body {
    padding: 14px;
}

.hero-feature-tag {
    margin: 0 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9cc0ff;
}

.hero-feature-body h3 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
}

.hero-feature-body p {
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.84);
}

.hero-feature-footer {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.hero-feature-footer strong {
    color: #fff;
    font-size: 1.05rem;
}

.hero-payment-pill {
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #fff;
}

.hero-payment-pill span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
}

.hero-payment-pill strong {
    font-size: 1.02rem;
}

.hero-payment-pill a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.mobile-call-cta {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 1200;
    padding: 12px 16px;
    border-radius: 10px;
    text-align: center;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

@keyframes heroShimmer {
    0% {
        background-position: 0 0, 0% 0%, 100% 10%, 0 0;
    }
    100% {
        background-position: 0 0, 12% 18%, 85% 28%, 0 0;
    }
}
.browse-section {
    margin-top: 40px;
}

.browse-section h2 {
    margin-bottom: 30px;
}

.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.car-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.car-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.car-image {
    position: relative;
    overflow: hidden;
    height: 250px;
}

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

.badge-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-available {
    background-color: var(--success);
    color: white;
}

.badge-sold {
    background-color: var(--danger);
    color: white;
}

.car-info {
    padding: 20px;
}

.car-brand {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 8px;
}

.car-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.car-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.car-price {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary);
}

/* Browse cars page: sidebar + grid (stack on small screens) */
.cars-page-layout {
    display: grid;
    grid-template-columns: minmax(220px, 260px) 1fr;
    gap: 24px;
    align-items: start;
}

/* Pagination (home + similar) */
.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
    padding: 0 4px 16px;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--lighter);
    color: var(--text);
    border: 1px solid var(--border);
    font-weight: 500;
    text-decoration: none;
}

.pagination .page-link:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .page-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
}

/* ——— Mobile & small tablets ——— */
@media (max-width: 900px) {
    .cars-page-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 420px;
        padding: 64px 16px;
    }

    .hero-content-split {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hero-main {
        text-align: center;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
    }

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

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
    }

    .hero-actions .btn {
        width: 100%;
        text-align: center;
    }

    .hero-highlights {
        justify-content: center;
    }

    .hero-highlights span {
        width: 100%;
        justify-content: center;
    }

    .hero-search-grid {
        grid-template-columns: 1fr;
    }

    .hero-search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-search-actions .btn {
        width: 100%;
    }

    .hero-inline-link {
        text-align: center;
    }

    .hero-review-snippet {
        flex-direction: column;
        text-align: center;
    }

    .cars-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .filter-section {
        padding: 20px 16px;
    }

    .browse-section {
        margin-top: 24px;
    }

    .browse-section h2 {
        font-size: 1.35rem;
    }

    .car-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .car-footer .btn-small,
    .car-footer .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 360px;
        padding: 52px 12px;
    }

    .hero-kicker {
        font-size: 0.75rem;
    }

    .mobile-call-cta {
        display: block;
    }

    .section {
        padding: 28px 12px;
    }

    .container {
        padding: 0 12px;
    }

    .pagination .page-link {
        min-width: 40px;
        min-height: 40px;
        font-size: 0.9rem;
    }
}
