/* ============================================================
   TAOYUN MOTOR VIETNAM — Main Stylesheet
   ============================================================ */

/* === CUSTOM PROPERTIES === */
:root {
    /* Colors — Industrial confidence palette */
    --color-primary: #0a1628;          /* Deep navy */
    --color-primary-light: #162a4a;    /* Navy lighter */
    --color-secondary: #1e3a5f;        /* Steel blue */
    --color-accent: #e8a838;           /* Warm gold */
    --color-accent-hover: #d4952e;     /* Gold darker */
    --color-accent-light: #fef3dc;     /* Gold tint */
    --color-surface: #ffffff;
    --color-surface-alt: #f5f7fa;      /* Light gray-blue */
    --color-surface-dark: #0d1b2a;     /* Very dark blue */
    --color-text: #1a2332;
    --color-text-light: #5a6a7e;
    --color-text-inv: #f0f4f8;
    --color-border: #dde3eb;
    --color-success: #22a06b;
    --color-error: #de350b;

    /* Typography */
    --font-heading: 'Be Vietnam Pro', 'Inter', system-ui, sans-serif;
    --font-body: 'Inter', 'Be Vietnam Pro', system-ui, sans-serif;

    /* Spacing scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --header-height: 72px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(10, 22, 40, 0.06);
    --shadow-md: 0 4px 12px rgba(10, 22, 40, 0.08);
    --shadow-lg: 0 8px 30px rgba(10, 22, 40, 0.12);
    --shadow-xl: 0 16px 50px rgba(10, 22, 40, 0.16);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; }

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    margin-bottom: var(--space-sm);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
}

.section-subtitle {
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-top: var(--space-md);
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.7em 1.5em;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn__icon { width: 18px; height: 18px; }

.btn--primary {
    background: var(--color-accent);
    color: var(--color-primary);
}
.btn--primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background: var(--color-primary);
    color: var(--color-text-inv);
}
.btn--secondary:hover {
    background: var(--color-primary-light);
    transform: translateY(-1px);
}

.btn--outline {
    border: 2px solid var(--color-accent);
    color: var(--color-accent);
    background: transparent;
}
.btn--outline:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

.btn--white {
    background: var(--color-surface);
    color: var(--color-primary);
}
.btn--white:hover {
    background: var(--color-accent-light);
    transform: translateY(-1px);
}

.btn--sm { font-size: 0.85rem; padding: 0.5em 1.2em; }
.btn--lg { font-size: 1.05rem; padding: 0.85em 2em; }

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow var(--transition-base);
}

.header--scrolled {
    box-shadow: var(--shadow-md);
}

.header > .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.header__logo-icon {
    width: 36px;
    height: 36px;
    color: var(--color-accent);
}

.header__logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.header__brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    color: var(--color-primary);
}

.header__sub {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    color: var(--color-text-light);
    text-transform: uppercase;
}

.header__nav {
    display: flex;
    gap: var(--space-xl);
}

.header__link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--color-text-light);
    position: relative;
    padding: var(--space-xs) 0;
    transition: color var(--transition-fast);
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.header__link:hover,
.header__link--active {
    color: var(--color-primary);
}

.header__link:hover::after,
.header__link--active::after {
    width: 100%;
}

.header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-switcher__btn {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.lang-switcher__btn:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    overflow: hidden;
}

.lang-switcher__menu--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-switcher__option {
    display: block;
    padding: 10px 16px;
    font-size: 0.85rem;
    transition: background var(--transition-fast);
}

.lang-switcher__option:hover {
    background: var(--color-surface-alt);
}

.lang-switcher__option--active {
    color: var(--color-accent);
    font-weight: 600;
}

/* Burger */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}

.header__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* === MAIN === */
.main {
    margin-top: var(--header-height);
}

/* === HERO === */
.hero {
    position: relative;
    background: var(--color-primary);
    color: var(--color-text-inv);
    padding: var(--space-4xl) 0;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__bg-image {
    position: absolute;
    inset: 0;
    background: url('/static/images/cover-banner.jpeg') center/cover no-repeat;
    opacity: 0.15;
}

.hero__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 50%, var(--color-primary-light) 100%);
    opacity: 0.85;
}

