/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:         #1a1a1f;
    --bg2:        #22222a;
    --bg3:        #2a2a35;
    --card:       #252530;
    --border:     #3a3a48;
    --yellow:     #f5c518;
    --yellow-dim: #c9a010;
    --yellow-glow:rgba(245,197,24,0.35);
    --text:       #e8e8f0;
    --text-dim:   #9999b0;
    --danger:     #e05555;
    --success:    #4caf82;
    --radius:     8px;
    --shadow:     0 4px 24px rgba(0,0,0,0.4);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', 'Inter', 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--yellow); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }

img { max-width: 100%; display: block; }

main { flex: 1; }

/* === TYPOGRAPHY === */
h1,h2,h3,h4 {
    font-weight: 700;
    line-height: 1.25;
    color: var(--yellow);
}

h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); }

p { margin-bottom: .8rem; }

/* === CONTAINER === */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* === HEADER === */
.site-header {
    background: var(--bg2);
    border-bottom: 2px solid var(--yellow);
    box-shadow: 0 2px 20px var(--yellow-glow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--yellow);
    text-shadow: 0 0 12px var(--yellow-glow);
    white-space: nowrap;
}

.logo svg { width: 32px; height: 32px; flex-shrink: 0; }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }

.main-nav a {
    color: var(--text);
    padding: 7px 14px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 500;
    transition: all .2s;
}

.main-nav a:hover,
.main-nav a.active {
    background: var(--yellow);
    color: #111;
    box-shadow: 0 0 12px var(--yellow-glow);
}

.header-phone {
    font-weight: 700;
    color: var(--yellow);
    font-size: 1rem;
    white-space: nowrap;
    text-shadow: 0 0 8px var(--yellow-glow);
}

.burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    gap: 5px;
}

.burger span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--yellow);
    border-radius: 2px;
    transition: all .3s;
}

/* === HERO === */
.hero {
    background: linear-gradient(135deg, var(--bg2) 0%, var(--bg3) 100%);
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(245,197,24,.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(245,197,24,.04) 0%, transparent 60%);
}

.hero-content { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }

.hero h1 {
    margin-bottom: 16px;
    text-shadow: 0 0 30px var(--yellow-glow);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-dim);
    margin-bottom: 28px;
}

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: .95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .25s;
    text-align: center;
}

.btn-primary {
    background: var(--yellow);
    color: #111;
    border-color: var(--yellow);
}

.btn-primary:hover {
    background: transparent;
    color: var(--yellow);
    box-shadow: 0 0 20px var(--yellow-glow), inset 0 0 20px rgba(245,197,24,.1);
    text-shadow: 0 0 8px var(--yellow-glow);
}

.btn-outline {
    background: transparent;
    color: var(--yellow);
    border-color: var(--yellow);
}

.btn-outline:hover {
    background: var(--yellow);
    color: #111;
    box-shadow: 0 0 20px var(--yellow-glow);
}

/* === SECTION === */
.section { padding: 60px 0; }

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 { margin-bottom: 8px; }
.section-title p  { color: var(--text-dim); font-size: .95rem; }

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--yellow);
    margin: 12px auto;
    border-radius: 2px;
    box-shadow: 0 0 10px var(--yellow-glow);
}

/* === SERVICES GRID === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: var(--yellow);
    box-shadow: 0 0 20px var(--yellow-glow), var(--shadow);
    transform: translateY(-3px);
}

.service-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}

.service-card:hover .service-card-img img {
    transform: scale(1.04);
}

.service-card-body {
    padding: 20px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.05rem;
}

.service-card p { color: var(--text-dim); font-size: .9rem; margin-bottom: 12px; flex: 1; }

.service-price {
    display: inline-block;
    background: rgba(245,197,24,.12);
    border: 1px solid var(--yellow);
    color: var(--yellow);
    padding: 3px 12px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
}

/* === BLOG GRID === */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: all .3s;
}

.article-card:hover {
    border-color: var(--yellow);
    box-shadow: 0 0 20px var(--yellow-glow), var(--shadow);
    transform: translateY(-3px);
}

.article-date { color: var(--text-dim); font-size: .82rem; margin-bottom: 10px; }

.article-card h3 { margin-bottom: 10px; font-size: 1rem; }

.article-card p { color: var(--text-dim); font-size: .9rem; flex: 1; margin-bottom: 16px; }

.article-card .btn { align-self: flex-start; font-size: .85rem; padding: 8px 18px; }

/* === CONTACT FORM === */
.contact-section { background: var(--bg2); }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

@media(max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.form-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: .9rem;
    color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 11px 14px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 10px var(--yellow-glow);
}

.form-group textarea { min-height: 100px; resize: vertical; }

.captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.captcha-question {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    font-size: .95rem;
    color: var(--yellow);
    white-space: nowrap;
}

