@import 'variables.css';

/* =========================================
   Reset & Base
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   Utilities
   ========================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    /* Padding is handled in responsive files */
}

.text-accent {
    color: var(--color-accent-main);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-text-primary) 0%, var(--color-text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-main);
}

/* Typography Defaults */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
    font-weight: 700;
}

.section-title {
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-desc {
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* =========================================
   Header (Shared)
   ========================================= */
.disclaimer-bar {
    background-color: var(--color-accent-sub);
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
    text-align: center;
    font-weight: 500;
}

.main-header {
    background-color: rgba(5, 5, 5, 0.9);
    /* Darker for legibility */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu a {
    color: var(--color-text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
    padding: 0 8px;
}

/* Buttons */
.btn {
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-block;
    border: none;
}

.btn-primary {
    background-color: var(--color-accent-main);
    color: #000;
}

.btn-block {
    display: block;
    width: 100%;
}

/* =========================================
   Hero Section (Shared)
   ========================================= */
.hero-section {
    height: 80vh;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), #050505), url('../../images/hero_bg_real_1765352071867.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    line-height: 1.1;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    color: var(--color-text-primary);
    margin-bottom: 2.5rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* =========================================
   Vehicle Grid (Shared)
   ========================================= */
.showcase-section {
    padding: 100px 0;
}

.vehicle-grid {
    display: grid;
    gap: 30px;
}

.vehicle-card {
    background-color: var(--color-bg-card);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-smooth);
    position: relative;
    text-decoration: none;
    /* Make card clickable link style */
    display: block;
    color: inherit;
}

.card-image {
    height: 250px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-info {
    padding: 25px;
}

.card-model {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.card-slogan {
    font-size: 0.9rem;
    color: var(--color-accent-main);
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 600;
}

.card-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.stat-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.card-price {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: right;
    margin-top: 10px;
}

padding: 30px;
border-radius: 8px;
border: 1px solid var(--border-light);
}

.form-title,
.list-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--color-accent-sub);
    padding-bottom: 10px;
    display: inline-block;
}

.comment-form .form-group {
    margin-bottom: 15px;
}

.comment-form .form-group-row {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-form input,
.comment-form select,
.comment-form textarea {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--color-text-primary);
    padding: 12px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.comment-form input:focus,
.comment-form select:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--color-accent-main);
    background-color: rgba(0, 173, 181, 0.05);
}

.form-note {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 10px;
    text-align: center;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    padding-right: 10px;
}

.comment-item {
    background-color: var(--color-bg-glass);
    padding: 20px;
    border-radius: 8px;
    border-left: 3px solid var(--color-text-muted);
    transition: var(--transition-smooth);
}

.cmt-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.cmt-author {
    font-weight: 700;
    color: var(--color-text-primary);
}

.cmt-date {
    color: var(--color-text-muted);
    font-size: 0.8rem;
}

.cmt-model {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-accent-main);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-left: 10px;
}

.cmt-content {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    white-space: pre-line;
}

/* =========================================
   Detail Page specific
   ========================================= */
.detail-header {
    height: 400px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--color-bg-primary), transparent);
}

.detail-content {
    padding: 60px 0;
}

/* Footer (Shared) */
.main-footer {
    background-color: #000;
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-light);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* =========================================
   UI Components (Toast & Modal)
   ========================================= */

/* Toast Notification */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: rgba(15, 15, 15, 0.95);
    color: #fff;
    padding: 12px 25px;
    border-radius: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    border-left: 4px solid #00c851;
}

.toast.error {
    border-left: 4px solid #ff4444;
}

.toast.info {
    border-left: 4px solid #33b5e5;
}

.toast.warning {
    border-left: 4px solid #ffbb33;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #111;
    border: 1px solid #333;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.95);
    transition: all 0.3s;
    position: relative;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.4rem;
    color: #fff;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #444;
}