.hero__particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 700px;
}

.hero__badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(232, 168, 56, 0.15);
    border: 1px solid rgba(232, 168, 56, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
}

.hero__title {
    color: var(--color-text-inv);
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.hero__subtitle {
    font-size: 1.15rem;
    color: rgba(240, 244, 248, 0.8);
    margin-bottom: var(--space-md);
    line-height: 1.7;
}

.hero__trust-line {
    font-size: 1rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: var(--space-2xl);
    padding-left: var(--space-md);
    border-left: 3px solid var(--color-accent);
    line-height: 1.5;
}

.hero__rotating {
    display: inline-block;
    color: var(--color-accent);
    font-weight: 700;
    min-width: 100px;
    animation: heroWordFade 2.5s ease-in-out infinite;
}

@keyframes heroWordFade {
    0%, 100% { opacity: 0; transform: translateY(4px); }
    15%, 85% { opacity: 1; transform: translateY(0); }
}

.hero__stat-icon {
    width: 24px;
    height: 24px;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-3xl);
}

.hero__stats {
    display: flex;
    gap: var(--space-2xl);
    flex-wrap: wrap;
    padding-top: var(--space-2xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero__stat {
    display: flex;
    flex-direction: column;
}

.hero__stat-value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-accent);
}

.hero__stat-label {
    font-size: 0.8rem;
    color: rgba(240, 244, 248, 0.6);
    margin-top: 2px;
}

/* === CATEGORIES === */
.categories {
    padding: var(--space-4xl) 0;
    background: var(--color-surface-alt);
}

.categories__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-lg);
}

.category-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--color-accent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.category-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.category-card__title {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

.category-card__arrow {
    width: 20px;
    height: 20px;
    color: var(--color-text-light);
    opacity: 0;
    transform: translateX(-8px);
    transition: all var(--transition-base);
}

.category-card:hover .category-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* === FEATURED PRODUCTS === */
.featured {
    padding: var(--space-4xl) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.product-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: all var(--transition-base);
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--color-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__placeholder {
    width: 80px;
    height: 80px;
    color: var(--color-text-light);
}

.product-card__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
}

.product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
}

.product-card__body {
    padding: var(--space-lg);
}

.product-card__title {
    font-size: 1.05rem;
    margin-bottom: var(--space-sm);
}

.product-card__desc {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__specs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-md);
}

.product-card__spec {
    padding: 3px 10px;
    background: var(--color-surface-alt);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-secondary);
}

.featured__cta {
    text-align: center;
    margin-top: var(--space-3xl);
}

/* === WHY CHOOSE US === */
.why-us {
    padding: var(--space-4xl) 0;
    background: var(--color-surface-alt);
}

.why-us__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.why-card {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.why-card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
}

.why-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    color: var(--color-accent);
}

.why-card h3 {
    font-size: 1rem;
    margin-bottom: var(--space-sm);
}

.why-card p {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.6;
}

.why-card--primary {
    border-left: 4px solid var(--color-accent);
    background: var(--color-accent-light);
}

.why-card--primary:hover {
    border-color: var(--color-accent-hover);
}

/* === CUSTOMIZATION HIGHLIGHT === */
.customization-highlight {
    padding: var(--space-4xl) 0;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-surface) 100%);
}

.customization-highlight__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
}

.customization-highlight__card {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.customization-highlight__card:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.customization-highlight__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-md);
    color: var(--color-accent);
}

.customization-highlight__card p {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* === CUSTOM BANNER === */
.custom-banner {
    text-align: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-accent-light);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-primary);
    margin-bottom: var(--space-xl);
}

.custom-banner a {
    color: var(--color-accent-hover);
    font-weight: 700;
    text-decoration: underline;
}

.custom-banner a:hover {
    color: var(--color-primary);
}

/* === CUSTOM BADGE (product cards) === */
.product-card__badge--custom {
    background: var(--color-accent-light);
    color: var(--color-accent-hover);
    border: 1px solid var(--color-accent);
    top: auto;
    bottom: 12px;
    left: 12px;
}

