/* ============================
   RESET & CƠ BẢN
============================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
img { max-width: 100%; }
a { text-decoration: none; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }
.container { max-width: 1240px; }

p, li {
  font-size: 17px;
  color: #363636;
  line-height: 1.7;
}
h1, h2, h3, h4, h5, h6 {
  line-height: 1.7;
  font-weight: bold;
  text-transform: capitalize;
}

/* ============================
   HEADER & NAVBAR
============================ */
.navbar-brand {
  margin-right: 20px;
  display: flex;
  align-items: center;
}
.navbar-brand img {
  height: 60px;
  width: auto;
  max-width: none;
}

/* Menu chính */
.navbar-nav .nav-link {
  color: #000;
  padding: 10px 25px;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* Icon shop */
.shop-icon > ul {
  display: flex;
  align-items: center;
  gap: 10px;
}
.shop-icon ul li a {
  color: #000;
  font-size: 22px;
}

/* ============================
   SEARCH BOX
============================ */
.search-wrapper { margin: 0 15px; position: relative; }
#searchInput {
  width: 220px;
  height: 40px;
  font-size: 14px;
  padding-left: 15px;
  border-radius: 50px 0 0 50px;
}
#searchInput:focus { border-color: #ff7a59; outline: none; }

#searchBtn {
  height: 40px;
  background: linear-gradient(135deg, #ff7a59, #ffb86b);
  color: white;
  border: none;
  padding: 0 20px;
  border-radius: 0 50px 50px 0;
  display: flex;
  align-items: center;
  transition: .3s;
}
#searchBtn:hover { transform: translateX(2px); }

