/*
 * GTR Auto Main Theme Stylesheet
 * Built with Japanese Automotive Precision design tokens
 */

/* 1. Reset & Global Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--gtr-font-base);
    background-color: var(--gtr-bg-light);
    color: var(--gtr-text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Material Symbols Outlined Alignment */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* 2. Color Utility Classes */
.bg-bg-dark { background-color: var(--gtr-bg-dark) !important; }
.bg-surface-dark { background-color: var(--gtr-surface-dark) !important; }
.bg-surface-dark-alt { background-color: var(--gtr-surface-dark-alt) !important; }
.bg-bg-light { background-color: var(--gtr-bg-light) !important; }
.bg-bg-soft { background-color: var(--gtr-bg-soft) !important; }
.bg-surface-container { background-color: var(--gtr-surface-container) !important; }
.bg-accent-red { background-color: var(--gtr-primary) !important; }
.hover\:bg-accent-hover:hover { background-color: var(--gtr-primary-hover) !important; }

.text-accent-red { color: var(--gtr-primary-container) !important; }
.text-text-dark { color: var(--gtr-text-dark) !important; }
.text-text-light { color: var(--gtr-text-light) !important; }
.text-text-muted { color: var(--gtr-text-muted) !important; }
.text-text-muted-dark { color: var(--gtr-text-muted-dark) !important; }
.text-status-success { color: var(--gtr-status-success) !important; }

.border-border-dark { border-color: var(--gtr-border-dark) !important; }
.border-border-light { border-color: var(--gtr-border-light) !important; }
.border-accent-red { border-color: var(--gtr-primary) !important; }

/* 3. Layout, Container & Grid */
.max-w-\[1320px\] { max-width: 1320px; }
.max-w-\[1240px\] { max-width: 1240px; }
.mx-auto { margin-left: auto; margin-right: auto; }

.aspect-\[16\/10\] { aspect-ratio: 16 / 10; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm\:flex-row { flex-direction: row; }
}
@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:w-1\/3 { width: 33.333333%; }
    .md\:w-2\/3 { width: 66.666667%; }
    .md\:w-5\/12 { width: 41.666667%; }
}
@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .lg\:grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .lg\:col-span-3 { grid-column: span 3 / span 3; }
    .lg\:col-span-4 { grid-column: span 4 / span 4; }
    .lg\:col-span-5 { grid-column: span 5 / span 5; }
    .lg\:col-span-7 { grid-column: span 7 / span 7; }
    .lg\:col-span-8 { grid-column: span 8 / span 8; }
}

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

/* 4. Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-7 { padding-left: 1.75rem; padding-right: 1.75rem; }
@media (min-width: 1024px) {
    .lg\:px-12 { padding-left: 3rem; padding-right: 3rem; }
    .lg\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .lg\:py-16 { padding-top: 4rem; padding-bottom: 4rem; }
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

/* 5. Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.uppercase { text-transform: uppercase; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 6. Form Elements */
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
    width: 100%;
    font-family: inherit;
    border: 1px solid var(--gtr-border-light);
    border-radius: var(--gtr-radius-sm);
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    transition: border-color 0.15s ease-in-out;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--gtr-primary);
}

/* 7. Swipe Carousel Track */
.gtr-carousel-track {
    scrollbar-width: thin;
    scrollbar-color: var(--gtr-primary) transparent;
}
.gtr-carousel-track::-webkit-scrollbar {
    height: 4px;
}
.gtr-carousel-track::-webkit-scrollbar-thumb {
    background-color: var(--gtr-primary);
    border-radius: 4px;
}

/* 8. Light & Dark Themes Support */
.gtr-theme-dark {
    background-color: var(--gtr-bg-dark);
    color: var(--gtr-text-light);
}
.gtr-theme-light {
    background-color: var(--gtr-bg-light);
    color: var(--gtr-text-dark);
}