/* === CUSTOM CALLOUT (product detail) === */
.custom-callout {
    padding: var(--space-lg) var(--space-xl);
    background: var(--color-accent-light);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.custom-callout strong {
    display: block;
    font-size: 1rem;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.custom-callout p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: 0;
}

/* === CONTACT GUIDANCE === */
.contact-guidance {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-accent-light);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-accent);
}

/* === SECTION NOTE === */
.section-note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-accent-hover);
    font-weight: 600;
    margin-top: var(--space-sm);
}

/* === CTA SECTION === */
.cta-section {
    padding: var(--space-4xl) 0;
}

.cta-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-text-inv);
    text-align: center;
    padding: var(--space-3xl) var(--space-2xl);
    border-radius: var(--radius-xl);
}

.cta-box h2 {
    color: var(--color-text-inv);
    margin-bottom: var(--space-md);
}

.cta-box p {
    font-size: 1.05rem;
    color: rgba(240, 244, 248, 0.8);
    margin-bottom: var(--space-xl);
    max-width: 500px;
    margin-inline: auto;
}

.cta-box__actions {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

/* === FOOTER === */
.footer {
    background: var(--color-surface-dark);
    color: var(--color-text-inv);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-2xl);
    padding-bottom: var(--space-2xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo-icon {
    width: 32px;
    height: 32px;
    color: var(--color-accent);
    margin-bottom: var(--space-md);
}

.footer__tagline {
    font-size: 0.9rem;
    color: rgba(240, 244, 248, 0.6);
    line-height: 1.6;
}

.footer__links h4,
.footer__factory h4 {
    color: var(--color-text-inv);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
}

.footer__links li {
    margin-bottom: var(--space-sm);
}

.footer__links a {
    font-size: 0.85rem;
    color: rgba(240, 244, 248, 0.6);
    transition: color var(--transition-fast);
}

.footer__links a:hover {
    color: var(--color-accent);
}

.footer__factory p {
    font-size: 0.85rem;
    color: rgba(240, 244, 248, 0.6);
    line-height: 1.6;
}

.footer__bottom {
    padding-top: var(--space-xl);
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8rem;
    color: rgba(240, 244, 248, 0.4);
}

/* === FLOATING CONTACT === */
.floating-contact {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
}

.floating-contact__trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.floating-contact__trigger svg {
    width: 24px;
    height: 24px;
}

.floating-contact__trigger:hover {
    background: var(--color-accent-hover);
    transform: scale(1.05);
}

.floating-contact__menu {
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--transition-base);
}

.floating-contact__menu--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.floating-contact__item {
    display: block;
    padding: 10px 20px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.floating-contact__item:hover {
    background: var(--color-accent-light);
    transform: translateX(-4px);
}

.floating-contact__item--zalo { border-left: 3px solid #0068ff; }
.floating-contact__item--email { border-left: 3px solid var(--color-success); }
.floating-contact__item--form { border-left: 3px solid var(--color-accent); }

/* === ERROR PAGE === */
.error-page {
    text-align: center;
    padding: var(--space-4xl) 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.error-page h1 {
    margin-bottom: var(--space-xl);
}

/* === PRODUCTS PAGE === */
.products-page {
    padding: var(--space-3xl) 0;
}

.products-page__filters {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-2xl);
}

.filter-btn {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn--active {
    background: var(--color-accent);
    color: var(--color-primary);
    border-color: var(--color-accent);
}

/* === PRODUCT DETAIL === */
.product-detail {
    padding: var(--space-3xl) 0;
}

.product-detail__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-3xl);
}

.product-detail__gallery {
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
}

/* Warping machine images are tall — allow natural sizing */
.product-detail__gallery--tall {
    aspect-ratio: auto;
}

.product-detail__gallery--tall img {
    object-fit: contain;
    max-height: 600px;
}

.product-detail__gallery img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
}

.product-detail__info h1 {
    margin-bottom: var(--space-md);
}

.product-detail__desc {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: var(--space-xl);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: var(--space-xl);
}

.specs-table th,
.specs-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.specs-table th {
    font-weight: 600;
    color: var(--color-primary);
    width: 40%;
    background: var(--color-surface-alt);
}

.product-detail__actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.related-products {
    padding-top: var(--space-3xl);
    border-top: 1px solid var(--color-border);
}

.related-products h2 {
    margin-bottom: var(--space-xl);
}

/* === FACTORY STATS === */
.factory-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
    max-width: 800px;
    margin: 0 auto var(--space-3xl);
}