.captcha-row input { flex: 1; min-width: 80px; max-width: 120px; }

.form-msg {
    padding: 10px 14px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-top: 12px;
    display: none;
}

.form-msg.success { background: rgba(76,175,130,.15); border: 1px solid var(--success); color: var(--success); display: block; }
.form-msg.error   { background: rgba(224,85,85,.12); border: 1px solid var(--danger); color: var(--danger); display: block; }

/* === CONTACTS INFO === */
.contacts-info h3 { color: var(--yellow); margin-bottom: 8px; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.contact-item svg { color: var(--yellow); flex-shrink: 0; margin-top: 2px; }

/* === PARTS SEARCH === */
.parts-search-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    margin-bottom: 32px;
}

.search-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-row input {
    flex: 1;
    min-width: 200px;
    background: var(--bg3);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 13px 16px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

.search-row input:focus {
    border-color: var(--yellow);
    box-shadow: 0 0 14px var(--yellow-glow);
}

#loading-indicator {
    display: none;
    text-align: center;
    padding: 24px;
    color: var(--yellow);
    font-size: 1rem;
}

.spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--border);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Sort buttons */
.sort-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.sort-btn {
    background: var(--bg3);
    border: 1px solid var(--border);
    color: var(--text-dim);
    padding: 7px 16px;
    border-radius: 20px;
    font-size: .85rem;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.sort-btn:hover,
.sort-btn.active {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(245,197,24,.08);
}

/* Results table */
.results-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.results-table th {
    background: var(--bg3);
    padding: 12px 14px;
    text-align: left;
    font-size: .85rem;
    color: var(--yellow);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.results-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: .9rem;
    vertical-align: middle;
}

.results-table tr:last-child td { border-bottom: none; }

.results-table tr:hover td { background: rgba(245,197,24,.04); }

.badge-yes  { color: var(--success); font-weight: 600; }
.badge-no   { color: var(--danger); }
.badge-none { color: var(--text-dim); font-style: italic; }

/* === ARTICLE CONTENT === */
.article-full {
    max-width: 820px;
    margin: 0 auto;
}

.article-full h1 { margin-bottom: 8px; }

.article-meta { color: var(--text-dim); font-size: .88rem; margin-bottom: 32px; }

.article-body h2 { color: var(--yellow); margin: 28px 0 12px; }
.article-body h3 { color: var(--text); margin: 22px 0 10px; }
.article-body p  { margin-bottom: 14px; color: var(--text); }
.article-body ul,
.article-body ol { margin: 0 0 14px 22px; color: var(--text); }
.article-body li { margin-bottom: 4px; }
.article-body strong { color: var(--yellow); }

/* === PARTS ORDER FORM === */
.parts-order-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    max-width: 540px;
}

/* === MAP === */
.map-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.map-wrapper iframe {
    width: 100%;
    height: 380px;
    display: block;
    filter: grayscale(30%) invert(4%) saturate(80%);
}

/* === FOOTER === */
.site-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 32px 0 20px;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    margin-bottom: 20px;
}

.footer-col h4 { color: var(--yellow); margin-bottom: 12px; font-size: .95rem; }

.footer-col p,
.footer-col a {
    color: var(--text-dim);
    font-size: .88rem;
    display: block;
    margin-bottom: 6px;
}

.footer-col a:hover { color: var(--yellow); }

.footer-bottom {
    text-align: center;
    color: var(--text-dim);
    font-size: .82rem;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* === BREADCRUMBS === */
.breadcrumbs {
    padding: 12px 0;
    font-size: .85rem;
    color: var(--text-dim);
}

.breadcrumbs a { color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--yellow); }
.breadcrumbs span { color: var(--text-dim); margin: 0 6px; }

/* === PAGE HERO (sub-pages) === */
.page-hero {
    background: linear-gradient(135deg, var(--bg2), var(--bg3));
    padding: 40px 20px;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 { text-shadow: 0 0 20px var(--yellow-glow); }

/* === PAGINATION === */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: .9rem;
    transition: all .2s;
}

.pagination a:hover,
.pagination span.current {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(245,197,24,.08);
}

/* === UTILITY === */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0  { margin-bottom: 0; }
.color-dim { color: var(--text-dim); }
.color-yellow { color: var(--yellow); }

/* === RESPONSIVE === */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .main-nav.open { display: flex; flex-direction: column; gap: 4px; }
    .burger { display: flex; }

    .header-inner { flex-wrap: wrap; }
    .main-nav { width: 100%; }
}

@media (max-width: 600px) {
    .hero { padding: 50px 16px; }
    .section { padding: 40px 0; }
    .form-box { padding: 20px; }
    .parts-search-box { padding: 20px; }
    .results-table th,
    .results-table td { padding: 8px 10px; font-size: .82rem; }
}
