/* ============================================================
   MOTOR LIFE — motorlife.com.vn
   Static bilingual (VI/EN) website stylesheet
   Brand: primary #56ace1 (blue) · secondary #ff0000 (red)
   ============================================================ */

:root {
  --primary: #56ace1;
  --primary-dark: #3a8ec5;
  --secondary: #ff0000;
  --secondary-dark: #b20000;
  --dark: #1a1a1a;
  --gray-9: #333;
  --gray-6: #666;
  --gray-3: #ddd;
  --gray-1: #f7f7f7;
  --white: #fff;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .14);
  --radius: 8px;
  --container: 1200px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--gray-9);
  font-size: 16px;
  line-height: 1.65;
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--secondary); }
ul { list-style: none; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 16px; }

/* ---------- Language switching ----------
   html[data-lang="vi"] shows .vi, hides .en; and vice versa */
html[data-lang="vi"] .en { display: none !important; }
html[data-lang="en"] .vi { display: none !important; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--dark);
  color: #ccc;
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar a { color: #eee; }
.topbar a:hover { color: var(--primary); }
.topbar .tb-item { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 900;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 16px; max-width: var(--container); margin: 0 auto; }
.logo img { height: 62px; width: auto; }

.main-nav > ul { display: flex; gap: 4px; align-items: center; }
.main-nav a {
  display: block; padding: 10px 14px; font-weight: 600; color: var(--gray-9);
  text-transform: uppercase; font-size: 14.5px; border-radius: 4px; white-space: nowrap;
}
.main-nav a:hover, .main-nav li.active > a { color: var(--secondary); }
.main-nav li { position: relative; }
.main-nav .dropdown {
  position: absolute; top: 100%; left: 0; background: var(--white); min-width: 240px;
  box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: .2s;
  z-index: 950; padding: 6px 0;
}
.main-nav li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .dropdown a { text-transform: none; font-weight: 500; padding: 9px 18px; font-size: 14.5px; }
.main-nav .dropdown a:hover { background: var(--gray-1); }

/* Language switcher */
.lang-switch { display: flex; border: 1.5px solid var(--gray-3); border-radius: 20px; overflow: hidden; flex-shrink: 0; }
.lang-switch button {
  border: 0; background: transparent; padding: 6px 13px; cursor: pointer;
  font-weight: 700; font-size: 13px; color: var(--gray-6); font-family: var(--font);
}
.lang-switch button.on { background: var(--primary); color: var(--white); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 26px; height: 3px; background: var(--gray-9); margin: 5px 0; border-radius: 2px; transition: .25s; }

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; background: #0e1420; }
.hero .slide { display: none; animation: fadeIn .8s; }
.hero .slide.on { display: block; }
.hero .slide img { width: 100%; height: auto; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.hero .dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero .dots button { width: 11px; height: 11px; border-radius: 50%; border: 0; background: rgba(255,255,255,.55); cursor: pointer; }
.hero .dots button.on { background: var(--secondary); }
.hero .arrow {
  position: absolute; top: 50%; transform: translateY(-50%); border: 0; cursor: pointer;
  background: rgba(0,0,0,.35); color: #fff; width: 42px; height: 42px; border-radius: 50%;
  font-size: 20px; line-height: 1; transition: .2s;
}
.hero .arrow:hover { background: var(--secondary); }
.hero .arrow.prev { left: 12px; }
.hero .arrow.next { right: 12px; }

/* ---------- Sections ---------- */
.section { padding: 52px 0; }
.section.alt { background: var(--gray-1); }
.section-title { text-align: center; margin-bottom: 34px; }
.section-title h2 {
  font-size: 26px; text-transform: uppercase; color: var(--dark); letter-spacing: .5px;
  display: inline-block; position: relative; padding-bottom: 12px;
}
.section-title h2::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
  width: 64px; height: 3px; background: var(--secondary); border-radius: 2px;
}
.section-title p { color: var(--gray-6); margin-top: 10px; }

/* ---------- Product cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.product-card {
  background: var(--white); border: 1px solid #eee; border-radius: var(--radius);
  overflow: hidden; transition: .25s; display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.product-card .thumb { aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; padding: 14px; background: #fff; }
.product-card .thumb img { max-height: 100%; width: auto; object-fit: contain; }
.product-card .body { padding: 14px 16px 18px; text-align: center; border-top: 1px solid #f2f2f2; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.product-card .cat { font-size: 12px; color: var(--gray-6); text-transform: uppercase; letter-spacing: .4px; }
.product-card .name { font-size: 15px; font-weight: 600; color: var(--gray-9); line-height: 1.45; flex: 1; }
.product-card .name:hover { color: var(--secondary); }
.btn {
  display: inline-block; background: var(--secondary); color: var(--white) !important;
  padding: 10px 26px; border-radius: 24px; font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: .4px; border: 0; cursor: pointer; transition: .2s;
}
.btn:hover { background: var(--secondary-dark); }
.btn.blue { background: var(--primary); }
.btn.blue:hover { background: var(--primary-dark); }
.btn.sm { padding: 8px 18px; font-size: 13px; }

/* ---------- Category tiles ---------- */
.cat-tile {
  position: relative; border-radius: var(--radius); overflow: hidden; display: block;
  background: var(--dark); aspect-ratio: 4/3;
}
.cat-tile img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: .3s; }
.cat-tile:hover img { transform: scale(1.06); opacity: .65; }
.cat-tile .label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); color: var(--white); text-align: center;
}
.cat-tile .label b { display: block; font-size: 17px; text-transform: uppercase; }
.cat-tile .label span { font-size: 13px; opacity: .85; }