.factory-stat {
    text-align: center;
    padding: var(--space-xl);
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.factory-stat__value {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-accent);
    display: block;
    margin-bottom: var(--space-xs);
}

.factory-stat__value small {
    font-size: 0.6em;
    color: var(--color-text-light);
}

.factory-stat__label {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* === FACTORY PHOTOS === */
.factory-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.factory-photo {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.factory-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.factory-photo:hover img {
    transform: scale(1.05);
}

.factory-photo span {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .factory-stats { grid-template-columns: 1fr; gap: var(--space-md); }
    .factory-photos { grid-template-columns: repeat(2, 1fr); }
}

/* === ABOUT PAGE === */
.about-page {
    padding: var(--space-3xl) 0;
}

.about-page__hero {
    text-align: center;
    padding: var(--space-3xl) 0;
    margin-bottom: var(--space-3xl);
}

.about-page__content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--space-3xl);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.capability-item {
    padding: var(--space-lg);
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-accent);
    font-weight: 500;
}

/* === CONTACT PAGE === */
.contact-page {
    padding: var(--space-3xl) 0;
}

.contact-page__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.form-group label {
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-primary);
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

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

.contact-channels {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-channel {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.contact-channel__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-channel__icon--zalo { background: #e6f0ff; color: #0068ff; }
.contact-channel__icon--email { background: #e6f8f0; color: var(--color-success); }
.contact-channel__icon--facebook { background: #e7edf5; color: #1877f2; }

.contact-channel__info h4 {
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.contact-channel__info p {
    font-size: 0.85rem;
    color: var(--color-text-light);
}

/* === ADMIN PAGE === */
.admin-page {
    padding: var(--space-3xl) 0;
    min-height: 80vh;
}

.admin-login {
    max-width: 400px;
    margin: var(--space-4xl) auto;
    text-align: center;
}

.admin-login h2 {
    margin-bottom: var(--space-xl);
}

.admin-panel {
    display: none;
}

.admin-panel--active {
    display: block;
}

.admin-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--color-border);
    padding-bottom: var(--space-sm);
}

.admin-tab {
    padding: 8px 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
}

.admin-tab--active {
    background: var(--color-accent);
    color: var(--color-primary);
}

.admin-product-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.admin-product-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface-alt);
    border-radius: var(--radius-md);
}

.admin-product-item__actions {
    display: flex;
    gap: var(--space-sm);
}

.admin-btn {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 500;
}

.admin-btn--edit {
    background: var(--color-secondary);
    color: var(--color-text-inv);
}

.admin-btn--delete {
    background: var(--color-error);
    color: white;
}

/* === FORM MESSAGES === */
.form-message {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-message--success {
    background: #e6f8f0;
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.form-message--error {
    background: #fde8e3;
    color: var(--color-error);
    border: 1px solid var(--color-error);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }

    .why-us__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .customization-highlight__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .header__nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .header__nav--open {
        display: flex;
    }

    .header__burger {
        display: flex;
    }

    .header__burger--open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .header__burger--open span:nth-child(2) {
        opacity: 0;
    }
    .header__burger--open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .categories__grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        gap: var(--space-lg);
    }

    .hero__stat-value {
        font-size: 1.2rem;
    }

    .why-us__grid {
        grid-template-columns: 1fr;
    }

    .customization-highlight__grid {
        grid-template-columns: 1fr;
    }

    .hero__rotating {
        font-size: 0.9rem;
    }

    .footer__grid {
        grid-template-columns: 1fr;
    }

    .contact-page__grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .hero {
        padding: var(--space-3xl) 0;
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .hero__actions {
        flex-direction: column;
    }

    .hero__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero__stats {
        flex-direction: column;
        gap: var(--space-md);
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
}

/* Particle dot */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(232, 168, 56, 0.3);
    border-radius: 50%;
    animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) translateX(50px); opacity: 0; }
}


/* ============================================================
   ADMIN MODAL
   ============================================================ */

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.modal-overlay--open {
    display: flex;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--color-border);
}

