/* ==========================================================================
   PAINTGUARD PRECUT PPF - DARK THEME STYLESHEET
   Hierarchy: Black Background, Yellow Headings, White Text
   ========================================================================== */

:root {
    --bg-black: #080808;
    --bg-card: #211f1e;
    --bg-card-hover: #1a1a1a;
    --bg-elevated: #1e1e1e;
    
    --heading-yellow: #facc15; /* Bright Electric Yellow */
    --heading-yellow-hover: #eab308;
    
    --text-white: #ffffff;
    --text-muted: #a1a1aa;
    --text-subtle: #71717a;
    
    --accent-green: #10b981;
    --accent-green-bg: rgba(16, 185, 129, 0.15);
    
    --border-dark: #27272a;
    --border-yellow: rgba(250, 204, 21, 0.3);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 15px rgba(250, 204, 21, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    background-color: var(--bg-black);
    color: var(--text-white);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

.hidden {
    display: none !important;
}

/* Header Navbar */
.navbar {
    background-color: #0d0d0d;
    border-bottom: 1px solid var(--border-dark);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--text-white);
}

.logo-icon {
    background: var(--heading-yellow);
    color: #000;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 18px;
}

.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.logo-text .highlight {
    color: var(--heading-yellow);
}

/* Header Search */
.header-search {
    position: relative;
    width: 100%;
    max-width: 450px;
}

.header-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-search input {
    width: 100%;
    background-color: #171717;
    border: 1px solid var(--border-dark);
    border-radius: 20px;
    padding: 10px 16px 10px 42px;
    color: var(--text-white);
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.header-search input:focus {
    border-color: var(--heading-yellow);
    background-color: #222222;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
}

.search-item {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1a1a1a;
    cursor: pointer;
    transition: background 0.2s;
}

.search-item:hover {
    background-color: var(--bg-card-hover);
}

.search-item .item-title {
    color: var(--text-white);
    font-weight: 600;
}

.search-item .item-brand {
    color: var(--heading-yellow);
    font-size: 12px;
    text-transform: uppercase;
}

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

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--heading-yellow);
}

.admin-btn {
    background: #1e1e1e;
    border: 1px solid var(--border-dark);
    color: var(--text-white);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.admin-btn:hover {
    border-color: var(--heading-yellow);
    color: var(--heading-yellow);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 24px 60px;
    flex-grow: 1;
    width: 100%;
}

/* BREADCRUMB NAVIGATION (Level 3 View) */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 24px;
    color: var(--text-muted);
    background: #111;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid #1f1f1f;
}

.breadcrumb a {
    color: var(--heading-yellow);
    font-weight: 600;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--text-subtle);
}

.breadcrumb .current {
    color: var(--text-white);
    font-weight: 600;
}

/* LEVEL 1: HERO & BRAND GRID */
.hero-section {
    text-align: center;
    padding: 40px 20px 50px;
}

.brand-emblem {
    width: 72px;
    height: 72px;
    background: #18181b;
    border: 2px solid var(--heading-yellow);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--heading-yellow);
    font-size: 32px;
    font-weight: 900;
    box-shadow: var(--shadow-glow);
}

.hero-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--heading-yellow); /* YELLOW HEADING */
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: var(--text-white); /* WHITE TEXT */
    font-size: 16px;
}

/* Brand Grid (4 Columns) */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.brand-card {
    background-color: #ffffff;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 28px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    cursor: pointer;
}

.brand-card:hover {
    background-color: #ffffff;
    border-color: var(--heading-yellow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.brand-logo-container {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.brand-logo-img {
    max-height: 70px;
    max-width: 160px;
    object-fit: contain;
    filter: brightness(1.1);
}

.brand-logo-fallback {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    background: #222;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #333;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--heading-yellow); /* YELLOW HEADING */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.view-models-btn {
    background: #1a1a1a;
    color: var(--text-muted);
    border: 1px solid var(--border-dark);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.brand-card:hover .view-models-btn {
    background: var(--heading-yellow);
    color: #000;
    border-color: var(--heading-yellow);
}


/* LEVEL 2: BRAND MODELS LIST VIEW */
.brand-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
    background: #141414;
    border: 1px solid var(--border-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.back-link:hover {
    border-color: var(--heading-yellow);
    color: var(--heading-yellow);
}

.brand-detail-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-dark);
}

.brand-detail-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--heading-yellow); /* YELLOW HEADING */
    text-transform: uppercase;
}

.brand-detail-subtitle {
    color: var(--text-white); /* WHITE TEXT */
    font-size: 14px;
}

.brand-models-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.brand-models-meta .title {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading-yellow); /* YELLOW */
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-count-badge {
    background: #18181b;
    border: 1px solid var(--border-dark);
    color: var(--text-muted);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
}

/* Model Row Cards List */
.models-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.model-row-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
}

.model-row-card:hover {
    background-color: var(--bg-card-hover);
    border-color: var(--heading-yellow);
    transform: translateX(4px);
}

.model-row-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.model-thumbnail {
    width: 80px;
    height: 55px;
    background: #000000;
    border: 1px solid #222;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.model-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.model-thumbnail-placeholder {
    font-size: 10px;
    color: #555;
    text-align: center;
    padding: 4px;
}

.model-row-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--heading-yellow); /* YELLOW HEADING */
}

.model-row-variant {
    font-size: 13px;
    color: var(--text-white); /* WHITE TEXT */
}

.dealer-price-badge {
    background-color: var(--accent-green-bg);
    border: 1px solid var(--accent-green);
    color: var(--accent-green);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
}


/* LEVEL 3: MODEL DETAIL VIEW */
.detail-card-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-card);
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.detail-model-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--heading-yellow); /* YELLOW HEADING */
    margin-bottom: 24px;
}

.detail-price-box {
    background-color: #0b0b0b;
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 20px;
    max-width: 320px;
    margin: 0 auto 32px;
}

.detail-price-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.detail-price-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent-green);
}

.detail-product-image {
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}
.detail-blueprint-container {
    background-color: #000000;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
}

.detail-blueprint-img {
    max-width: 100%;
    max-height: 380px;
    object-fit: contain;
    filter: invert(0.9) contrast(1.2); /* Enhance pattern diagram visibility */
}

.detail-blueprint-placeholder {
    color: var(--text-muted);
    font-size: 14px;
}

/* Footer */
footer {
    background-color: #0d0d0d;
    border-top: 1px solid var(--border-dark);
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

footer strong {
    color: var(--heading-yellow);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .brand-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-search {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 26px;
    }
    
    .detail-card-wrapper {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .brand-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .brand-card {
        padding: 16px 10px;
    }
    
    .model-row-left {
        gap: 10px;
    }
    
    .model-thumbnail {
        width: 60px;
        height: 45px;
    }
    
    .model-row-title {
        font-size: 15px;
    }
}