/* Search results dropdown */
.search-container { position: relative; display: inline-block; }
.search-results {
  position: absolute;
  top: 110%;
  left: 0;
  width: 280px;
  max-height: 320px;
  overflow-y: auto;
  display: none;
  background: white;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.15);
  z-index: 9999;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: 0.2s;
}
.search-item:hover { background: #f8f8f8; }
.search-item img {
  width: 50px;
  height: 35px;
  object-fit: contain;
}
.search-item .name { font-weight: 600; font-size: 14px; color: #222; }
.search-item .price { font-size: 13px; color: #e63946; }

/* ============================
   SLIDER / BANNER
============================ */
.carousel-item { height: 100vh; }
.carousel-item img {
  height: 100%;
  object-fit: cover;
  transition: transform 4s ease;
}
.carousel-item.active img { transform: scale(1.05); }

.slider-content {
  position: absolute;
  top: 25%;
  left: 5%;
  max-width: 480px;
  background: rgba(0, 0, 0, 0.65);
  padding: 30px;
  border-radius: 20px;
  color: white;
  z-index: 10;

  animation: fadeSlideIn 1s ease-out forwards;
  opacity: 0;
}

.slider-content h6 {
  text-transform: uppercase;
  font-size: 14px;
  color: #ccc;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.slider-content h1 { font-size: 48px; font-weight: 800; margin-bottom: 10px; }
.slider-content h2 { font-size: 24px; margin-bottom: 15px; }
.slider-content p {
  font-size: 16px;
  line-height: 1.6;
  color: #eee;
  margin-bottom: 30px;
}

/* Button */
.btn,
.btn.btn-custom {
  padding: 12px 30px;
  background: linear-gradient(135deg, #ff4f5a, #ffb347);
  color: white;
  border: none;
  border-radius: 50px;
  font-weight: bold;
  box-shadow: 0 8px 16px rgba(255, 79, 90, 0.3);
  transition: 0.3s;
}
.btn:hover {
  background: linear-gradient(135deg, #ffb347, #ff4f5a);
  transform: scale(1.05);
  box-shadow: 0 12px 24px rgba(255, 79, 90, 0.4);
}

/* Animation */
@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateX(-50px); }
  100% { opacity: 1; transform: translateX(0); }
}
body { animation: fadeInBody 1s ease-in; }
@keyframes fadeInBody {
  from { opacity: 0; }
  to { opacity: 1; }
}

html { scroll-behavior: smooth; }
/* ============================
   SẢN PHẨM / CARD
============================ */
.img-fixed {
  height: 180px;
  width: 100%;
  object-fit: contain;
  background-color: #ffffff;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img-top {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.card img {
  transition: transform 0.4s ease;
}
.card:hover img {
  transform: scale(1.05);
}

/* ============================
   PADDING CÓ SẴN
============================ */
.pt-6 { padding-top: 70px; }
.pb-6 { padding-bottom: 70px; }

/* ============================
   LOGO CỐ ĐỊNH TRÊN TRANG
============================ */
.logo-home {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 9999;
}
.logo-home img {
  width: 60px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  transition: 0.3s;
}
.logo-home img:hover {
  transform: scale(1.1);
  opacity: 0.9;
}

/* ============================
   ABOUT / GIỚI THIỆU
============================ */
.hero {
  background: url('web-images/nenhome1.jpg') center/cover no-repeat;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.hero-content { position: relative; z-index: 1; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 15px; }
.hero-content p { font-size: 1.3rem; margin-bottom: 20px; }

.btn-primary {
  background: linear-gradient(45deg, #ff4b2b, #ff416c);
  padding: 12px 28px;
  color: #fff;
  font-weight: bold;
  border-radius: 30px;
  transition: 0.3s;
}
.btn-primary:hover { opacity: 0.85; }

/* Intro */
.intro {
  max-width: 1100px;
  margin: 60px auto;
  text-align: center;
  padding: 0 20px;
}
.intro h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #1d3557;
}
.intro p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.7;
}

/* Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 60px auto;
  padding: 0 20px;
}
.feature-box {
  background: #fff;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  text-align: center;
  transition: 0.3s;
}
.feature-box:hover { transform: translateY(-8px); }
.feature-box i {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: #ff4b2b;
}

/* ============================
   DỊCH VỤ – GIỚI THIỆU
============================ */
.intro-section { padding: 60px 0; background: #fff; }
.intro-title {
  font-size: 3.5rem;
  font-weight: 900;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 1.5rem;
  letter-spacing: 1px;
}
.intro-desc {
  font-size: 1.1rem;
  color: #666;
  line-height: 1.6;
}
.intro-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  object-fit: cover;
}

.breadcrumb-link {
  font-size: 14px;
  color: #999;
  margin-bottom: 10px;
  display: block;
  font-weight: 600;
  text-transform: uppercase;
}

/* Card dịch vụ */
.service-card {
  transition: 0.3s;
  border-radius: 15px;
  background: #fff;
  min-height: 100%;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(255,122,89,0.15);
}
.service-icon {
  width: 60px;
  height: 60px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,#ff7a59,#ffb86b);
  color: #fff;
  font-size: 24px;
  margin-bottom: 1rem;
}
.service-card .btn-link {
  text-decoration: none;
  font-weight: 700;
  color: #ff7a59;
  transition: .3s;
}
.service-card:hover .btn-link { color: #d14d2e; padding-left: 5px; }

.btn-gradient {
  background: linear-gradient(135deg,#ff7a59,#ffb86b);
  color: #fff;
  padding: 10px 25px;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  transition: .3s;
}
.btn-gradient:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px rgba(255,120,80,0.3);
}

/* WHY CHOOSE US */
.trust-section { padding: 80px 0; background: #fff; margin-top: 60px; }
.trust-item { text-align: center; padding: 20px; }
.trust-icon {
  font-size: 45px;
  background: -webkit-linear-gradient(#ff7a59,#ffb86b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================
   TIMELINE – QUY TRÌNH
============================ */
.hover-card {
  transition: 0.3s ease;
  border: 1px solid #eee;
}
.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1)!important;
  border-color: #000;
}

.timeline-step {
  position: relative;
  z-index: 2;
  background: white;
  width: 200px;
}

.timeline-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  max-width: 900px;
  margin: 0 auto;
}

.timeline-line {
  position: absolute;
  top: 50%;
  width: 100%;
  height: 2px;
  background: #ddd;
  z-index: 1;
  transform: translateY(-50%);
}

.bg-orange-branding {
  background: linear-gradient(135deg,#ff7a59,#ffb86b) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 10px 20px rgba(255,120,80,0.3);
}

/* ============================
   PARTNER LOGO
============================ */
.partner-logo { transition: 0.3s ease; cursor: pointer; }
.partner-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  padding: 5px;
  border-radius: 15px;
  background: #fff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  transition: 0.3s ease;
}
.partner-item img:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
  border-color: #ff7a59;
}
/* =============================================
   HEADER GRID (MENU GIỮA – SEARCH PHẢI)
============================================= */
.header-grid {
  display: grid;
  grid-template-columns: 1fr max-content 1fr;
  align-items: center;
  width: 100%;
  gap: 20px;
  height: 80px;
}

.header-left { justify-self: start; }
.header-center { justify-self: center; }
.header-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 25px;
  padding-right: 10px;
}

.header-center .navbar-nav {
  flex-direction: row;
  gap: 5px;
}
.header-center .nav-link {
  font-size: 16px;
  padding: 10px 15px;
  font-weight: 700;
  color: #333;
}

/* Tắt menu mobile trên PC */
@media (min-width: 992px) {
  .navbar-toggler,
  #mainMenuMobile {
    display: none !important;
  }
}

/* Màn hình laptop nhỏ 1200–1300px */
@media (max-width: 1300px) {
  #searchInput { width: 180px; }
  .header-center .nav-link {
    padding: 10px 10px;
    font-size: 15px;
  }
  .header-grid { gap: 10px; }
}

/* =============================================
   DROPDOWN ĐẸP – MÀU TRẮNG → CAM
============================================= */
.header .dropdown-menu {
  background: #ffffff !important;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 0;
  margin-top: 15px !important;
  min-width: 220px;
  z-index: 9999;
}
.header .dropdown-menu.show {
  display: block;
  animation: fadeInUp 0.3s ease;
}
.header .dropdown-menu .dropdown-item {
  color: #333 !important;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 1px solid #f0f0f0;
  transition: 0.2s;
}
.header .dropdown-menu li:last-child .dropdown-item {
  border-bottom: none;
}
.header .dropdown-menu .dropdown-item:hover {
  background: linear-gradient(135deg,#ff7a59,#ffb86b) !important;
  color: #fff !important;
  padding-left: 25px;
}

/* Fix lệch dropdown - ĐÃ SỬA */
.shop-icon .nav-item.dropdown,
.navbar-nav .nav-item.dropdown {
  position: relative; /* "Ghim" menu con vào đúng nút cha */
}

.shop-icon .dropdown-menu { right: 0; left: auto; } /* Menu icon bên phải thì xổ sang trái */
.navbar-nav .dropdown-menu { left: 0; right: auto; } /* Menu chính bên trái thì xổ sang phải */
/* Animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   STICKY HEADER
============================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  width: 100%;
  transition: 0.3s ease;
}

/* =============================================
   FOOTER – NỀN TRẮNG SANG TRỌNG
============================================= */
.footer-section {
  background: #ffffff;
  color: #444;
  padding: 60px 0 30px;
  font-size: 15px;
  border-top: 5px solid #ff7a59;
}
.footer-heading {
  color: #000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.footer-links li { margin-bottom: 12px; }
.footer-links a,
.contact-info a {
  color: #555;
  transition: 0.3s;
  display: inline-block;
}
.footer-links a:hover,
.contact-info a:hover {
  color: #ff7a59;
  transform: translateX(5px);
}

/* Icon cam thương hiệu */
.text-orange {
  color: #ff7a59 !important;
  background: -webkit-linear-gradient(#ff7a59,#ffb86b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
i.text-orange {
  background: none;
  -webkit-text-fill-color: initial;
  color: #ff7a59 !important;
}

/* Social */
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #f0f0f0;
  color: #333;
  border-radius: 50%;
  margin-left: 10px;
  transition: 0.3s;
}
.social-icons a:hover {
  background: linear-gradient(135deg,#ff7a59,#ffb86b);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255,122,89,0.3);
}

/* =============================================
   RESPONSIVE CHO MOBILE / TABLET
============================================= */
@media screen and (max-width: 768px) {
  .slider-content {
    max-width: 90%;
    left: 5%;
    top: 10%;
    padding: 20px;
  }

  .slider-content h6 { font-size: 14px; }
  .slider-content h1 { font-size: 28px; line-height: 1.3; }
  .slider-content h2 { font-size: 18px; line-height: 1.4; }
  .slider-content p { font-size: 14px; line-height: 1.5; }

  .btn { font-size: 14px; padding: 10px 24px; }
  .navbar-nav .nav-link { font-size: 16px; }
  .search-icon,
  .shop-icon ul li a { font-size: 18px; }

  .header-grid {
    display: flex;
    justify-content: space-between;
  }
}
/* ============================
   NÚT SCROLL TO TOP (LÊN ĐẦU TRANG)
============================ */
#scrollToTopBtn {
  display: none; /* Mặc định ẩn, JS sẽ bật lên khi cuộn */
  position: fixed; /* Cố định vị trí so với màn hình */
  bottom: 30px;
  right: 30px;
  z-index: 1030; /* Cao hơn các phần tử khác */
  
  /* Style giao diện */
  width: 50px;
  height: 50px;
  border: none;
  outline: none;
  background: linear-gradient(135deg, #ff7a59, #ffb86b); /* Màu cam chủ đạo */
  color: white;
  border-radius: 50%; /* Bo tròn thành hình tròn */
  font-size: 20px;
  cursor: pointer;
  
  /* Căn giữa icon mũi tên */
  align-items: center;
  justify-content: center;
  
  /* Hiệu ứng bóng đổ */
  box-shadow: 0 4px 15px rgba(255, 122, 89, 0.4);
  transition: all 0.3s ease;
}

#scrollToTopBtn:hover {
  background: linear-gradient(135deg, #ffb86b, #ff7a59); /* Đảo màu khi di chuột */
  transform: translateY(-5px); /* Nút bay lên nhẹ */
  box-shadow: 0 8px 20px rgba(255, 122, 89, 0.6);
}
/* =================================================
   FIX LỖI NHẢY HEADER & CHEN HÀNG (BẢN CHUẨN)
================================================= */

/* 1. Giữ nguyên cấu hình chống nhảy layout */
html { overflow-y: scroll; }
.header-center { flex-shrink: 0; width: auto; }

/* Tạo điểm tựa cho menu con */
.navbar-nav .nav-item.dropdown,
.shop-icon .nav-item.dropdown {
  position: relative;
}

/* 2. Cấu hình chung cho kích thước và vị trí */
.navbar-nav .dropdown-menu,
.shop-icon .dropdown-menu {
  position: absolute !important; /* Tách khỏi dòng chảy văn bản */
  top: 100% !important;
  margin-top: 15px !important;
  width: max-content;
  min-width: 220px;
  z-index: 9999;
}

/* 3. PHÂN BIỆT HƯỚNG MỞ (Sửa lỗi bị khuất màn hình ở đây) */

/* Menu "Danh mục xe" (Bên trái) -> Canh trái, mở sang phải */
.navbar-nav .dropdown-menu {
  left: 0 !important;
  right: auto !important;
}

/* Menu "Dịch vụ/Cài đặt" (Bên phải) -> Canh phải, mở sang trái (vào trong) */
.shop-icon .dropdown-menu {
  right: 0 !important;
  left: auto !important;
}
/* =================================================
   KHUNG GỢI Ý TÌM KIẾM (SEARCH SUGGESTION BOX)
================================================= */
/* --- Live Search Suggestion (Giống FPT Shop) --- */
.search-wrapper {
  position: relative; /* Để khung gợi ý bám theo ô input */
}

#searchResults {
  display: none; /* Mặc định ẩn */
  position: absolute;
  top: 100%; /* Nằm ngay dưới ô input */
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 0 0 8px 8px; /* Bo tròn góc dưới */
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 9999;
  overflow: hidden;
  border: 1px solid #eee;
  border-top: none;
}

/* Tiêu đề nhóm (ví dụ: Sản phẩm đề xuất) */
.suggest-header {
  background-color: #f8f9fa;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #eee;
}

/* Từng dòng sản phẩm */
.suggest-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: #333;
  transition: background 0.2s;
  border-bottom: 1px solid #f1f1f1;
}

.suggest-item:hover {
  background-color: #f0f8ff; /* Màu xanh nhạt khi di chuột vào */
}

.suggest-item:last-child {
  border-bottom: none;
}

/* Ảnh sản phẩm nhỏ */
.suggest-item img {
  width: 50px;
  height: 35px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 12px;
  border: 1px solid #ddd;
}

/* Thông tin text */
.suggest-info h4 {
  font-size: 14px;
  margin: 0 0 2px 0;
  font-weight: 500;
  color: #000;
}

.suggest-info span {
  font-size: 13px;
  color: #dc3545; /* Màu đỏ cho giá */
  font-weight: bold;
}

/* Nút xem tất cả ở cuối */
.view-all-results {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 14px;
  color: #0d6efd;
  font-weight: 600;
  text-decoration: none;
  background: #fff;
}
.view-all-results:hover {
  background: #f8f9fa;
  text-decoration: underline;
}
/* =================================================
   DANH MỤC HÃNG XE (BRAND CATEGORY)
================================================= */
/* --- Style Danh Mục Logo (Minimalist) --- */
.brand-card {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  border: 1px solid #eee;
  text-decoration: none;
  transition: all 0.3s ease;
  height: 90px; /* Chiều cao cố định cho ô để đều nhau */
}

/* Kích thước Logo - Quan trọng */
.brand-card img {
  height: 45px;      /* Ép chiều cao cố định -> Logo sẽ đều tăm tắp */
  width: auto;       /* Chiều rộng tự động theo tỉ lệ */
  max-width: 100%;   /* Không bao giờ tràn ô */
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.8;
  transition: all 0.3s ease;
}

/* Hiệu ứng Hover */
.brand-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
  border-color: #dc3545;
}

.brand-card:hover img {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.15); /* Phóng to logo nhẹ khi hover */
}