.modal__header h3 {
    margin: 0;
}

.modal__close {
    font-size: 1.5rem;
    color: var(--color-text-light);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

.modal__close:hover {
    color: var(--color-text);
}

.modal__body {
    padding: var(--space-lg) var(--space-xl);
    overflow-y: auto;
    flex: 1;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    padding: var(--space-lg) var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.modal-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-sm);
    flex-wrap: wrap;
}

.modal-tab {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 600;
    padding: var(--space-xs) var(--space-md);
    color: var(--color-text-light);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
}

.modal-tab:hover {
    color: var(--color-text);
}

.modal-tab--active {
    color: var(--color-accent);
    border-bottom: 2px solid var(--color-accent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

@media (max-width: 480px) {
    .modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   ADMIN INQUIRY CARDS
   ============================================================ */

.admin-inquiry-card {
    padding: var(--space-lg);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    transition: box-shadow var(--transition-fast);
}

.admin-inquiry-card:hover {
    box-shadow: var(--shadow-sm);
}

.admin-inquiry-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
}

.admin-inquiry-card__actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    flex-wrap: wrap;
    align-items: center;
}

.admin-status-select {
    font-family: var(--font-body);
    font-size: 0.8rem;
    padding: 4px 8px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
}

.admin-status-select:focus {
    border-color: var(--color-accent);
    outline: none;
}

.inquiry-filters {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */

.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    font-family: var(--font-body);
}

/* --- Trigger Button --- */

.chat-widget__trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-text-inv);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    position: relative;
    border: none;
    cursor: pointer;
}

.chat-widget__trigger svg {
    width: 24px;
    height: 24px;
}

.chat-widget__trigger:hover {
    background: var(--color-secondary);
    transform: scale(1.08);
}

.chat-widget__trigger--hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.chat-widget__badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: var(--radius-full);
    line-height: 1;
}

/* --- Panel --- */

.chat-widget__panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 400px;
    height: 560px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-base);
}

.chat-widget__panel--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* --- Header --- */

.chat-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--color-primary);
    color: var(--color-text-inv);
    flex-shrink: 0;
}

.chat-widget__header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-widget__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.chat-widget__header-title {
    font-weight: 600;
    font-size: 0.9rem;
}

.chat-widget__header-sub {
    font-size: 0.75rem;
    opacity: 0.7;
}

.chat-widget__close {
    background: none;
    border: none;
    color: var(--color-text-inv);
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.chat-widget__close:hover {
    opacity: 1;
}

.chat-widget__close svg {
    width: 20px;
    height: 20px;
}

/* --- Messages Area --- */

.chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-widget__messages::-webkit-scrollbar {
    width: 4px;
}

.chat-widget__messages::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

/* --- Welcome --- */

.chat-widget__welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 8px;
    gap: 12px;
}

.chat-widget__welcome-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
}

.chat-widget__welcome-text {
    font-size: 0.85rem;
    color: var(--color-text-light);
    line-height: 1.5;
}

