/* ==========================================================================\n   CARFENCE PRECUT PPF - MODERN BLACK / WHITE / MAGENTA UI\n   ========================================================================== */

:root {
    --black: #050505;
    --black-2: #0b0b0d;
    --black-3: #111114;
    --white: #ffffff;
    --off-white: #f7f7f8;
    --accent: #c405f3;
    --accent-dark: #9d00c7;
    --accent-soft: rgba(196, 5, 243, 0.12);
    --accent-border: rgba(196, 5, 243, 0.35);
    --text-dark: #111114;
    --text-muted: #8d8d97;
    --text-light-muted: #b8b8c0;
    --border-dark: #25252b;
    --border-light: #e8e8ec;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-card: 0 18px 45px rgba(0, 0, 0, 0.25);
    --shadow-accent: 0 12px 35px rgba(196, 5, 243, 0.18);
}

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

html { scroll-behavior: smooth; }

body {
    background:
        radial-gradient(circle at 8% 12%, rgba(196, 5, 243, 0.08), transparent 25%),
        radial-gradient(circle at 92% 38%, rgba(196, 5, 243, 0.05), transparent 22%),
        var(--black);
    color: var(--white);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.035;
    background-image: radial-gradient(#fff 0.6px, transparent 0.6px);
    background-size: 8px 8px;
    z-index: -1;
}

a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* HEADER */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.9);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-dark);
}

.nav-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
}

.logo a { display: flex; align-items: center; }
.logo-img {
    height: 42px;
    width: auto;
    display: block;
    object-fit: contain;
}

.header-search {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 560px;
}

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

.header-search input {
    width: 100%;
    height: 46px;
    background: var(--black-3);
    border: 1px solid #303038;
    border-radius: 14px;
    padding: 11px 18px 11px 48px;
    color: var(--white);
    font-size: 14px;
    outline: none;
    transition: .25s ease;
}

.header-search input::placeholder { color: #707079; }
.header-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-soft);
}
.header-search:focus-within svg { color: var(--accent); }

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #111115;
    border: 1px solid #303038;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    max-height: 340px;
    overflow-y: auto;
    z-index: 100;
    padding: 6px;
}

.search-item {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    border-radius: 11px;
    cursor: pointer;
    transition: .2s ease;
}
.search-item:hover { background: var(--accent-soft); }
.search-item .item-title { color: var(--white); font-weight: 700; }
.search-item .item-brand {
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }
.admin-btn {
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--white);
    padding: 10px 17px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    transition: .25s ease;
}
.admin-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

/* MAIN */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 34px 28px 70px;
    flex-grow: 1;
    width: 100%;
}

/* HERO */
.hero-section {
    position: relative;
    overflow: hidden;
    text-align: left;
    padding: 56px 48px 52px;
    margin-bottom: 28px;
    border: 1px solid #24242a;
    border-radius: 28px;
    background: linear-gradient(135deg, #101012 0%, #09090b 60%, #130a16 100%);
}

.hero-section::after {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -90px;
    top: -120px;
    border-radius: 50%;
    border: 1px solid rgba(196, 5, 243, .22);
    box-shadow: 0 0 0 32px rgba(196, 5, 243, .025), 0 0 0 64px rgba(196, 5, 243, .02);
}

.hero-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), transparent);
}

.hero-title {
    position: relative;
    z-index: 1;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 13px;
    letter-spacing: -1.8px;
}
.hero-title::first-line { color: var(--white); }
.hero-subtitle {
    position: relative;
    z-index: 1;
    max-width: 700px;
    color: #c6c6ce;
    font-size: 16px;
}

/* BRAND GRID */
.brand-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.brand-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    padding: 24px 20px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.brand-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}

.brand-card:hover {
    border-color: rgba(196, 5, 243, .35);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,.28), 0 8px 25px rgba(196,5,243,.10);
}
.brand-card:hover::before { transform: scaleX(1); }

.brand-logo-container {
    height: 76px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}
.brand-logo-img {
    max-height: 68px;
    max-width: 160px;
    object-fit: contain;
}
.brand-logo-fallback {
    font-size: 18px;
    font-weight: 900;
    color: var(--white);
    background: var(--black);
    padding: 8px 14px;
    border-radius: 9px;
}
.brand-name {
    font-size: 15px;
    font-weight: 900;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 11px;
}
.view-models-btn {
    background: #f0f0f3;
    color: #34343a;
    border: 1px solid #e2e2e7;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    transition: .2s ease;
}
.brand-card:hover .view-models-btn {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

/* BREADCRUMB */
.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    margin-bottom: 24px;
    color: var(--text-light-muted);
    background: #0e0e11;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-dark);
}
.breadcrumb a { color: var(--accent); font-weight: 800; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .separator { color: #55555d; }
.breadcrumb .current { color: var(--white); font-weight: 700; }

/* LEVEL 2 */
.brand-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    background: #111114;
    border: 1px solid #2a2a30;
    padding: 9px 15px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}
.back-link:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-soft);
}

