/*
Theme Name: North Forge Powersports
Description: Custom theme for powersports marketplace
*/

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
    line-height: 1.5;
    color: #1a1a1a;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* === Accessibility === */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 6px;
    z-index: 100;
    background: #000;
    color: #fff;
    padding: 8px 16px;
    font-size: 14px;
}

.skip-link:focus {
    top: 6px;
}

/* === Header Utility Bar === */
.header-utility {
    background: #111;
    color: #ccc;
    padding: 4px 16px;
    font-size: 0.85em;
    text-align: center;
}

/* === Main Header (Mobile‑First) === */
.site-header {
    background: #000;
    color: #fff;
    position: relative;
}

.header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Branding --- */
.site-branding {
    max-width: 60%;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.site-title a {
    color: inherit;
}

.site-description {
    display: none; /* hide tagline on mobile for brevity */
}

/* Custom logo (when uploaded) */
.site-logo img {
    max-height: 50px;
    width: auto;
}

/* --- Hamburger Toggle (Checkbox Hack) --- */
.menu-toggle-checkbox {
    display: none; /* hidden but accessible */
}

.menu-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px;
    z-index: 20;
}

/* Hamburger icon */
.menu-icon {
    position: relative;
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: background 0.2s;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transition: transform 0.2s, top 0.2s;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    top: 8px;
}

/* Animate to X when checked */
.menu-toggle-checkbox:checked + .menu-toggle-label .menu-icon {
    background: transparent;
}

.menu-toggle-checkbox:checked + .menu-toggle-label .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle-checkbox:checked + .menu-toggle-label .menu-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* --- Main Navigation (hidden on mobile until checkbox checked) --- */
.main-navigation {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #111;
    margin-top: 12px;
}

/* Show menu when checkbox is checked */
.menu-toggle-checkbox:checked ~ .main-navigation {
    max-height: 1000px; /* large enough */
}

/* Menu list */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 10px 16px;
    color: #eee;
    font-weight: 500;
    border-bottom: 1px solid #222;
}

.main-navigation a:hover,
.main-navigation a:focus {
    background: #222;
    color: #fff;
}

/* Submenus (if any) simplified */
.main-navigation ul ul {
    margin-left: 16px;
    border-left: 2px solid #333;
}

/* === Desktop Styles (min‑width 768px) === */
@media (min-width: 768px) {
    .site-description {
        display: block; /* show tagline */
        font-size: 0.85em;
        color: #ccc;
        margin: 2px 0 0;
    }

    .header-inner {
        flex-wrap: nowrap;
    }

    /* Hide hamburger */
    .menu-toggle-label {
        display: none;
    }

    /* Show navigation inline, no max‑height hack */
    .main-navigation {
        width: auto;
        max-height: none;
        overflow: visible;
        background: transparent;
        margin-top: 0;
    }

    .main-navigation ul {
        display: flex;
        gap: 8px;
        padding: 0;
    }

    .main-navigation a {
        padding: 8px 14px;
        border-bottom: none;
        border-radius: 4px;
    }
}
/* ========================================
   Single Vehicle Detail Page
   ======================================== */

/* Mobile-first: single column, everything stacked */
.vehicle-detail {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header (title + price) */
.vehicle-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.vehicle-header h1 {
    font-size: 1.8rem;
    margin: 0;
    flex: 1 1 60%;
}

.vehicle-price {
    font-size: 2rem;
    font-weight: 700;
    color: #c00;
    white-space: nowrap;
}

/* Gallery */
.vehicle-gallery {
    margin-bottom: 32px;
}

.vehicle-main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.vehicle-gallery-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-top: 12px;
    padding-bottom: 8px;
}

.vehicle-gallery-grid img {
    max-height: 160px;
    width: auto;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Specifications Table */
.vehicle-specs {
    margin-bottom: 32px;
}

.vehicle-specs h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.vehicle-specs table {
    width: 100%;
    border-collapse: collapse;
}

.vehicle-specs th,
.vehicle-specs td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.vehicle-specs th {
    width: 150px;
    font-weight: 600;
    color: #555;
    background: #f9f9f9;
}

.vehicle-specs tr:last-child th,
.vehicle-specs tr:last-child td {
    border-bottom: none;
}

/* Description */
.vehicle-description {
    margin-bottom: 36px;
    line-height: 1.7;
    font-size: 1rem;
    color: #333;
}

/* Contact Form */
.vehicle-contact {
    background: #f4f4f4;
    padding: 28px;
    border-radius: 8px;
}

.vehicle-contact h2 {
    font-size: 1.4rem;
    margin-top: 0;
    margin-bottom: 18px;
}

.vehicle-contact form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 100%;
}

.vehicle-contact label {
    font-weight: 600;
    margin-bottom: -8px;
    color: #222;
}

.vehicle-contact label span {
    color: #c00;
}

.vehicle-contact input,
.vehicle-contact textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.vehicle-contact textarea {
    resize: vertical;
}

.vehicle-contact button {
    background: #000;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-start;
}

.vehicle-contact button:hover {
    background: #333;
}

/* Form messages */
.form-success {
    color: #1a7d1a;
    font-weight: bold;
}

.form-error {
    color: #c00;
    font-weight: bold;
}

/* ========================================
   Desktop layout (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    .vehicle-detail {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 40px;
    }

    /* Left column */
    .vehicle-header {
        grid-column: 1;
    }

    .vehicle-gallery {
        grid-column: 1;
    }

    .vehicle-description {
        grid-column: 1;
    }

    /* Right column sticky (optional, remove if you don't want it) */
    .vehicle-specs,
    .vehicle-contact {
        grid-column: 2;
    }

    /* Keep specs and contact stacked inside the right column */
    .vehicle-specs {
        margin-bottom: 24px;
    }

    /* Make price larger on desktop */
    .vehicle-price {
        font-size: 2.4rem;
    }

    /* Gallery grid larger images */
    .vehicle-gallery-grid img {
        max-height: 200px;
    }
}