.chat-widget__starters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.chat-widget__starter {
    text-align: left;
    padding: 10px 14px;
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.chat-widget__starter:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

/* --- Message Bubbles --- */

.chat-widget__msg {
    display: flex;
    gap: 8px;
    max-width: 92%;
}

.chat-widget__msg--user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-widget__msg--assistant {
    align-self: flex-start;
}

.chat-widget__msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.chat-widget__msg-bubble {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: 0.84rem;
    line-height: 1.55;
}

.chat-widget__msg--user .chat-widget__msg-bubble {
    background: var(--color-primary);
    color: var(--color-text-inv);
    border-bottom-right-radius: 4px;
}

.chat-widget__msg--assistant .chat-widget__msg-bubble {
    background: var(--color-surface-alt);
    color: var(--color-text);
    border-bottom-left-radius: 4px;
}

.chat-widget__msg-bubble h3,
.chat-widget__msg-bubble h4 {
    margin: 8px 0 4px;
    font-size: 0.85rem;
}

.chat-widget__msg-bubble ul,
.chat-widget__msg-bubble ol {
    margin: 4px 0;
    padding-left: 18px;
}

.chat-widget__msg-bubble li {
    margin-bottom: 2px;
}

.chat-widget__msg-bubble p {
    margin: 4px 0;
}

.chat-widget__msg-bubble p:first-child {
    margin-top: 0;
}

.chat-widget__msg-bubble p:last-child {
    margin-bottom: 0;
}

.chat-widget__msg-bubble code {
    background: rgba(0,0,0,0.06);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.chat-widget__msg-bubble pre {
    background: var(--color-primary);
    color: var(--color-text-inv);
    padding: 10px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    margin: 6px 0;
    font-size: 0.78rem;
}

.chat-widget__msg-bubble strong {
    font-weight: 600;
}

/* --- Typing / Cursor --- */

.chat-widget__typing {
    display: inline-flex;
    gap: 4px;
    padding: 4px 0;
}

.chat-widget__typing::before,
.chat-widget__typing::after,
.chat-widget__typing {
    content: '';
}

.chat-widget__typing::before,
.chat-widget__typing::after {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-text-light);
    animation: chatTyping 1.2s infinite;
}

.chat-widget__typing::before { animation-delay: 0s; }
.chat-widget__typing::after { animation-delay: 0.4s; }

@keyframes chatTyping {
    0%, 60%, 100% { opacity: 0.3; transform: scale(0.8); }
    30% { opacity: 1; transform: scale(1); }
}

.chat-widget__cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--color-accent);
    animation: chatBlink 0.8s infinite;
    margin-left: 2px;
    vertical-align: text-bottom;
}

@keyframes chatBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.chat-widget__error {
    color: var(--color-error);
    font-size: 0.82rem;
}

/* --- Input Area --- */

.chat-widget__input-area {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    flex-shrink: 0;
}

.chat-widget__input {
    flex: 1;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    font-size: 0.84rem;
    font-family: var(--font-body);
    resize: none;
    outline: none;
    max-height: 100px;
    line-height: 1.4;
    transition: border-color var(--transition-fast);
}

.chat-widget__input:focus {
    border-color: var(--color-accent);
}

.chat-widget__input::placeholder {
    color: var(--color-text-light);
}

.chat-widget__send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.chat-widget__send svg {
    width: 18px;
    height: 18px;
}

.chat-widget__send:hover {
    background: var(--color-accent-hover);
    transform: scale(1.05);
}

.chat-widget__send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* --- Mobile --- */

@media (max-width: 480px) {
    .chat-widget__panel {
        width: calc(100vw - 16px);
        height: calc(100vh - 80px);
        bottom: 8px;
        right: 8px;
        border-radius: var(--radius-md);
    }

    .chat-widget__trigger {
        bottom: 0;
        right: 0;
    }
}

/* Shift floating-contact up to make room for chat trigger */
.floating-contact {
    bottom: 90px;
}

/* ============================================================
   PARTS EXPLORER PAGE
   ============================================================ */

.parts-page {
    padding: var(--space-3xl) 0 var(--space-4xl);
}

.parts-page .section-subtitle {
    color: var(--color-text-light);
    font-size: 1.05rem;
    margin-top: var(--space-sm);
}

/* --- Search --- */

.parts-search {
    position: relative;
    max-width: 520px;
    margin: var(--space-xl) auto var(--space-lg);
}

.parts-search__icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--color-text-light);
    pointer-events: none;
}

.parts-search__input {
    width: 100%;
    padding: 12px 40px 12px 44px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: var(--color-surface);
}

.parts-search__input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(232, 168, 56, 0.15);
}

.parts-search__clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.parts-search__clear:hover {
    color: var(--color-text);
}

/* --- Vehicle Tabs --- */

.parts-tabs {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.parts-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-md) var(--space-xl);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-base);
    min-width: 160px;
    position: relative;
}

