/* ══════════════════════════════════════════════════
   AUTOMART — style.css
   ══════════════════════════════════════════════════ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary:       #1a1a1a;
  --bg-surface:       #ffffff;
  --text-primary:     #1a1a1a;
  --accent-primary:   #c8a96e;
  --accent-secondary: #d4b97e;
  --accent-dark:      #a8893e;
  --price-color:      #c8722a;
}

html, body {
  height: 100%; width: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  min-height: 100%; width: 100%;
  background: #f5f5f0; overflow-x: hidden;
}

/* ══════════════════════════════════════════════════
   HEADER  —  partials/header.html
   ══════════════════════════════════════════════════ */
.header {
  background: var(--bg-primary);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.nav-container {
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 68px;
}
.logo { font-size: 24px; font-weight: 800; color: #fff; text-decoration: none; letter-spacing: -0.5px; flex-shrink: 0; }
.logo-accent { color: var(--accent-primary); }
.nav-menu { display: flex; list-style: none; gap: 28px; align-items: center; }
.nav-link { color: rgba(255,255,255,0.85); text-decoration: none; font-weight: 500; font-size: 15px; transition: color 0.2s; }
.nav-link:hover, .nav-link.active { color: var(--accent-primary); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; padding: 6px 8px; }

/* ══════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════ */
.btn {
  padding: 10px 20px; border-radius: 8px; font-weight: 600; font-size: 14px;
  cursor: pointer; border: none; transition: all 0.25s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px; line-height: 1; white-space: nowrap;
}
.btn-primary { background: var(--accent-primary); color: #fff; }
.btn-primary:hover { background: var(--accent-secondary); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(200,169,110,0.4); }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.btn-secondary:hover { background: rgba(255,255,255,0.18); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid #c8c8b8; border-radius: 20px; }
.btn-outline:hover { background: #f0efe8; border-color: #a8a898; }
.btn-white { background: #fff; color: var(--accent-primary); font-weight: 700; }
.btn-white:hover { background: var(--bg-primary); color: #fff; }
.btn-gray { background: #e2e8f0; color: var(--text-primary); }
.btn-gray:hover { background: #cbd5e1; }
.btn-small  { padding: 7px 14px;  font-size: 13px; }
.btn-large  { padding: 14px 28px; font-size: 16px; }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ''; position: absolute; width: 15px; height: 15px; top: 50%; left: 50%;
  margin: -7.5px 0 0 -7.5px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════
   HERO  —  partials/hero.html
   compact: text trái + SVG illustration phải
   ══════════════════════════════════════════════════ */
.hero {
  background: #2a2a2a;
  padding: 56px 24px; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(200,169,110,0.08) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hero-container {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 48px; position: relative;
}
.hero-content { flex: 1; max-width: 580px; }
.hero-content h1 { font-size: 44px; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 14px; letter-spacing: -0.8px; }
.hero-content p  { font-size: 16px; color: rgba(255,255,255,0.72); margin-bottom: 28px; line-height: 1.75; }
.hero-buttons    { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-illustration { flex-shrink: 0; opacity: 0.9; }
.hero-illustration img {
  filter: drop-shadow(0 8px 32px rgba(0,0,0,0.4));
  animation: heroFloat 3s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
/* ══════════════════════════════════════════════════
   STATS  —  partials/stats.html
   ══════════════════════════════════════════════════ */
.stats { background: var(--bg-surface); padding: 40px 24px; border-bottom: 1px solid #e2e8f0; }
.stats-container { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-item { text-align: center; }
.stat-number { font-size: 40px; font-weight: 800; color: var(--accent-primary); display: block; margin-bottom: 4px; letter-spacing: -1px; }
.stat-label  { font-size: 14px; color: #64748b; font-weight: 500; }

/* ══════════════════════════════════════════════════
   SECTION BASE
   ══════════════════════════════════════════════════ */
.section       { padding: 52px 24px; }
.section-white { background: var(--bg-surface); }
.section-gray  { background: #f5f5f0; }
.container     { max-width: 1280px; margin: 0 auto; }

/* section-header-row: title trái + "Xem thêm" phải */
.section-header-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.section-title {
  font-size: 22px; font-weight: 800; color: var(--text-primary); letter-spacing: -0.3px;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--accent-primary);
  display: inline-block;
}
.section-title-accent { color: var(--accent-primary); }

/* section-header: căn giữa — dùng cho services, testimonials, cta, brands */
.section-header { text-align: center; margin-bottom: 36px; }
.section-subtitle { font-size: 15px; color: #64748b; margin-top: 6px; }

/* ══════════════════════════════════════════════════
   HORIZONTAL SCROLL ROW  —  partials/cars.html
   ══════════════════════════════════════════════════ */
.scroll-row-wrapper { position: relative; }
.scroll-row {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px;
  scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.scroll-row::-webkit-scrollbar { display: none; }

.scroll-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid #deded4;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 10; font-size: 18px; color: #666660;
  transition: all 0.2s; user-select: none; font-weight: 600;
}
.scroll-arrow:hover { background: #f5f5f0; border-color: #b8b8a8; box-shadow: 0 4px 14px rgba(0,0,0,0.15); color: var(--text-primary); }
.scroll-arrow-left  { left: -19px; }
.scroll-arrow-right { right: -19px; }

/* ── Car Card (scroll row) ───────────────────────── */
.car-card {
  background: var(--bg-surface); border-radius: 12px; overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.06); border: 1px solid #eaeae0;
  transition: all 0.3s; display: flex; flex-direction: column;
  flex-shrink: 0; width: 230px;
}
.car-card:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,0.1); }

/* Placeholder dạng hình chữ X xám như thiết kế */
.car-image {
  height: 160px; background: #e0e0d8; position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.car-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; position: absolute; top:0; left:0; }
.car-card:hover .car-image img { transform: scale(1.04); }
.car-image-placeholder {
  width: 100%; height: 100%;
  background: #d8d8d0;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
/* Hình chữ X kiểu wireframe */
.car-image-placeholder::before,
.car-image-placeholder::after {
  content: '';
  position: absolute;
  width: 141%; height: 1px;
  background: #b8b8b0;
  top: 50%; left: -20%;
}
.car-image-placeholder::before { transform: rotate(calc(atan2(160px, 230px))); }
.car-image-placeholder::after  { transform: rotate(calc(-1 * atan2(160px, 230px))); }

/* Badge dạng price-tag đỏ góc trên trái */
.car-badge {
  position: absolute; top: 10px; left: 10px;
  background: #e03030; color: #fff;
  padding: 4px 10px 4px 8px;
  font-size: 10px; font-weight: 700;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
  letter-spacing: 0.3px; line-height: 1.4;
  min-width: 52px; text-align: center;
}
.car-badge-featured {
  background: var(--accent-primary); color: #fff;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 8px 100%, 0 50%);
}
.car-badge-sale { background: #e03030; }

/* Tag price kiểu đeo (pin + ribbon) cho deals row */
.car-badge-deal {
  position: absolute; top: 0; left: 14px;
  background: #e03030; color: #fff;
  padding: 6px 8px 10px;
  font-size: 9px; font-weight: 700; line-height: 1.3; text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 50% 100%, 0 85%);
  width: 44px;
}
.car-badge-deal::before {
  content: '';
  position: absolute; top: -4px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: #c02020;
}

.car-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.car-title {
  font-size: 14px; font-weight: 600; color: var(--text-primary);
  margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.car-price {
  font-size: 13px; font-weight: 600; color: var(--price-color);
  margin-bottom: 12px;
}
.car-specs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.car-spec  { font-size: 11px; color: #888880; display: flex; align-items: center; gap: 3px; }

/* Footer: nút Nhận báo giá full width + link Đăng kí lái thử */
.car-footer {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 0; border-top: none; margin-top: auto;
}
.car-footer .btn-quote {
  width: 100%; justify-content: center; text-align: center;
  background: var(--accent-primary); color: #fff;
  border: none; border-radius: 6px;
  padding: 9px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.car-footer .btn-quote:hover { background: var(--accent-dark); }
.car-footer .btn-trial {
  text-align: center; font-size: 12px; color: #888880;
  text-decoration: none; display: block; cursor: pointer;
  background: none; border: none; padding: 0;
}
.car-footer .btn-trial:hover { color: var(--text-primary); }

.car-location { font-size: 11px; color: #a8a898; display: flex; align-items: center; gap: 3px; }

/* car-grid: standard grid — mua_xe.html */
.car-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; margin-bottom: 28px; }
.car-grid .car-card { width: 100%; flex-shrink: unset; border-color: #eaeae0; }

/* ══════════════════════════════════════════════════
   DEALERS  —  partials/dealers.html
   ══════════════════════════════════════════════════ */
.dealers-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dealer-card {
  background: var(--bg-surface); border-radius: 11px; overflow: hidden;
  border: 1px solid #eaeae0; box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  transition: all 0.3s; cursor: pointer;
}
.dealer-card:hover { transform: translateY(-4px); box-shadow: 0 10px 26px rgba(0,0,0,0.1); }
.dealer-image { height: 130px; background: #e8e8de; overflow: hidden; }
.dealer-image img { width: 100%; height: 100%; object-fit: cover; }
.dealer-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #d8d8ce 0%, #e8e8de 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #a8a898;
}
.dealer-body { padding: 13px; }
.dealer-name { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 3px; }
.dealer-city { font-size: 12px; color: var(--accent-primary); font-weight: 600; margin-bottom: 7px; }
.dealer-address { font-size: 11px; color: #888880; line-height: 1.5; display: flex; align-items: flex-start; gap: 4px; }

/* ══════════════════════════════════════════════════
   NEWS  —  partials/news.html
   ══════════════════════════════════════════════════ */
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.news-featured {
  background: var(--bg-surface); border-radius: 12px; overflow: hidden;
  border: 1px solid #eaeae0; box-shadow: 0 1px 8px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; transition: all 0.3s;
  text-decoration: none; color: inherit;
}
.news-featured:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.1); }
.news-featured-image { height: 200px; background: #e8e8de; overflow: hidden; }
.news-featured-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.news-featured:hover .news-featured-image img { transform: scale(1.04); }
.news-featured-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #d8d8ce 0%, #e8e8de 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: #a8a898;
}
.news-featured-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-tag {
  display: inline-block; background: #f5efe0; color: #8a6020;
  font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px;
}
.news-tag-hot { background: #fef2f2; color: #b91c1c; }
.news-featured-title { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.4; margin-bottom: 9px; }
.news-featured-desc  { font-size: 13px; color: #666660; line-height: 1.65; flex: 1; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 11px; color: #a8a898; }
.news-meta-avatar { width: 18px; height: 18px; border-radius: 50%; background: #e8e8de; overflow: hidden; flex-shrink: 0; }
.news-meta-avatar img { width: 100%; height: 100%; object-fit: cover; }

.news-list  { display: flex; flex-direction: column; gap: 8px; }
.news-item  {
  background: var(--bg-surface); border-radius: 9px; padding: 10px;
  border: 1px solid #eaeae0; display: flex; gap: 11px;
  transition: all 0.2s; text-decoration: none; color: inherit;
}
.news-item:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.07); border-color: #d8d8ce; }
.news-item-image { width: 76px; height: 58px; border-radius: 7px; overflow: hidden; background: #e8e8de; flex-shrink: 0; }
.news-item-image img { width: 100%; height: 100%; object-fit: cover; }
.news-item-image-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #d8d8ce 0%, #e8e8de 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #a8a898;
}
.news-item-body { flex: 1; min-width: 0; }
.news-item-title {
  font-size: 13px; font-weight: 600; color: var(--text-primary);
  line-height: 1.4; margin-bottom: 5px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-item-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #a8a898; }
.news-item-meta-avatar { width: 14px; height: 14px; border-radius: 50%; background: #e8e8de; flex-shrink: 0; }

/* ══════════════════════════════════════════════════
   NEWSLETTER  —  partials/newsletter.html
   ══════════════════════════════════════════════════ */
.newsletter-banner { background: #222222; padding: 36px 24px; }
.newsletter-container { max-width: 1280px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.newsletter-logo { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.newsletter-text h3 { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.newsletter-text p  { font-size: 13px; color: rgba(255,255,255,0.5); }
.newsletter-form    { display: flex; gap: 10px; flex: 1; max-width: 400px; }
.newsletter-input {
  flex: 1; padding: 10px 15px;
  border: 1px solid rgba(255,255,255,0.12); border-radius: 7px;
  background: rgba(255,255,255,0.07); color: #fff;
  font-size: 14px; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.35); }
.newsletter-input:focus { border-color: var(--accent-primary); background: rgba(255,255,255,0.1); }

/* ══════════════════════════════════════════════════
   FOOTER  —  partials/footer.html (new design)
   ══════════════════════════════════════════════════ */
.footer { background: var(--bg-primary); color: #fff; padding: 0; margin-top: auto; }
.footer-container { max-width: 1280px; margin: 0 auto; }

/* ── Top: 3-col links ── */
.footer-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  padding: 36px 32px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.8px;
  color: rgba(255,255,255,0.9); margin-bottom: 14px;
  text-transform: uppercase;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 9px; }
.footer-links a {
  color: rgba(255,255,255,0.55); text-decoration: none;
  font-size: 13.5px; transition: color 0.2s;
  display: flex; align-items: center; gap: 9px;
}
.footer-links a:hover { color: var(--accent-primary); }

/* social icons */
.footer-social-icon {
  width: 26px; height: 26px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.footer-social-fb { background: #1877f2; color: #fff; }
.footer-social-yt { background: #ff0000; color: #fff; }
.footer-social-x  { background: #000; color: #fff; border: 1px solid #444; }

/* ── Middle: info bar — 3 equal cols ── */
.footer-info-bar {
  display: grid;
  grid-template-columns: 180px 1fr 1fr;
  gap: 32px;
  padding: 28px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  align-items: start;
}

/* Brand block */
.footer-info-brand  { display: flex; flex-direction: column; gap: 4px; }
.footer-info-logo   { font-size: 20px; font-weight: 800; color: #fff; }
.footer-info-tagline{
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.4); text-transform: uppercase;
}

/* Contacts block */
.footer-info-contacts { display: flex; flex-direction: column; gap: 7px; }
.footer-info-row {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 13px; color: rgba(255,255,255,0.6); line-height: 1.5;
}
.footer-info-icon { flex-shrink: 0; margin-top: 1px; }
.footer-info-row strong { color: rgba(255,255,255,0.88); }
.footer-info-note { margin-top: 4px; font-size: 11.5px; color: rgba(255,255,255,0.35); }

/* Legal block (inline, bên phải) */
.footer-legal-inline {
  display: flex; flex-direction: column; gap: 10px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.07);
}
.footer-legal-logo { font-size: 16px; font-weight: 800; color: #fff; }
.footer-legal-text p {
  font-size: 11px; color: rgba(255,255,255,0.35); line-height: 1.7; margin: 0;
}

/* ── Legacy classes — giữ để không break trang khác ── */
.footer-legal {
  padding: 16px 32px; background: rgba(0,0,0,0.2);
  display: flex; align-items: center; gap: 20px;
}
.footer-legal-left { flex-shrink: 0; }
.footer-grid   { display: grid; grid-template-columns: 2fr 1fr 1fr 1.6fr; gap: 48px; padding: 48px 24px 36px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand  { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.footer-desc   { color: rgba(255,255,255,0.6); font-size: 14px; line-height: 1.7; margin-bottom: 18px; }
.social-links  { display: flex; gap: 10px; }
.social-link   { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; text-decoration: none; color: #fff; font-size: 13px; font-weight: 600; transition: all 0.3s; }
.social-link:hover { background: var(--accent-primary); transform: translateY(-2px); }
.footer-title  { font-size: 11px; font-weight: 700; margin-bottom: 14px; color: rgba(255,255,255,0.9); text-transform: uppercase; letter-spacing: 0.6px; }
.footer-contact { display: flex; gap: 10px; margin-bottom: 12px; color: rgba(255,255,255,0.65); font-size: 14px; align-items: flex-start; }
.footer-contact-icon { color: var(--accent-primary); margin-top: 1px; flex-shrink: 0; }
.footer-bottom { padding: 18px 24px; text-align: center; color: rgba(255,255,255,0.4); font-size: 13px; }

/* ══════════════════════════════════════════════════
   SEARCH BOX  —  mua_xe, ban_xe, tu_van, lien_he
   ══════════════════════════════════════════════════ */
.search-box { background: var(--bg-surface); border-radius: 14px; padding: 24px; box-shadow: 0 4px 24px rgba(0,0,0,0.08); border: 1px solid #eaeae0; }
.search-title { font-size: 17px; font-weight: 700; margin-bottom: 18px; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }
.search-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group   { display: flex; flex-direction: column; gap: 5px; }
.form-group-full { grid-column: 1 / -1; }
.form-label   { font-size: 11px; font-weight: 700; color: #888880; text-transform: uppercase; letter-spacing: 0.6px; }
.form-control { padding: 10px 13px; border: 1.5px solid #deded4; border-radius: 7px; font-size: 14px; font-family: inherit; transition: border-color 0.2s; background: #fff; color: var(--text-primary); width: 100%; }
.form-control:focus { outline: none; border-color: var(--accent-primary); box-shadow: 0 0 0 3px rgba(200,169,110,0.1); }
textarea.form-control { resize: vertical; }

/* ══════════════════════════════════════════════════
   BRANDS  —  partials/brands.html
   ══════════════════════════════════════════════════ */
.brands-grid  { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.brand-card   { background: #f0efe8; padding: 24px 14px; border-radius: 10px; text-align: center; cursor: pointer; transition: all 0.3s; border: 2px solid transparent; }
.brand-card:hover { background: var(--bg-primary); color: #fff; transform: translateY(-3px); border-color: var(--bg-primary); }
.brand-icon   { font-size: 36px; margin-bottom: 8px; display: block; }
.brand-name   { font-size: 13px; font-weight: 600; }

/* ══════════════════════════════════════════════════
   SERVICES  —  ban_xe, tu_van, lien_he, services.html
   ══════════════════════════════════════════════════ */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.service-card  { background: var(--bg-surface); padding: 32px 24px; border-radius: 14px; text-align: center; box-shadow: 0 2px 14px rgba(0,0,0,0.06); border: 1px solid #f1f5f9; transition: all 0.3s; }
.service-card:hover { transform: translateY(-5px); box-shadow: 0 14px 36px rgba(0,0,0,0.1); }
.service-icon  { width: 64px; height: 64px; background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px; font-size: 28px; }
.service-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.service-desc  { color: #64748b; font-size: 14px; line-height: 1.7; }

/* ══════════════════════════════════════════════════
   TESTIMONIALS  —  partials/testimonials.html
   ══════════════════════════════════════════════════ */
.testimonials  { background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); color: #fff; }
.testimonials .section-title    { color: #fff; }
.testimonials .section-subtitle { color: rgba(255,255,255,0.65); }
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.testimonial-card  { background: rgba(255,255,255,0.07); backdrop-filter: blur(10px); padding: 26px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); }
.stars             { color: #fbbf24; margin-bottom: 12px; font-size: 16px; letter-spacing: 2px; }
.testimonial-text  { font-size: 14px; line-height: 1.8; margin-bottom: 18px; font-style: italic; color: rgba(255,255,255,0.88); }
.testimonial-author{ display: flex; align-items: center; gap: 12px; }
.author-avatar     { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; color: #fff; flex-shrink: 0; }
.author-name       { font-weight: 600; margin-bottom: 2px; font-size: 14px; }
.author-title      { font-size: 12px; opacity: 0.6; }

/* ══════════════════════════════════════════════════
   CTA BOX  —  partials/cta.html
   ══════════════════════════════════════════════════ */
.cta-box   { background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%); padding: 64px 40px; border-radius: 18px; text-align: center; color: #fff; }
.cta-title { font-size: 36px; font-weight: 800; margin-bottom: 12px; letter-spacing: -0.5px; }
.cta-desc  { font-size: 16px; margin-bottom: 26px; opacity: 0.95; line-height: 1.6; }

/* ══════════════════════════════════════════════════
   MODAL  —  partials/modals.html
   ══════════════════════════════════════════════════ */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 2000; align-items: center; justify-content: center; padding: 24px; }
.modal.active { display: flex; }
.modal-content { background: var(--bg-surface); border-radius: 14px; max-width: 520px; width: 100%; max-height: 90vh; overflow-y: auto; animation: modalIn 0.28s ease; }
@keyframes modalIn { from { opacity: 0; transform: translateY(-14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { background: var(--bg-primary); color: #fff; padding: 20px 26px; display: flex; justify-content: space-between; align-items: center; border-radius: 14px 14px 0 0; }
.modal-title  { font-size: 19px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-close  { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: background 0.2s; }
.modal-close:hover { background: rgba(255,255,255,0.12); }
.modal-body   { padding: 26px; }
.modal-footer { padding: 18px 26px; border-top: 1px solid #e2e8f0; display: flex; gap: 10px; justify-content: flex-end; }

/* ══════════════════════════════════════════════════
   TOAST  —  partials/toast.html
   ══════════════════════════════════════════════════ */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--bg-primary); color: #fff; padding: 13px 20px; border-radius: 10px; box-shadow: 0 10px 36px rgba(0,0,0,0.28); display: none; align-items: center; gap: 10px; z-index: 3000; max-width: 360px; animation: toastIn 0.3s ease; }
.toast.show { display: flex; }
@keyframes toastIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-icon    { font-size: 20px; flex-shrink: 0; }
.toast-message { font-size: 14px; font-weight: 500; }

/* ══════════════════════════════════════════════════
   DASHBOARD  —  admin_dashboard.html, staff_dashboard.html
   ══════════════════════════════════════════════════ */
.dashboard-wrapper {
  max-width: 1100px; margin: 0 auto; padding: 32px 24px;
}

/* Page header */
.dashboard-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 28px; flex-wrap: wrap;
}
.dashboard-header-left { display: flex; align-items: center; gap: 12px; }
.dashboard-header-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dashboard-title { font-size: 22px; font-weight: 800; color: var(--text-primary); margin: 0; letter-spacing: -0.3px; }
.dashboard-subtitle { font-size: 13px; color: #888880; margin: 2px 0 0; }
.dashboard-badge {
  font-size: 11px; font-weight: 700; padding: 4px 12px;
  border-radius: 20px; letter-spacing: 0.5px; text-transform: uppercase;
}
.dashboard-badge-admin { background: #c8a96e22; color: var(--accent-primary); border: 1px solid #c8a96e44; }
.dashboard-badge-staff { background: #3b82f622; color: #3b82f6; border: 1px solid #3b82f644; }

/* Stat cards grid */
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-surface); border-radius: 12px;
  padding: 20px; border: 1px solid #eaeae0;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow 0.2s;
}
.stat-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.09); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; }
.stat-card-label { font-size: 12px; color: #888880; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-card-icon {
  width: 34px; height: 34px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card-icon-gold { background: #c8a96e18; }
.stat-card-icon-blue { background: #3b82f618; }
.stat-card-icon-green { background: #22c55e18; }
.stat-card-value { font-size: 30px; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.stat-card-value-gold  { color: var(--accent-primary); }
.stat-card-value-blue  { color: #3b82f6; }
.stat-card-value-green { color: #22c55e; }

/* Panel grid */
.dashboard-panels {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.dashboard-panel-full { grid-column: 1 / -1; }

/* Panel card */
.panel-card {
  background: var(--bg-surface); border-radius: 12px;
  border: 1px solid #eaeae0; box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  overflow: hidden;
}
.panel-card-header {
  padding: 16px 20px; border-bottom: 1px solid #eaeae0;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-card-title {
  font-size: 14px; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px; margin: 0;
}
.panel-card-link {
  font-size: 12px; color: var(--accent-primary);
  text-decoration: none; font-weight: 600;
}
.panel-card-link:hover { text-decoration: underline; }
.panel-card-body { padding: 0; }

/* Row items inside panel */
.panel-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; border-bottom: 1px solid #f5f5f0;
  gap: 12px; transition: background 0.15s;
}
.panel-row:last-child { border-bottom: none; }
.panel-row:hover { background: #fafaf8; }
.panel-row-left { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.panel-row-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-row-sub  { font-size: 12px; color: #888880; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* Role badge */
.role-badge {
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 20px; text-transform: uppercase; letter-spacing: 0.4px;
}
.role-badge-admin { background: #c8a96e18; color: var(--accent-primary); }
.role-badge-staff { background: #3b82f618; color: #3b82f6; }
.role-badge-user  { background: #f1f5f9; color: #94a3b8; }

/* Price tag */
.panel-price {
  font-size: 13px; font-weight: 700; color: var(--price-color);
}

/* Action link */
.panel-action {
  font-size: 12px; padding: 4px 10px; border-radius: 6px;
  background: var(--accent-primary); color: #fff;
  text-decoration: none; font-weight: 600; transition: background 0.2s;
  white-space: nowrap;
}
.panel-action:hover { background: var(--accent-dark); }

/* Empty state */
.panel-empty {
  padding: 32px 20px; text-align: center;
  color: #888880; font-size: 14px;
}

/* ── Dashboard responsive ── */
@media (max-width: 768px) {
  .dashboard-wrapper { padding: 20px 16px; }
  .dashboard-panels  { grid-template-columns: 1fr; }
  .dashboard-panel-full { grid-column: 1; }
  .dashboard-stats   { grid-template-columns: repeat(2, 1fr); }
  .dashboard-title   { font-size: 18px; }
}
@media (max-width: 480px) {
  .dashboard-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card-value { font-size: 24px; }
  .dashboard-header { gap: 10px; }
  .dashboard-badge  { display: none; }
}

/* ══════════════════════════════════════════════════
   ICONS
   ══════════════════════════════════════════════════ */
.icon-search::before      { content: ''; }
.icon-car::before         { content: ''; }
.icon-calendar::before    { content: ''; }
.icon-speedometer::before { content: ''; }
.icon-fuel::before        { content: ''; }
.icon-gear::before        { content: ''; }
.icon-location::before    { content: ''; }
.icon-shield::before      { content: ''; }
.icon-bank::before        { content: ''; }
.icon-refresh::before     { content: ''; }
.icon-wrench::before      { content: ''; }
.icon-check::before       { content: ''; }
.icon-phone::before       { content: ''; }
.icon-email::before       { content: ''; }
.icon-clock::before       { content: ''; }
.icon-megaphone::before   { content: ''; }
.icon-person::before      { content: ''; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (min-width: 1025px) {
  .menu-toggle   { display: none !important; }
  .nav-menu { display: flex !important; position: static; background: transparent; box-shadow: none; padding: 0; flex-direction: row; }
  .nav-actions      { display: flex !important; }
  #mobileNavActions { display: none !important; }
}

@media (max-width: 1024px) {
  .menu-toggle { display: block; z-index: 1001; }
  .nav-container { position: relative; }
  .nav-menu { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--bg-primary); flex-direction: column; padding: 12px 20px 16px; gap: 0; box-shadow: 0 10px 28px rgba(0,0,0,0.3); z-index: 1000; }
  .nav-menu.open { display: flex; }
  .nav-menu li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .nav-menu li:last-child { border-bottom: none; }
  .nav-menu .nav-link { display: block; padding: 13px 0; font-size: 15px; color: rgba(255,255,255,0.9); }
  .nav-actions { display: none !important; }
  #mobileNavActions { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 12px; margin-top: 4px; display: flex; flex-direction: column; gap: 8px; }
  #mobileNavActions .btn { width: 100%; justify-content: center; }
  #mobileNavActions span { color: rgba(255,255,255,0.85); font-size: 13px; padding: 6px 0; display: block; text-align: center; }

  .hero-container  { flex-direction: column; gap: 24px; }
  .hero-content h1 { font-size: 34px; }
  .hero-illustration { display: none; }

  .stats-container { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .dealers-grid    { grid-template-columns: repeat(2, 1fr); }
  .news-grid       { grid-template-columns: 1fr; }
  .newsletter-container { flex-direction: column; gap: 20px; }
  .newsletter-form { max-width: 100%; width: 100%; }
  .footer-cols     { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-info-bar { flex-direction: column; gap: 16px; }
  .footer-legal    { flex-direction: column; gap: 10px; }
  .footer-grid     { grid-template-columns: 1fr 1fr; gap: 32px; padding: 36px 24px; }
}

@media (max-width: 768px) {
  .hero    { padding: 40px 16px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p  { font-size: 14px; }
  .hero-buttons    { justify-content: center; }
  .section         { padding: 40px 16px; }
  .section-title   { font-size: 20px; }
  .scroll-arrow    { display: none; }
  .dealers-grid    { grid-template-columns: 1fr 1fr; gap: 12px; }
  .dealer-image    { height: 100px; }
  .brands-grid     { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .brand-card      { padding: 16px 10px; }
  .brand-icon      { font-size: 28px; }
  .cta-box         { padding: 44px 20px; }
  .cta-title       { font-size: 24px; }
  .footer-cols     { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; }
  .footer-info-bar { padding: 20px 16px; }
  .footer-legal    { padding: 14px 16px; flex-direction: column; gap: 8px; }
  .footer-grid     { grid-template-columns: 1fr; gap: 24px; padding: 28px 16px; }
  .newsletter-form { flex-direction: column; }
  .toast { bottom: 12px; right: 12px; left: 12px; max-width: none; }
}

@media (max-width: 480px) {
  .nav-container   { padding: 0 14px; }
  .logo            { font-size: 20px; }
  .hero-content h1 { font-size: 24px; }
  .stat-number     { font-size: 34px; }
  .section-title   { font-size: 19px; }
  .btn-large       { padding: 12px 20px; font-size: 15px; }
  .search-grid     { grid-template-columns: 1fr; }
  .brands-grid     { grid-template-columns: repeat(3, 1fr); }
  .dealers-grid    { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════
   NAV USER DROPDOWN
   ══════════════════════════════════════════════════ */
.nav-menu { gap: 20px; } /* giảm từ 28px */
.nav-link { font-size: 14px; } /* giảm từ 15px */

.nav-link-dashboard {
  color: var(--accent-primary) !important;
  font-weight: 600;
}

/* Avatar + tên user */
.nav-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; position: relative;
  padding: 6px 10px; border-radius: 8px;
  transition: background 0.2s;
  user-select: none;
}
.nav-user:hover { background: rgba(255,255,255,0.08); }

.nav-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-primary);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex-shrink: 0;
}
.nav-user-name {
  font-size: 13px; font-weight: 600; color: #fff;
  max-width: 80px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.nav-role-badge {
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 10px; letter-spacing: 0.4px;
}
.nav-role-admin { background: #c8a96e33; color: var(--accent-primary); }
.nav-role-staff { background: #3b82f633; color: #60a5fa; }

/* Dropdown */
.nav-dropdown {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border-radius: 12px; min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18); border: 1px solid #eaeae0;
  overflow: hidden; z-index: 1100;
  animation: dropIn 0.18s ease;
}
.nav-dropdown.open { display: block; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-dropdown-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0ea;
}
.nav-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 13px; font-weight: 500;
  color: var(--text-primary); text-decoration: none;
  transition: background 0.15s; cursor: pointer;
  background: none; border: none; width: 100%; text-align: left;
  font-family: inherit;
}
.nav-dropdown-item:hover { background: #f8f7f4; }
.nav-dropdown-item i { color: #888; flex-shrink: 0; }
.nav-dropdown-divider { height: 1px; background: #f0f0ea; margin: 4px 0; }
.nav-dropdown-log out { color: #ef4444; }
.nav-dropdown-logout i { color: #ef4444; }

/* Nav container cần position relative để dropdown định vị đúng */
.nav-actions { position: relative; }

/* ── Responsive nav user ── */
@media (max-width: 1024px) {
  .nav-user { display: none; }
  .nav-dropdown { display: none !important; }
}

/* ══════════════════════════════════════════════════
   footer sticky + search panel
   ══════════════════════════════════════════════════ */

/* Footer luôn dính cuối trang */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Search panel dropdown */
.news-search-wrapper {
  position: relative;
  flex: 1;
}
.news-search-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #eaeae0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  z-index: 500;
  max-height: 400px;
  overflow-y: auto;
}
.news-search-panel.open { display: block; }
.news-search-panel-empty {
  padding: 24px;
  text-align: center;
  color: #888;
  font-size: 14px;
}
.news-search-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f5f5f0;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
  cursor: pointer;
}
.news-search-item:last-child { border-bottom: none; }
.news-search-item:hover { background: #fafaf8; }
.news-search-item-img {
  width: 56px; height: 42px;
  border-radius: 6px; overflow: hidden;
  background: #e8e8de; flex-shrink: 0;
}
.news-search-item-img img {
  width: 100%; height: 100%; object-fit: cover;
}
.news-search-item-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.news-search-item-meta {
  font-size: 11px; color: #a8a898; margin-top: 3px;
}
.news-search-highlight {
  background: #fff3cd;
  border-radius: 2px;
  padding: 0 1px;
}

/* ══════════════════════════════════════════════════
   BACK TO TOP BUTTON
   ══════════════════════════════════════════════════ */
#backToTopBtn {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(200,169,110,0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

#backToTopBtn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#backToTopBtn:hover {
  background: var(--accent-dark);
  transform: scale(1.1);
}

/* Responsive cho nút về đầu trang */
@media (max-width: 768px) {
  #backToTopBtn {
    bottom: 20px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}