.brand-detail-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 26px;
    padding: 26px 0 25px;
    border-bottom: 1px solid var(--border-dark);
}
.brand-detail-hero > img {
    max-width: 130px;
    object-fit: contain;
    background: var(--white);
    border-radius: 12px;
    padding: 8px 12px;
}
.brand-detail-title {
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.1;
    font-weight: 900;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: -1px;
}
.brand-detail-subtitle { color: #aaaab3; font-size: 14px; margin-top: 5px; }

.brand-models-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.brand-models-meta .title {
    font-size: 17px;
    font-weight: 800;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-models-meta .title svg { color: var(--accent); }
.model-count-badge {
    background: var(--accent-soft);
    border: 1px solid var(--accent-border);
    color: #e49af5;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 11px;
    border-radius: 999px;
}

.models-list { display: flex; flex-direction: column; gap: 10px; }
.model-row-card {
    position: relative;
    overflow: hidden;
    background: var(--white);
    border: 1px solid #e6e6ea;
    border-radius: 16px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: .23s ease;
    cursor: pointer;
}
.model-row-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform .23s ease;
}
.model-row-card:hover {
    border-color: rgba(196, 5, 243, .28);
    transform: translateX(5px);
    box-shadow: 0 12px 28px rgba(0,0,0,.22);
}
.model-row-card:hover::before { transform: scaleY(1); }
.model-row-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.model-thumbnail {
    width: 86px;
    height: 58px;
    flex: 0 0 auto;
    background: #070707;
    border: 1px solid #27272d;
    border-radius: 10px;
    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: 8px;
    font-weight: 800;
    letter-spacing: .7px;
    color: #62626a;
    text-align: center;
    padding: 4px;
}
.model-row-title {
    font-size: 17px;
    font-weight: 850;
    color: var(--text-dark);
}
.model-row-variant { font-size: 12px; color: #777780; margin-top: 2px; }
.dealer-price-badge {
    flex: 0 0 auto;
    background: var(--black);
    border: 1px solid var(--black);
    color: var(--white);
    padding: 8px 13px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
}
.model-row-card:hover .dealer-price-badge {
    background: var(--accent);
    border-color: var(--accent);
}

/* LEVEL 3 */
.detail-card-wrapper {
    max-width: 900px;
    margin: 12px auto 0;
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid #e8e8ec;
    border-radius: 26px;
    padding: 42px;
    text-align: center;
    box-shadow: var(--shadow-card);
}
.detail-model-title {
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 25px;
}
.detail-price-box {
    background: var(--black);
    border: 1px solid var(--accent);
    border-radius: 15px;
    padding: 18px 22px;
    max-width: 320px;
    margin: 0 auto 30px;
    box-shadow: var(--shadow-accent);
}
.detail-price-label { font-size: 12px; color: #9999a3; margin-bottom: 3px; text-transform: uppercase; letter-spacing: 1px; font-weight: 800; }
.detail-price-value { font-size: 30px; font-weight: 900; color: var(--accent); }
.detail-blueprint-container {
    background: #050505;
    border: 1px solid #24242a;
    border-radius: 15px;
    padding: 22px;
    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(.9) contrast(1.2); }
.detail-blueprint-placeholder { color: var(--text-muted); font-size: 14px; }

/* FOOTER */
footer {
    background: #08080a;
    border-top: 1px solid var(--border-dark);
    padding: 25px 24px;
    text-align: center;
    color: #7f7f89;
    font-size: 12px;
}
footer strong { color: var(--accent); }

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

@media (max-width: 768px) {
    .nav-container { flex-wrap: wrap; padding: 13px 18px; gap: 13px; }
    .logo { flex: 1; }
    .logo-img { height: 38px; }
    .nav-actions { order: 2; }
    .header-search { order: 3; flex-basis: 100%; max-width: 100%; }
    .container { padding: 22px 16px 50px; }
    .hero-section { padding: 40px 28px 38px; border-radius: 22px; }
    .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .brand-card { min-height: 170px; padding: 19px 12px; }
    .brand-logo-container { height: 65px; }
    .brand-logo-img { max-height: 58px; max-width: 135px; }
    .brand-detail-hero { gap: 15px; }
    .detail-card-wrapper { padding: 24px 16px; border-radius: 20px; }
    .detail-blueprint-container { padding: 14px; }
}

@media (max-width: 480px) {
    .admin-btn { padding: 8px 12px; font-size: 12px; }
    .hero-title { font-size: 31px; letter-spacing: -1px; }
    .hero-subtitle { font-size: 14px; }
    .brand-grid { grid-template-columns: repeat(2, 1fr); }
    .brand-name { font-size: 13px; }
    .view-models-btn { font-size: 10px; padding: 6px 10px; }
    .model-row-card { padding: 11px; }
    .model-row-left { gap: 10px; }
    .model-thumbnail { width: 60px; height: 45px; }
    .model-row-title { font-size: 14px; }
    .model-row-variant { font-size: 10px; }
    .dealer-price-badge { padding: 7px 9px; font-size: 10px; }
    .brand-detail-title { font-size: 26px; }
}
