/* --- THIẾT LẬP CHUNG --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f4f4;
    overflow-x: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 75px;
    height: 100vh;
    background-color: #111;
    display: flex;
    flex-direction: column;
    z-index: 1001;
}

.sidebar-item {
    color: #888;
    text-align: center;
    padding: 25px 5px;
    font-size: 10px;
    border-bottom: 1px solid #222;
    cursor: pointer;
    transition: 0.3s ease;
}

.sidebar-item i {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.sidebar-item.active, .sidebar-item:hover {
    background-color: #c4161c;
    color: white;
}

/* --- HEADER --- */
.main-header {
    position: fixed;
    top: 0;
    left: 75px;
    right: 0;
    height: 70px;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 1000;
}

.logo img { height: 45px; }

.navbar ul { display: flex; list-style: none; }

.navbar ul li a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: 0.3s;
}

.navbar ul li a:hover { color: #c4161c; }

.hotline button {
    background-color: #c4161c;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
}

/* --- NỘI DUNG --- */
.content-wrapper {
    margin-left: 75px;
    margin-top: 70px;
}

/* --- HERO BANNER & SLIDESHOW --- */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px; /* Nâng cao tỉ lệ banner */
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
}

.slideshow-container {
    position: absolute;
    width: 100%; height: 100%; top: 0; left: 0;
}

.slide {
    position: absolute;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: fadeEffect 15s infinite;
}

.slide::after {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35);
}

.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }

@keyframes fadeEffect {
    
    5% { opacity: 1; }                        /* Fade in mượt trong 0.75s đầu */
    33% { opacity: 1; transform: scale(1); }  /* Giữ hiển thị và thu nhỏ dần về chuẩn */
    38% { opacity: 0; }                       /* Fade out mượt sang ảnh tiếp theo */
    100% { opacity: 0; }
}

.banner-text {
    position: relative;
    z-index: 5;
    color: white;
    padding-left: 60px;
}

.banner-text h1 { font-size: 50px; font-weight: 800; text-transform: uppercase; }
.banner-text h1 span { color: #c4161c; }

/* --- SERVICE ACTIONS (FIXED PROPORTIONS) --- */
.service-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: -50px 60px 0 60px; /* Đè lên banner chuẩn mẫu */
    position: relative;
    z-index: 10;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.action-box {
    padding: 35px;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.bg-dark { background-color: #222; }
.bg-medium { background-color: #333; }
.bg-red { background-color: #c4161c; }
.action-box:hover { filter: brightness(1.2); }

/* --- PRODUCT SECTION --- */
.product-section {
    padding: 80px 60px 40px 60px;
    text-align: center;
}

.main-title { color: #c4161c; font-size: 28px; margin-bottom: 10px; font-weight: 800; }
.main-subtitle { font-size: 14px; color: #666; margin-bottom: 50px; text-transform: uppercase; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: white;
    border: 1px solid #eee;
    padding-bottom: 25px;
    transition: 0.4s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

/* Kỹ thuật bọc ảnh để các xe thẳng hàng */
.img-box {
    width: 100%;
    height: 200px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-card h3 { font-size: 15px; margin: 15px 10px; color: #333; font-weight: 600; }
.price { color: #c4161c; font-weight: 800; font-size: 19px; }

/* --- CATEGORY SECTION --- */
.category-section {
    background-color: white;
    padding: 70px 0;
    text-align: center;
    border-top: 1px solid #eee;
}

.category-title { font-size: 24px; margin-bottom: 60px; font-weight: 800; color: #111; }

.category-list {
    display: flex;
    justify-content: center;
    align-items: flex-end; /* Quan trọng: chân các xe luôn thẳng hàng */
    gap: 45px;
    flex-wrap: wrap;
    padding: 0 50px;
}

.category-item { flex: 1; max-width: 180px; text-align: center; cursor: pointer; }

.cat-img { width: 100%; margin-bottom: 20px; transition: 0.3s; }
.category-item:hover .cat-img { transform: scale(1.5); }
.cat-img img { width: 100%; height: auto; }

.category-item p {
    font-size: 13px;
    font-weight: 800;
    color: #222;
    border-top: 2px solid #f8f8f8;
    padding-top: 15px;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .category-list { gap: 20px; }
}