/* ===== VinFast demo site — style dùng chung ===== */
@property --ac      { syntax: '<color>'; inherits: true; initial-value: #6b7280; }
@property --ac-deep { syntax: '<color>'; inherits: true; initial-value: #374151; }

/* chuyển trang mượt (Chromium): trang cũ mờ đi, trang mới trượt lên */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .32s ease both; }
::view-transition-new(root) { animation: vt-in .45s .08s cubic-bezier(.2,.7,.3,1) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-14px); } }
@keyframes vt-in  { from { opacity: 0; transform: translateY(22px); } }

/* font thương hiệu: chỉ có bản Regular -> khai báo dải weight 100-900
   và để trình duyệt tự tổng hợp in đậm (font-synthesis) */
@font-face {
  font-family: 'Darley Sans';
  src: url('../Font/DarleySans-Regular.otf') format('opentype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* button/input/select/textarea không tự kế thừa font -> ép dùng font thương hiệu */
button, input, select, textarea { font-family: inherit; font-synthesis: weight style; }

body {
  font-family: 'Darley Sans', "Segoe UI", system-ui, sans-serif;
  font-synthesis: weight style;
  background: #f6f7f9;
  color: #1a1a2e;
  overflow-x: hidden;
  animation: page-in .5s ease both; /* fallback khi trình duyệt không có view transition */
}

@keyframes page-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }
@keyframes bob  { 50% { transform: translate(-50%, 8px); } }

/* ============ HEADER ============ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(16px, 4vw, 48px);
  height: 64px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

/* gradient chrome/bạc đồng bộ logo — dùng lại nhiều nơi */
:root {
  --metal: linear-gradient(120deg, #5b6068 0%, #aab2bb 38%, #f1f3f5 56%, #8b929b 78%, #c8ced5 100%);
  --metal-soft: linear-gradient(120deg, #c8ced5, #f1f3f5, #aab2bb);
}
.site-header .logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 800; letter-spacing: .5px; font-size: 21px;
  text-decoration: none; color: #1a1a2e; white-space: nowrap;
}
.site-header .logo .logo-mark { height: 32px; width: auto; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.18)); }
.site-header .logo .logo-txt { line-height: 1; }
.site-header .logo .dot { color: #9aa3ad; }
.site-header .logo .re {
  background: var(--metal); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.menu { display: flex; align-items: center; gap: clamp(2px, 1.2vw, 14px); height: 100%; }

.menu-item { position: relative; height: 100%; display: flex; align-items: center; }

.menu-item > a {
  text-decoration: none;
  color: #4b5563;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 999px;
  transition: color .2s, background .2s;
  white-space: nowrap;
}

.menu-item > a:hover, .menu-item.open > a { color: #111; background: #eef0f3; }
.menu-item > a.current { color: #fff; background: #1a1a2e; }

.menu-item .caret { font-size: 9px; margin-left: 4px; opacity: .6; }

/* dropdown */
.dropdown {
  position: absolute;
  top: calc(100% - 6px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 210px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(26,26,46,.14);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}

.menu-item:hover .dropdown, .menu-item:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  text-decoration: none;
  color: #374151;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 9px;
  transition: background .15s, color .15s, padding-left .2s;
}

.dropdown a:hover { background: #f1f3f6; color: #111; padding-left: 20px; }
.dropdown a small { display: block; font-weight: 400; font-size: 11.5px; color: #9aa0a8; margin-top: 1px; }

.header-cta {
  padding: 9px 20px;
  border-radius: 999px;
  background: #1a1a2e;
  color: #fff;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s, transform .15s, box-shadow .2s;
}

.header-cta:hover { background: #33334d; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(26,26,46,.25); }

.menu-burger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #1a1a2e;
  line-height: 1;
  padding: 4px 8px;
}

/* ===== Responsive: menu xổ dọc trên mobile ===== */
@media (max-width: 860px) {
  .site-header { gap: 10px; }
  .menu-burger { display: block; order: 3; }
  .header-cta { order: 2; padding: 8px 15px; font-size: 11px; }
  .menu {
    order: 4;
    position: fixed;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    height: auto;
    background: rgba(255,255,255,.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(0,0,0,.08);
    padding: 8px 14px 14px;
    box-shadow: 0 18px 40px rgba(26,26,46,.12);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .site-header.nav-open .menu { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .menu-item { height: auto; width: 100%; }
  .menu-item > a { width: 100%; padding: 13px 14px; font-size: 14px; border-radius: 9px; }
}

/* ============ NÚT ============ */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .6px;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid #1a1a2e;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}

.btn.dark  { background: #1a1a2e; color: #fff; }
.btn.dark:hover  { background: #33334d; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(26,26,46,.25); }
.btn.ghost { color: #1a1a2e; background: transparent; }
.btn.ghost:hover { background: #1a1a2e; color: #fff; transform: translateY(-2px); }

/* ============ HIỆU ỨNG XUẤT HIỆN ============ */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1); }
.in-view .reveal, .reveal.in { opacity: 1; transform: none; }

/* ============ CARD SẢN PHẨM (Green / EC / xe máy) ============ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  max-width: 1240px;
  margin: 0 auto;
}

.p-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(26,26,46,.06);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
  display: flex;
  flex-direction: column;
}

.p-card:hover { transform: translateY(-8px); box-shadow: 0 24px 50px rgba(26,26,46,.14); }

.p-card .thumb {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fafbfc, #eef0f3);
  overflow: hidden;
}

.p-card .thumb img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}

.p-card:hover .thumb img { transform: scale(1.08); }

.p-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.p-card h3 { font-size: 18px; }
.p-card .price { font-size: 14px; font-weight: 800; color: #B3202E; }
.p-card .pdesc { font-size: 12.8px; color: #6b7280; line-height: 1.55; flex: 1; }

.p-card .pspecs { display: flex; flex-wrap: wrap; gap: 6px; }
.p-card .pspec {
  font-size: 11.5px;
  background: #f1f3f6;
  border-radius: 999px;
  padding: 4px 10px;
  color: #4b5563;
}

.p-card .actions { display: flex; gap: 8px; margin-top: 8px; }
.p-card .actions .btn { padding: 10px 18px; font-size: 12px; letter-spacing: 1px; flex: 1; text-align: center; }

/* ============ TIÊU ĐỀ KHỐI ============ */
.block-head { max-width: 1240px; margin: 0 auto 26px; }
.block-head .kicker { font-size: 12px; font-weight: 800; letter-spacing: 3px; text-transform: uppercase; color: #9aa0a8; }
.block-head h2 { font-size: clamp(26px, 3.8vw, 42px); margin-top: 4px; }
.block-head p { color: #6b7280; font-size: 14.5px; margin-top: 6px; max-width: 720px; }

.page-section { padding: 84px clamp(14px, 4vw, 54px) 60px; }
.page-section.alt { background: #fff; }

/* ============ FOOTER ============ */
.site-footer {
  background: radial-gradient(700px 300px at 12% 0%, rgba(232,185,49,.10), transparent 60%), #111219;
  color: #9499a6;
  font-size: 13px;
  line-height: 1.75;
  padding: 54px clamp(16px, 5vw, 80px) 0;
}
.footer-grid {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 38px; border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-grid .fcol h4 { color: #fff; font-size: 13.5px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px; }
.footer-grid .fcol a { display: block; color: #aab0bd; text-decoration: none; padding: 5px 0; transition: color .18s, padding-left .18s; }
.footer-grid .fcol a:hover { color: #fff; padding-left: 5px; }
.site-footer .fbrand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .5px; color: #fff; font-size: 24px; margin-bottom: 12px; }
.site-footer .fbrand .fbrand-mark { height: 34px; width: auto; }
.site-footer .fbrand .dot { color: #aab2bb; }
.site-footer .fbrand .re { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-footer .ftag { color: #9499a6; max-width: 340px; margin-bottom: 16px; }
.footer-grid .fbrand-col a.fcontact { display: flex; width: fit-content; max-width: 100%; align-items: center; gap: 9px; margin: 8px 0; padding: 0; color: #d6dae2; text-decoration: none; font-size: 13.5px; }
.footer-grid .fbrand-col a.fcontact svg { width: 15px; height: 15px; flex: none; color: #8b909c; transition: color .18s; }
.footer-grid .fbrand-col a.fcontact:hover { color: #E8B931; padding-left: 0; }
.footer-grid .fbrand-col a.fcontact:hover svg { color: #E8B931; }
.footer-grid .fsocial { display: flex; gap: 18px; margin-top: 20px; }
.footer-grid .fbrand-col .fsocial a { display: inline-flex; align-items: center; justify-content: center; padding: 0; color: #aab0bd; transition: color .18s, transform .18s; }
.footer-grid .fbrand-col .fsocial a svg { width: 20px; height: 20px; display: block; }
.footer-grid .fbrand-col .fsocial a:hover { color: #E8B931; transform: translateY(-2px); padding-left: 0; }
.fbottom { max-width: 1240px; margin: 0 auto; padding: 20px 0 30px; text-align: center; font-size: 12px; color: #71757f; }
.fbottom b { color: #c3c7d1; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
  .footer-grid .fbrand-col { grid-column: 1 / -1; }
}

/* ============ DOCK LIÊN HỆ NỔI + BACK-TO-TOP ============ */
.float-dock { position: fixed; right: clamp(14px, 3vw, 26px); bottom: clamp(14px, 3vw, 26px); z-index: 90; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.float-dock .fd-btn {
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 22px rgba(0,0,0,.22); position: relative;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s, opacity .25s;
}
.float-dock .fd-btn svg { width: 26px; height: 26px; }
.float-dock .fd-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 12px 28px rgba(0,0,0,.30); }
.float-dock a.fd-btn { text-decoration: none; }
.fd-btn.messenger { background: linear-gradient(135deg, #00B2FF, #006AFF); }
.fd-btn.zalo { background: #0068FF; }
.fd-btn.telegram { background: linear-gradient(135deg, #37BBFE, #007DBB); }
.fd-btn.whatsapp { background: #25D366; }
.fd-btn.fd-toggle { background: linear-gradient(135deg, #2b2f3b, #15161f); width: 58px; height: 58px; box-shadow: 0 8px 22px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.08); }
.fd-btn.fd-toggle svg { width: 28px; height: 28px; }
.fd-btn.fd-top { background: #1a1a2e; opacity: 0; pointer-events: none; transform: translateY(8px) scale(.8); }
.float-dock.show-top .fd-top { opacity: 1; pointer-events: auto; transform: none; }
/* nhãn tooltip */
.fd-contacts .fd-btn::after {
  content: attr(data-label); position: absolute; right: 64px; top: 50%; transform: translateY(-50%);
  background: #1a1a2e; color: #fff; font-size: 12px; font-weight: 700; padding: 6px 11px; border-radius: 8px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .18s; box-shadow: 0 6px 16px rgba(0,0,0,.2);
}
.fd-contacts .fd-btn:hover::after { opacity: 1; }
/* nhóm 4 nút liên hệ: ẩn -> bung khi .open */
.fd-contacts { display: flex; flex-direction: column; gap: 12px; }
.fd-contacts .fd-btn { opacity: 0; transform: translateY(14px) scale(.6); pointer-events: none; transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .25s; }
.float-dock.open .fd-contacts .fd-btn { opacity: 1; transform: none; pointer-events: auto; }
.float-dock.open .fd-contacts .fd-btn:nth-child(1) { transition-delay: .03s; }
.float-dock.open .fd-contacts .fd-btn:nth-child(2) { transition-delay: .08s; }
.float-dock.open .fd-contacts .fd-btn:nth-child(3) { transition-delay: .13s; }
.float-dock.open .fd-contacts .fd-btn:nth-child(4) { transition-delay: .18s; }
.float-dock.open .fd-toggle { transform: rotate(360deg); }
@media (max-width: 600px) {
  .float-dock .fd-btn { width: 46px; height: 46px; }
  .float-dock .fd-btn svg { width: 23px; height: 23px; }
  .fd-btn.fd-toggle { width: 52px; height: 52px; }
}