/* ---------- About block ---------- */
.about-flex { display: flex; gap: 36px; align-items: center; }
.about-flex .txt { flex: 1.2; }
.about-flex .pic { flex: 1; }
.about-flex .pic img { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.about-flex h2 { font-size: 26px; margin-bottom: 14px; color: var(--dark); }
.about-flex p { margin-bottom: 18px; color: var(--gray-6); }

/* ---------- Feature boxes (why choose us) ---------- */
.feature-box { background: var(--white); border-radius: var(--radius); padding: 28px 22px; text-align: center; box-shadow: var(--shadow); transition: .25s; }
.feature-box:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-box .ico { width: 68px; height: 68px; margin: 0 auto 16px; }
.feature-box h3 { font-size: 18px; margin-bottom: 10px; color: var(--dark); }
.feature-box p { font-size: 14.5px; color: var(--gray-6); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 4/3; object-fit: cover; width: 100%; transition: .25s; }
.gallery-grid img:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }

/* ---------- Certificates ---------- */
.cert-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.cert-grid img { border: 1px solid #eee; border-radius: 6px; background: #fff; padding: 4px; }

/* ---------- Testimonials ---------- */
.testi { background: var(--white); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.testi .stars { color: #f5b301; font-size: 15px; letter-spacing: 2px; margin-bottom: 10px; }
.testi p { font-size: 14.5px; color: var(--gray-6); font-style: italic; margin-bottom: 14px; }
.testi .who { display: flex; align-items: center; gap: 12px; }
.testi .who img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }
.testi .who b { display: block; font-size: 14.5px; color: var(--dark); }
.testi .who span { font-size: 12.5px; color: var(--gray-6); }

/* ---------- FAQ ---------- */
.faq-item { background: var(--white); border: 1px solid #e8e8e8; border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item .q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 16px 46px 16px 18px; font-weight: 600; font-size: 15.5px; color: var(--dark);
  position: relative; font-family: var(--font);
}
.faq-item .q::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 21px; color: var(--secondary); transition: .2s; }
.faq-item.open .q::after { content: "−"; }
.faq-item .a { display: none; padding: 0 18px 16px; color: var(--gray-6); font-size: 14.5px; }
.faq-item.open .a { display: block; }

/* ---------- Partner logos ---------- */
.partner-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 30px; }
.partner-row img { height: 64px; width: auto; filter: grayscale(35%); opacity: .85; transition: .2s; }
.partner-row img:hover { filter: none; opacity: 1; }