.parts-tab:hover {
    border-color: var(--color-accent);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.parts-tab--active {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    box-shadow: var(--shadow-md);
}

.parts-tab__icon {
    width: 48px;
    height: 48px;
    color: var(--color-secondary);
}

.parts-tab--active .parts-tab__icon {
    color: var(--color-primary);
}

.parts-tab__icon svg {
    width: 100%;
    height: 100%;
}

.parts-tab__label {
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--color-text);
    text-align: center;
    line-height: 1.3;
}

.parts-tab__count {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--color-primary);
    color: var(--color-text-inv);
    padding: 2px 10px;
    border-radius: var(--radius-full);
}

.parts-tab--active .parts-tab__count {
    background: var(--color-accent);
    color: var(--color-primary);
}

/* --- Toolbar --- */

.parts-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    padding: 0 var(--space-xs);
}

.parts-toolbar__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-family: var(--font-body);
    color: var(--color-text-light);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.parts-toolbar__btn:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
}

.parts-toolbar__stats {
    font-size: 0.82rem;
    color: var(--color-text-light);
    font-weight: 500;
}

/* --- Vehicle Panels --- */

.parts-panel {
    display: none;
}

.parts-panel--active {
    display: block;
}

.parts-panel__desc {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: var(--space-lg);
    text-align: center;
}

/* --- System Cards --- */

.system-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-fast);
}

.system-card:hover {
    box-shadow: var(--shadow-sm);
}

.system-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface-alt);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    text-align: left;
    transition: background var(--transition-fast);
}

.system-card__header:hover {
    background: var(--color-border);
}

.system-card__icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.system-card__icon svg {
    width: 100%;
    height: 100%;
}

.system-card__info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.system-card__name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--color-text);
}

.system-card__badge {
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--color-primary);
    color: var(--color-text-inv);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.system-card__chevron {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--color-text-light);
    transition: transform var(--transition-fast);
}

.system-card__chevron svg {
    width: 100%;
    height: 100%;
}

.system-card--open .system-card__chevron {
    transform: rotate(180deg);
}

.system-card__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.system-card--open .system-card__body {
    max-height: 2000px;
}

/* --- Parts List --- */

.parts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.parts-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: 10px var(--space-lg) 10px calc(var(--space-lg) + 32px + var(--space-md));
    border-top: 1px solid var(--color-border);
    font-size: 0.88rem;
    transition: background var(--transition-fast);
}

.parts-list__item:hover {
    background: var(--color-accent-light);
}

.parts-list__name {
    flex: 1;
    color: var(--color-text);
    line-height: 1.4;
}

.parts-list__tags {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.parts-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.parts-tag--wear {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.parts-tag--link {
    background: var(--color-accent-light);
    color: var(--color-primary);
    border: 1px solid var(--color-accent);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.parts-tag--link:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

/* --- No Results --- */

.parts-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-3xl) 0;
    color: var(--color-text-light);
}

.parts-no-results svg {
    width: 80px;
    height: 80px;
}

/* --- CTA --- */

.parts-cta {
    text-align: center;
    margin-top: var(--space-3xl);
    padding: var(--space-xl) var(--space-lg);
    background: var(--color-surface-alt);
    border-radius: var(--radius-lg);
}

.parts-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

/* --- Responsive --- */

@media (max-width: 768px) {
    .parts-tabs {
        gap: var(--space-sm);
    }

    .parts-tab {
        min-width: 0;
        flex: 1;
        padding: var(--space-sm) var(--space-md);
    }

    .parts-tab__icon {
        width: 36px;
        height: 36px;
    }

    .parts-tab__label {
        font-size: 0.75rem;
    }

    .parts-list__item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding-left: var(--space-lg);
    }

    .parts-list__tags {
        justify-content: flex-start;
    }

    .system-card__header {
        padding: var(--space-sm) var(--space-md);
    }
}

@media (max-width: 480px) {
    .parts-tab__icon {
        width: 28px;
        height: 28px;
    }

    .parts-tab__label {
        font-size: 0.7rem;
    }

    .parts-tab__count {
        font-size: 0.65rem;
    }
}
