/* carsinfos.com — Phase 0 minimal styles. Will be expanded in Phase 1+. */
:root {
    --bg: #0f1115;
    --panel: #161a22;
    --text: #e8eaed;
    --muted: #9aa3b2;
    --accent: #4f8cff;
    --accent-hover: #6ea1ff;
    --border: #232934;
    --max-width: 1180px;
    --radius: 10px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--panel);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
    letter-spacing: -0.01em;
}
.main-nav {
    display: flex;
    gap: 28px;
}
.nav-link {
    color: var(--muted);
    font-weight: 500;
    font-size: 14px;
}
.nav-link:hover { color: var(--text); }

/* Main */
.site-main { padding: 48px 24px; min-height: calc(100vh - 64px - 80px); }

/* Hero */
.hero { max-width: 720px; margin: 32px 0 64px; }
.hero h1 {
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 16px;
    letter-spacing: -0.02em;
    font-weight: 700;
}
.hero .lead {
    font-size: 18px;
    color: var(--muted);
    margin: 0 0 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    border: 1px solid transparent;
    transition: background .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--accent); color: #0a0c10; }
.btn-primary:hover { background: var(--accent-hover); color: #0a0c10; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); color: var(--text); }

/* Placeholder note */
.placeholder-note {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: var(--muted);
    font-size: 14px;
    max-width: 720px;
}

/* Error pages */
.error-page { text-align: center; padding: 96px 24px; }
.error-page h1 { font-size: 96px; margin: 0 0 8px; letter-spacing: -0.04em; }
.error-page p { color: var(--muted); margin: 8px 0 24px; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--panel);
    padding: 24px 0;
    margin-top: 48px;
}
.footer-inner { color: var(--muted); font-size: 13px; }

/* Page header & breadcrumbs */
.page-header { margin: 24px 0 32px; }
.page-header h1 { font-size: 36px; margin: 0 0 8px; letter-spacing: -0.02em; }
.page-header .trim { color: var(--accent); font-weight: 600; }
.muted { color: var(--muted); font-size: 14px; }
.breadcrumb { margin: 24px 0 0; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span { margin: 0 6px; }

/* Brand grid */
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-top: 24px; }
.brand-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, transform .15s;
}
.brand-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.brand-thumb { display: block; width: 100%; aspect-ratio: 16/10; background: #0a0c10; overflow: hidden; }
.brand-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 48px; font-weight: 700; color: var(--accent); background: linear-gradient(135deg, var(--panel), #0a0c10); }
.brand-info { padding: 12px 14px; display: flex; flex-direction: column; }
.brand-name { font-weight: 600; font-size: 15px; }
.brand-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Brand header (hero + meta side-by-side) */
.brand-header, .model-header, .year-header {
    display: grid; grid-template-columns: minmax(280px, 480px) 1fr; gap: 24px;
    align-items: center; margin: 24px 0 32px;
}
.brand-hero, .model-hero, .year-hero {
    width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); background: #0a0c10;
    border: 1px solid var(--border);
}
.brand-hero img, .model-hero img, .year-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-meta-block h1, .model-meta-block h1, .year-meta-block h1 { font-size: 36px; margin: 0 0 8px; letter-spacing: -0.02em; }

/* Model grid */
.model-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.model-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, transform .15s;
}
.model-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.model-thumb { display: block; width: 100%; aspect-ratio: 16/10; background: #0a0c10; overflow: hidden; }
.model-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.model-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700; color: var(--accent); background: linear-gradient(135deg, var(--panel), #0a0c10); }
.model-info { padding: 12px 14px; display: flex; flex-direction: column; }
.model-name { font-weight: 600; }
.model-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }

/* Trim card grid (year page) */
.trim-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; margin-top: 16px; }
.trim-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); display: flex; flex-direction: column; overflow: hidden; transition: border-color .15s, transform .15s;
}
.trim-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.trim-thumb { display: block; width: 100%; aspect-ratio: 16/9; background: #0a0c10; overflow: hidden; }
.trim-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trim-thumb.placeholder { display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 700; color: var(--accent); background: linear-gradient(135deg, var(--panel), #0a0c10); }
.trim-info { padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.trim-name { font-weight: 600; }
.trim-meta { font-size: 12px; }

@media (max-width: 720px) {
    .brand-header, .model-header, .year-header { grid-template-columns: 1fr; }
}

/* Year/Trim sections */
.year-block { margin: 24px 0; }
.year-block h3 { margin: 0 0 8px; font-size: 18px; }
.year-block h3 a { color: var(--text); }
.trim-list { list-style: none; padding: 0; margin: 0; }
.trim-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.trim-list li:last-child { border: 0; }

/* Trim table */
.trim-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 14px; }
.trim-table th, .trim-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.trim-table th { color: var(--muted); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

/* Specs */
.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 16px; }
.spec-group { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.spec-group h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.spec-group dl { margin: 0; }
.spec-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border: 0; }
.spec-row dt { color: var(--muted); font-size: 13px; }
.spec-row dd { margin: 0; font-weight: 500; }

/* Prices */
.price-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.price-table th, .price-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.price-table th { color: var(--muted); font-weight: 500; font-size: 12px; }

/* Comments */
.comments-section { margin: 32px 0; }
.comments-list { list-style: none; padding: 0; margin: 0; }
.comment {
    background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 16px; margin: 8px 0;
}
.comment-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.rating { background: var(--accent); color: #0a0c10; padding: 2px 8px; border-radius: 999px; font-weight: 600; font-size: 11px; }
.badge.owner { background: #1f3b1f; color: #6fcf6f; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 500; }
.comment-body { margin: 8px 0; line-height: 1.55; }
.comment-actions .vote-btn { background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; cursor: pointer; }
.comment-actions .vote-btn:hover { color: var(--text); border-color: var(--accent); }
.inline-form { display: inline; }

/* Comment form */
.comment-form { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 24px; }
.comment-form .form-row { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.comment-form label { color: var(--muted); font-size: 13px; }
.comment-form input, .comment-form select, .comment-form textarea {
    background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 6px;
    padding: 8px 10px; font: inherit;
}

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.gallery figure { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.gallery img { width: 100%; height: 180px; object-fit: cover; display: block; }
.gallery figcaption { padding: 6px 10px; font-size: 11px; }

/* Aggregate rating */
.aggregate { font-size: 18px; }

/* Disclaimer */
.disclaimer { margin-top: 32px; padding: 16px; background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); font-size: 13px; }

/* Admin grid */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 16px 0 24px; }
.admin-grid .card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.admin-grid .card strong { display: block; font-size: 24px; }

/* User area in header */
.user-area { display: flex; align-items: center; gap: 10px; margin-left: 16px; }
.user-area .avatar { width: 28px; height: 28px; border-radius: 50%; }
.user-area .user-name { color: var(--text); font-size: 13px; font-weight: 500; }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* Responsive */
@media (max-width: 640px) {
    .header-inner { height: 56px; }
    .main-nav { gap: 16px; }
    .nav-link { font-size: 13px; }
    .hero h1 { font-size: 32px; }
    .hero .lead { font-size: 16px; }
}