/* ---------- News cards ---------- */
.news-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: .25s; display: flex; flex-direction: column; }
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.news-card .thumb { aspect-ratio: 16/9; overflow: hidden; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.news-card .tag { font-size: 12px; color: var(--primary-dark); text-transform: uppercase; font-weight: 700; }
.news-card h3 { font-size: 16.5px; line-height: 1.45; }
.news-card h3 a { color: var(--dark); }
.news-card h3 a:hover { color: var(--secondary); }
.news-card p { font-size: 14px; color: var(--gray-6); flex: 1; }
.news-card .more { font-size: 13.5px; font-weight: 700; color: var(--secondary); text-transform: uppercase; }

/* ---------- Video embed ---------- */
.video-wrap { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--gray-1); padding: 12px 0; font-size: 13.5px; color: var(--gray-6); }
.breadcrumb a { color: var(--gray-6); }
.breadcrumb a:hover { color: var(--secondary); }
.breadcrumb .sep { margin: 0 8px; }

/* ---------- Product detail ---------- */
.product-detail { display: flex; gap: 40px; align-items: flex-start; }
.product-detail .gallery { flex: 1; position: sticky; top: 100px; }
.product-detail .gallery .main-img { border: 1px solid #eee; border-radius: var(--radius); padding: 18px; display: flex; align-items: center; justify-content: center; background: #fff; }
.product-detail .gallery .main-img img { max-height: 440px; width: auto; object-fit: contain; }
.product-detail .info { flex: 1.15; }
.product-detail h1 { font-size: 25px; line-height: 1.4; color: var(--dark); margin-bottom: 10px; }
.product-detail .cat-line { font-size: 13.5px; color: var(--gray-6); margin-bottom: 18px; }
.product-detail .cat-line a { color: var(--primary-dark); }
.product-detail .short-desc { border-top: 1px solid #eee; padding-top: 18px; margin-bottom: 22px; color: var(--gray-6); }
.product-detail .short-desc li { position: relative; padding-left: 22px; margin-bottom: 8px; }
.product-detail .short-desc li::before { content: "✔"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.contact-cta { background: var(--gray-1); border: 1px dashed var(--primary); border-radius: var(--radius); padding: 18px; margin-top: 8px; }
.contact-cta b { color: var(--secondary); }
.contact-cta .btns { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }

/* ---------- Content / article body ---------- */
.content-body { max-width: 860px; margin: 0 auto; }
.content-body h1 { font-size: 28px; color: var(--dark); line-height: 1.35; margin-bottom: 18px; }
.content-body h2 { font-size: 23px; color: var(--dark); margin: 30px 0 14px; }
.content-body h3 { font-size: 19px; color: var(--dark); margin: 24px 0 12px; }
.content-body p { margin-bottom: 14px; }
.content-body ul, .content-body ol { margin: 0 0 16px 22px; }
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li { margin-bottom: 7px; }
.content-body img { border-radius: var(--radius); margin: 18px auto; }
.content-body blockquote { border-left: 4px solid var(--primary); background: var(--gray-1); padding: 14px 18px; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 16px; }
.content-body table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.content-body table td, .content-body table th { border: 1px solid var(--gray-3); padding: 10px 12px; }
.content-body table th { background: var(--gray-1); }
.desc-tabs { margin-top: 46px; }
.desc-tabs .tab-title { font-size: 21px; text-transform: uppercase; color: var(--dark); border-bottom: 2px solid var(--secondary); display: inline-block; padding-bottom: 8px; margin-bottom: 20px; }

/* ---------- Contact page ---------- */
.contact-grid { display: flex; gap: 36px; }
.contact-grid .col { flex: 1; }
.info-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.info-card h3 { color: var(--dark); margin-bottom: 14px; font-size: 19px; }
.info-card ul li { display: flex; gap: 12px; margin-bottom: 13px; align-items: flex-start; font-size: 15px; }
.info-card ul li .ic { color: var(--primary-dark); font-size: 18px; width: 22px; flex-shrink: 0; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; }

form .frow { margin-bottom: 14px; }
form label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--dark); }
form input, form textarea, form select {
  width: 100%; padding: 11px 14px; border: 1px solid var(--gray-3); border-radius: 6px;
  font-family: var(--font); font-size: 15px; background: #fff;
}
form input:focus, form textarea:focus { outline: 2px solid var(--primary); border-color: transparent; }

/* ---------- Footer ---------- */
.site-footer { background: #10151f; color: #b9c0cc; font-size: 14.5px; margin-top: 60px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding: 46px 0 30px; }
.site-footer h4 { color: var(--white); text-transform: uppercase; font-size: 15.5px; margin-bottom: 16px; letter-spacing: .5px; }
.site-footer a { color: #b9c0cc; }
.site-footer a:hover { color: var(--primary); }
.site-footer li { margin-bottom: 9px; }
.site-footer .flogo { height: 58px; width: auto; margin-bottom: 14px; background: #fff; border-radius: 6px; padding: 4px; }
.site-footer .copy { border-top: 1px solid rgba(255,255,255,.09); padding: 16px 0; text-align: center; font-size: 13.5px; color: #8b93a2; }
.site-footer .contact-li { display: flex; gap: 10px; align-items: flex-start; }
.site-footer .contact-li .ic { flex-shrink: 0; }

/* ---------- Floating call/zalo buttons ---------- */
.float-contact { position: fixed; left: 18px; bottom: 20px; z-index: 999; display: flex; flex-direction: column; gap: 12px; }
.float-btn {
  width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.25); position: relative;
}
.float-btn.phone { background: var(--secondary); animation: pulse 1.6s infinite; }
.float-btn.zalo { background: #0068ff; }
.float-btn img, .float-btn svg { width: 26px; height: 26px; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,0,0,.45); }
  70% { box-shadow: 0 0 0 16px rgba(255,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,0,0,0); }
}
.float-btn .tip {
  position: absolute; left: 60px; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.8); color: #fff; font-size: 13px; padding: 5px 12px; border-radius: 14px;
  white-space: nowrap; opacity: 0; visibility: hidden; transition: .2s;
}
.float-btn:hover .tip { opacity: 1; visibility: visible; }

/* Back to top */
#toTop {
  position: fixed; right: 18px; bottom: 20px; z-index: 999; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 19px;
  cursor: pointer; opacity: 0; visibility: hidden; transition: .25s;
}
#toTop.show { opacity: 1; visibility: visible; }
#toTop:hover { background: var(--secondary); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: linear-gradient(120deg, #0e1a2b 0%, #14304a 60%, #1c4d74 100%); color: var(--white); padding: 42px 0; text-align: center; }
.page-hero h1 { font-size: 30px; text-transform: uppercase; letter-spacing: .5px; }
.page-hero p { color: #cfe2f1; margin-top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .cert-grid { grid-template-columns: repeat(4, 1fr); }
  .about-flex { flex-direction: column; }
  .product-detail { flex-direction: column; }
  .product-detail .gallery { position: static; width: 100%; }
  .contact-grid { flex-direction: column; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav {
    position: fixed; top: 0; left: -290px; width: 280px; height: 100vh; background: var(--white);
    box-shadow: var(--shadow-lg); transition: .3s; z-index: 1000; overflow-y: auto; padding: 18px 0;
  }
  .main-nav.open { left: 0; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a { padding: 13px 22px; border-bottom: 1px solid #f2f2f2; }
  .main-nav .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 14px; display: block; }
  .nav-toggle { display: block; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 990; opacity: 0; visibility: hidden; transition: .25s; }
  .nav-overlay.show { opacity: 1; visibility: visible; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .cert-grid { grid-template-columns: repeat(3, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr; }
  .logo img { height: 48px; }
  .section { padding: 38px 0; }
  .section-title h2 { font-size: 22px; }
}
@media (max-width: 480px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr 1fr; }
  .testi-grid, .grid-2.stack-sm { grid-template-columns: 1fr; }
}
