:root {
    --primary: #1f2937;
    --secondary: #ef4444;
    --accent: #3b82f6;
    --light: #f3f4f6;
    --border: #e5e7eb;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        Cantarell, sans-serif;
    color: #1f2937;
    background-color: #fff;
    line-height: 1.6;
}

/* Home hero */
.hero {
    background: linear-gradient(135deg, #1f2937 0%, #111829 100%);
    color: white;
    padding: 4.5rem 1rem;
    text-align: center;
}

.hero__title {
    font-size: clamp(1.9rem, 5vw, 3rem);
    margin-bottom: 0.75rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: clamp(0.95rem, 2.2vw, 1.15rem);
    margin-bottom: 1.5rem;
    color: #d1d5db;
}

.hero__search {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border-radius: 0.5rem;
    padding: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.hero__search input {
    flex: 1;
    border: none;
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
    outline: none;
    font-size: 0.9rem;
}

.hero__search .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.9rem;
}

/* Navigation */
nav {
    background: var(--primary);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.navbar-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.navbar-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link-button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font: inherit;
    padding: 0;
    transition: color 0.3s;
}

.navbar-links a:hover {
    color: var(--secondary);
}

.nav-link-button:hover {
    color: var(--secondary);
}

/* Main content */
main {
    min-height: calc(100vh - 200px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 3rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent);
    color: white;
}

.btn-secondary:hover {
    background-color: #2563eb;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: white;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Footer */
footer {
    background: var(--primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6b7280;
}

.mb-1 {
    margin-bottom: 0.5rem;
}
.mb-2 {
    margin-bottom: 1rem;
}
.mb-3 {
    margin-bottom: 1.5rem;
}
.mb-4 {
    margin-bottom: 2rem;
}

.mt-1 {
    margin-top: 0.5rem;
}
.mt-2 {
    margin-top: 1rem;
}
.mt-3 {
    margin-top: 1.5rem;
}
.mt-4 {
    margin-top: 2rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Stock page layout */
.stock-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 2rem;
    align-items: start;
}

.stock-sidebar,
.stock-main {
    min-width: 0;
}

/* Home vehicle sections: nicer mobile layout (doesn't affect /stock) */
.home-vehicle-grid {
    width: 100%;
}

.home-feature {
    text-align: center;
}

.home-feature__icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.home-feature__title {
    margin-bottom: 0.4rem;
}

/* Home CTA */
.home-cta {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
}

.home-cta__title {
    font-size: clamp(1.4rem, 4.5vw, 2rem);
    margin-bottom: 0.75rem;
    line-height: 1.15;
}

.home-cta__text {
    margin-bottom: 1.25rem;
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
}

.home-cta__btn {
    background: white;
    color: var(--secondary);
}

/* About / Contact shared styles */
.page-hero {
    background: linear-gradient(135deg, #1f2937 0%, #111829 100%);
    color: white;
    padding: 4rem 1rem;
}

.page-hero__title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.page-hero__subtitle {
    font-size: 1.1rem;
    color: #d1d5db;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-title--center {
    text-align: center;
}

.about-text {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-image-placeholder {
    background: #f3f4f6;
    padding: 0;
    border-radius: 0.75rem;
    aspect-ratio: 4/3;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0.75rem;
    display: block;
}

.about-stats {
    background: #f9fafb;
    padding: 3rem;
    border-radius: 0.75rem;
    margin-bottom: 4rem;
}

.about-stat__value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.about-why {
    margin-bottom: 4rem;
}

.about-why__icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.about-why__title {
    margin-bottom: 0.5rem;
}

.about-team {
    background: #f9fafb;
    padding: 3rem;
    border-radius: 0.75rem;
}

.about-team__subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
}

.team-member {
    text-align: center;
}

.team-member__avatar {
    width: 150px;
    height: 150px;
    background: white;
    border-radius: 50%;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 3rem;
}

.team-member__name {
    margin-bottom: 0.5rem;
}

.team-member__role {
    color: #6b7280;
}

.contact-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.contact-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]):focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group label.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    margin-bottom: 0;
    font-weight: 400;
}

.form-group label.checkbox-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.contact-info-card {
    background: #f9fafb;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.contact-info-card__title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.contact-info-item {
    margin-bottom: 2rem;
}

.contact-info-item--last {
    margin-bottom: 0;
}

.contact-info-item__label {
    color: #6b7280;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.contact-info-item__value {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.contact-info-item__text {
    color: #1f2937;
}

.contact-info-item__text--strong {
    font-weight: 600;
}

.contact-links-card {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.contact-links-card__title {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.contact-links-card__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-links-card__item {
    margin-bottom: 0.75rem;
}

.contact-links-card__item--last {
    margin-bottom: 0;
}

.contact-links-card__link {
    color: #3b82f6;
    text-decoration: none;
}

.contact-map {
    margin-top: 4rem;
}

.contact-map__placeholder {
    background: #f3f4f6;
    border-radius: 0.75rem;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.contact-map__placeholder iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        padding: 0.75rem 0;
    }

    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
        line-height: 1.2;
    }

    .navbar-links {
        width: 100%;
        gap: 0.75rem 1rem;
        flex-wrap: wrap;
        font-size: 0.9rem;
    }

    .navbar-links a,
    .nav-link-button {
        font-size: 0.9rem;
    }

    .navbar-links li {
        line-height: 1.2;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .page-hero {
        padding: 3rem 1rem;
    }

    .page-hero__title {
        font-size: 2.1rem;
        margin-bottom: 0.75rem;
    }

    .page-hero__subtitle {
        font-size: 1rem;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .stock-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .about-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .about-stats,
    .about-team {
        padding: 2rem 1.25rem;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stock-sidebar .filter-section {
        margin-bottom: 0;
    }

    .stock-main .sort-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .stock-main .sort-controls select {
        width: 100%;
    }

    .section--home-featured,
    .section--home-recent {
        padding: 2.25rem 0;
    }

    .section--home-featured .section-title,
    .section--home-recent .section-title {
        margin-bottom: 1.25rem;
    }

    .home-vehicle-grid {
        max-width: 420px;
        margin: 0 auto;
        gap: 1.25rem;
    }

    .section--home-features {
        padding: 2.25rem 0;
    }

    .section--home-features .section-title {
        margin-bottom: 1.25rem;
    }

    .home-features-grid {
        gap: 1.25rem;
    }

    .home-feature__icon {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .home-feature__title {
        font-size: 1rem;
        margin-bottom: 0.35rem;
    }

    .home-feature__text {
        font-size: 0.9rem;
        line-height: 1.45;
    }

    .home-cta {
        padding: 2.25rem 1rem;
    }

    .home-cta__text {
        margin-bottom: 1rem;
    }

    .home-cta__btn {
        font-size: 0.95rem;
        padding: 0.7rem 1.1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3.5rem 1rem;
    }

    .hero__search {
        padding: 0.45rem;
    }

    .hero__search .btn {
        flex: 0 0 auto;
        min-width: 6.5rem;
    }

    .stock-sidebar .price-range {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .stock-sidebar .price-range span {
        min-width: auto;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Inventory filters & pagination */
.filter-section {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.filter-group input[type="text"],
.filter-group input[type="number"],
.filter-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.price-range {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.price-range input {
    flex: 1;
}

.price-range span {
    color: #6b7280;
    min-width: 40px;
}

.btn-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-group > * {
    flex: 1;
}

/* Sidebar filter actions: smaller buttons */
.filter-section .btn-group .btn,
.filter-section .btn-group button {
    font-size: 1rem;
    padding: 0.9rem 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.sort-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
}

.sort-controls select {
    padding: 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    text-decoration: none;
    color: #1f2937;
}

.pagination a:hover,
.pagination .active {
    background-color: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.vehicle-card-skeleton {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* Vehicle cards: keep consistent spacing */
.vehicle-card__chip {
    min-height: 1.6rem;
}
