/* =======================================================
   FDB AUDIO VIỆT NAM - MAIN STYLESHEET (HOÀN CHỈNH)
   Đã hợp nhất và tối ưu hóa từ style1.css & 635ece75.css
   ======================================================= */

:root {
  --black: #050505;
  --black2: #121212;
  --white: #ffffff;
  --paper: #f8f9fa; 
  --ink: #111111;
  --muted: #6c757d;
  --line: #e9ecef;
  --blue: #0071e3; 
  --blue2: #0056b3;
  --blue-soft: #e1f0ff;
  --max: 1280px;
  --radius: 20px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.12);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.3s var(--ease);
}

body.dark-mode {
  --white: #161617;
  --paper: #000000;
  --ink: #f5f5f7;
  --muted: #86868b;
  --line: #2d2d2f;
  background-color: var(--paper);
  color: var(--ink);
}

body.dark-mode .series-card, 
body.dark-mode .catalog-card,
body.dark-mode .empty, 
body.dark-mode .contact-panel:not(.dark),
body.dark-mode .dl-table, 
body.dark-mode .detail-page,
body.dark-mode .features-block,
body.dark-mode .simple-note {
  background-color: #1c1c1e !important; 
  border-color: var(--line) !important; 
  color: var(--ink) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2) !important;
}

body.dark-mode .specs th { background-color: #2c2c2e !important; color: #fff !important; }
body.dark-mode .specs tr:nth-child(even) { background: #1a1a1c !important; }
body.dark-mode .specs tr:hover td { background: #2c2c2e !important; }
body.dark-mode .detail-media, body.dark-mode .zoom-spec-box { background: #1a1a1c !important; border-color: var(--line) !important; }
body.dark-mode .detail-contact { background: #101a2c !important; border-color: #1e3a5f !important; }

body.dark-mode .series-img-btn { 
  background: #222226 !important; 
  border-color: rgba(255,255,255,0.12) !important; 
}

/* --- Reset & Base --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: var(--ink); background: var(--white); line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
button, input { font: inherit; border: none; outline: none; }
button { cursor: pointer; transition: var(--transition); }

/* --- Keyframe Animations (Đặt ở phạm vi gốc chuẩn CSS) --- */
@keyframes fadeInUp { 
  from { opacity: 0; transform: translateY(20px); } 
  to { opacity: 1; transform: translateY(0); } 
}

@keyframes fadeInDown { 
  from { opacity: 0; transform: translateY(-10px); } 
  to { opacity: 1; transform: translateY(0); } 
}

@keyframes spin { 
  0% { transform: rotate(0deg); } 
  100% { transform: rotate(360deg); } 
}

@keyframes fdbFadeIn { 
  from { opacity: 0; } 
  to { opacity: 1; } 
}

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 1000; 
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
body.dark-mode .site-header {
  background: rgba(22, 22, 23, 0.85);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.header-inner {
  max-width: var(--max); margin: auto; padding: 0 28px; min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.brand img { height: 32px; width: auto; transition: transform 0.3s var(--ease); }
.brand:hover img { transform: scale(1.05); } 
.brand-divider { width: 1px; height: 24px; background: var(--line); }
body.dark-mode .brand-divider { background: #333; }
.brand-vn { font-size: 11px; font-weight: 700; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; }

.header-right { display: flex; align-items: center; gap: 12px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav button, .nav a {
  background: transparent; color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
.nav button:hover, .nav a:hover { background: rgba(0,0,0,0.05); }
.nav button.active { color: var(--blue); background: var(--blue-soft); }
body.dark-mode .nav button:hover, body.dark-mode .nav a:hover { background: rgba(255,255,255,0.08); }
body.dark-mode .nav button.active { color: #fff; background: rgba(0, 113, 227, 0.2); }

.nav .nav-call { background: var(--blue); color: #fff; font-weight: 700; }
.nav .nav-call:hover { background: var(--blue2); transform: translateY(-1px); }

.header-tools { display: flex; align-items: center; gap: 8px; }
.theme-toggle-btn {
  background: var(--paper);
  border: 1px solid var(--line);
  color: var(--ink);
  height: 36px;
  min-width: 36px;
  padding: 0 12px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}
.theme-toggle-btn:hover {
  background: var(--line);
  transform: translateY(-1px);
}
body.dark-mode .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
body.dark-mode .theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* GIAO DIỆN NÚT ĐỔI NGÔN NGỮ KÈM CỜ DÙNG CHUNG TOÀN TRANG */
.lang-switch {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.lang-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 5px 10px !important;
  border-radius: 6px !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.05) !important;
  color: inherit !important;
  cursor: pointer !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  transition: all 0.2s ease !important;
}

.lang-btn svg {
  flex-shrink: 0 !important;
  display: block !important;
  border-radius: 2px !important;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.4) !important;
}

.lang-btn.active {
  background: #0071e3 !important;
  border-color: #0071e3 !important;
  color: #ffffff !important;
}

.menu { display: none; background: none; border: 0; color: var(--ink); font-size: 24px; }

/* --- Navigation & Layout --- */
.page { display: none; opacity: 0; }
.page.active { display: block; animation: fadeInUp 0.6s var(--ease) forwards; }

.container { max-width: var(--max); margin: auto; padding: 0 28px; }
.section-pad { padding: 80px 0; }

.kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; display: block; }
.page-title {
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.1; font-weight: 800; letter-spacing: -2px; color: var(--ink);
}
.page-intro { color: var(--muted); max-width: 640px; font-size: 17px; margin-top: 16px; font-weight: 400; line-height: 1.6; }

.btn {
  border: 0; border-radius: var(--radius-sm); padding: 14px 24px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 13px; font-weight: 700; transition: var(--transition); letter-spacing: 0.3px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 2px 14px rgba(0,113,227,0.3); }
.btn-primary:hover { background: var(--blue2); box-shadow: 0 6px 20px rgba(0,113,227,0.4); transform: translateY(-2px); }
.btn-dark { background: var(--black); color: #fff; }
.btn-dark:hover { background: #242424; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--blue); border: 2px solid var(--blue); }
.btn-outline:hover { background: var(--blue-soft); border-color: var(--blue); }
body.dark-mode .btn-outline { color: #fff; border-color: rgba(255,255,255,0.3); }
body.dark-mode .btn-outline:hover { background: rgba(255,255,255,0.1); border-color: #fff; }

/* --- Thanh tìm kiếm Mini --- */
.header-search-mini {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 1001;
  background: var(--paper);
  padding: 6px 14px;
  border-radius: 30px;
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}
.header-search-mini input {
  width: 130px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
  color: var(--ink);
  padding: 2px 0;
  transition: width 0.3s var(--ease);
}
.header-search-mini input::placeholder { color: var(--muted); opacity: 0.8; }
.header-search-mini input:focus { width: 180px; }
.header-search-mini button {
  background: var(--blue-soft);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--blue); cursor: pointer; transition: var(--transition);
}
.header-search-mini button:hover { background: var(--blue); color: #fff; transform: scale(1.1); }
body.dark-mode .header-search-mini { background: #1c1c1e; border-color: #333; }
body.dark-mode .header-search-mini input { color: #fff; }

/* --- Hero Section --- */
.hero { min-height: 80vh; display: flex; align-items: center; position: relative; overflow: hidden; background: #000; }
.hero-bg-layer {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background-position: center; background-repeat: no-repeat;
  background-size: cover;
}
.hero::before, .hero::after { display: none !important; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7)); z-index: 2; }
.hero .container { position: relative; z-index: 3; color: #fff; }
.hero .page-title, .hero .page-intro { color: #fff; }
.hero .kicker { color: rgba(255,255,255,0.8); }

/* --- Series Section --- */
.series-section { background: var(--paper); }
.series-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 40px; }
.series-head p { max-width: 520px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.series-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.series-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px; display: flex; flex-direction: column; height: auto; 
  transition: var(--transition); box-shadow: var(--shadow-sm);
}
.series-card:hover { border-color: transparent; box-shadow: var(--shadow-lg); transform: translateY(-5px) scale(1.01); }
.series-card h3 { font-size: 24px; font-weight: 800; line-height: 1.2; margin: 2px 0 2px; letter-spacing: -1px; }
.series-card p { font-size: 13px; color: var(--muted); margin-bottom: 12px; line-height: 1.5; }
.series-img-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: auto; }
.series-img-btn {
  background: #ffffff; border: 1px solid var(--line); border-radius: 6px; padding: 3px; 
  cursor: pointer; transition: var(--transition); display: flex; align-items: center; 
  justify-content: center; width: 100%; height: 55px; box-shadow: 0 2px 2px rgba(0,0,0,0.05);
}
.series-img-btn:hover { border-color: #0071e3; box-shadow: 0 2px 12px rgba(0,113,227,0.2); transform: translateY(-2px); }
.series-img-btn img { width: 100%; height: 100%; object-fit: fill; border-radius: 3px; display: block; }

.css-series-box { 
  width: 100%; height: 100%; margin: 0; padding: 0 15px; display: flex; flex-direction: row; 
  align-items: center; justify-content: flex-start; gap: 12px; background: #0071e3; border-radius: 3px; 
}
.css-series-id { font-size: 32px; font-weight: 900; color: #fff; line-height: 1; letter-spacing: -1px; }
.css-series-info { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; text-align: left; }
.css-series-lbl { display: block !important; font-size: 11px; font-weight: 900; color: #fff; letter-spacing: 1px; line-height: 1; margin-bottom: 3px; }
.css-series-name { 
  font-size: 10px; font-weight: 700; line-height: 1.3; color: rgba(255, 255, 255, 0.95); 
  text-transform: uppercase; white-space: normal; overflow: hidden; display: -webkit-box;
  -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}

.simple-note { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.simple-note-inner { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 30px 28px; }
.simple-note strong { font-size: 16px; font-weight: 700; }
.simple-note span { font-size: 13px; color: var(--muted); margin-left: 8px; }

/* --- Catalog Page --- */
.list-page { background: var(--paper); min-height: calc(100vh - 72px); }
.list-top { padding: 60px 0 30px; }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.crumb button { border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 600; padding: 0; transition: var(--transition); }
.crumb button:hover { color: var(--blue2); text-decoration: underline; }

.model-grid { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 24px; 
  padding-bottom: 80px; 
}

.catalog-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.catalog-card:hover { 
  transform: translateY(-4px); 
  box-shadow: var(--shadow-lg); 
  border-color: rgba(0, 113, 227, 0.2); 
}

.catalog-img {
  width: 100%;
  height: 260px;
  background: #f5f5f7;
  padding: 2px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark-mode .catalog-img { 
  background: #1a1a1c !important; 
}

.catalog-img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
}

.catalog-body {
  padding: 14px 18px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.catalog-body .eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 3px;
  display: block;
}

.catalog-body h3 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 6px;
  word-break: break-word;
  line-height: 1.25;
  letter-spacing: -0.3px;
}

.catalog-body p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.catalog-more {
  margin-top: auto;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 2px;
}
.catalog-more::after { content: "→"; transition: transform 0.3s var(--ease); }
.catalog-card:hover .catalog-more::after { transform: translateX(2px); }

.empty { grid-column: 1/-1; background: var(--white); border: 2px dashed var(--line); border-radius: var(--radius); padding: 60px 30px; text-align: center; color: var(--muted); box-shadow: var(--shadow-sm); }
.empty strong { display: block; color: var(--ink); font-size: 18px; font-weight: 700; margin-bottom: 8px; }

/* =======================================================
   TRANG CHI TIẾT SẢN PHẨM & SLIDER
   ======================================================= */
.detail-page { background: var(--white); min-height: calc(100vh - 72px); padding: 40px 0 80px; }
.detail-top { margin-bottom: 30px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: start; }
.detail-layout > div { min-width: 0; width: 100%; }
.detail-media-wrap { position: sticky; top: 100px; } 

.detail-media {
  position: relative;
  width: 100%;
  height: 400px;
  padding: 0 !important;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #f8f9fa;
}

.detail-media img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
  mix-blend-mode: multiply;
}

body.dark-mode .detail-media img {
  mix-blend-mode: normal; 
}

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.85); color: var(--ink); border: 0;
  width: 44px; height: 44px; border-radius: 50%; font-size: 16px; display: flex; align-items: center; justify-content: center; 
  transition: var(--transition); z-index: 10; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); box-shadow: var(--shadow-sm);
}
body.dark-mode .slider-btn { background: rgba(30,30,30,0.7); color: #fff; }
.slider-btn:hover { background: var(--blue); color: #fff; box-shadow: var(--shadow-md); transform: translateY(-50%) scale(1.05); }
.slider-prev { left: 16px; } 
.slider-next { right: 16px; }

.detail-media::after {
  content: "🔍 Phóng to";
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  pointer-events: none;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 5;
  transition: var(--transition);
}
.detail-media:hover::after {
  background: var(--blue);
}

.slider-dots {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 6px 2px;
  overflow-x: auto;
}

.thumb-btn {
  flex: 0 0 68px;
  width: 68px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--line);
  background: var(--white);
  padding: 2px;
  cursor: pointer;
  transition: var(--transition);
}

body.dark-mode .thumb-btn { background: #1c1c1e; border-color: #333; }
.thumb-btn:hover { border-color: var(--blue); transform: translateY(-2px); }
.thumb-btn.active { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); transform: translateY(-2px); }
.thumb-btn img { width: 100%; height: 100%; object-fit: contain; background: #f5f5f7; border-radius: 2px; display: block; }
body.dark-mode .thumb-btn img { background: #1a1a1c; }

.detail-info { padding-top: 10px; }
.detail-series { color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; display: block; }
.detail-title { font-size: clamp(32px, 4.5vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -1.5px; margin: 0 0 10px; word-break: break-word; color: var(--ink); }
.detail-subtitle { font-size: 17px; color: var(--muted); font-weight: 400; line-height: 1.5; }
.detail-desc { font-size: 15px; color: var(--ink); margin: 24px 0; max-width: 650px; white-space: pre-line; line-height: 1.7; opacity: 0.9; }

.features-block { margin: 30px 0; background: #f8f9fa; padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.features-block h3 { font-size: 18px; font-weight: 700; margin-bottom: 12px; color: var(--ink); }
.features-block ul { padding-left: 20px; font-size: 14px; color: var(--muted); display: grid; grid-template-columns: 1fr 1fr; row-gap: 8px; column-gap: 20px; }
.features-block li { margin-bottom: 6px; line-height: 1.5; }

.spec-block { margin-top: 20px; width: 100%; overflow-x: auto; }
.spec-block h3 { font-size: 17px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--line); color: var(--ink); }
.specs { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.specs th, .specs td { text-align: left; padding: 8px 12px; border: 1px solid var(--line); vertical-align: middle; line-height: 1.35; }
.specs th { width: 34%; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.specs td { color: var(--ink); font-weight: 500; text-align: center; }
.specs tr:last-child td, .specs tr:last-child th { border-bottom: none; }
.specs tr:nth-child(even) { background: transparent; } 
.specs tr:hover td { background: var(--paper); color: var(--blue); } 

.zoom-spec-box { 
  position: relative; overflow: hidden; cursor: pointer; width: 100%; 
  margin-top: 14px; border-radius: var(--radius-sm); border: 1px solid var(--line); 
  background: #fff; padding: 15px; box-shadow: var(--shadow-sm); display: block;
  -webkit-tap-highlight-color: transparent;
  transition: var(--transition);
}
.zoom-spec-box:hover { border-color: var(--blue); box-shadow: var(--shadow-md); }
.zoom-spec-box:active { opacity: 0.85; }
body.dark-mode .zoom-spec-box { background: #1a1a1c !important; border-color: var(--line) !important; }
.zoom-spec-box img { width: 100%; display: block; object-fit: contain; pointer-events: none; }

.detail-contact { margin-top: 30px; padding: 24px; border-radius: var(--radius); background: var(--blue-soft); border: 1px solid rgba(0,113,227,0.1); box-shadow: var(--shadow-sm); }
body.dark-mode .detail-contact { background: rgba(0, 113, 227, 0.1); border-color: rgba(0, 113, 227, 0.2); }
.detail-contact strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.contact-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.contact {
  display: inline-flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: #fff;
  min-height: 44px; padding: 0 20px; font-size: 13px; font-weight: 700; transition: var(--transition); box-shadow: var(--shadow-sm);
}
.contact:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.contact:active { transform: translateY(0); }
.call { background: #d51d1d; box-shadow: 0 2px 12px rgba(213,29,29,0.2); }
.zalo { background: #0068ff; box-shadow: 0 2px 12px rgba(0,104,255,0.2); }
.whatsapp { background: #1dae56; box-shadow: 0 2px 12px rgba(29,174,86,0.2); }
.viber { background: #7360f2; box-shadow: 0 2px 12px rgba(115,96,242,0.2); }

/* --- Downloads Page --- */
#download-page .dl-tabs, .dl-content {
  max-width: 800px; margin-left: auto; margin-right: auto;
}
.dl-tabs { display: flex; gap: 5px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 0; }
.dl-tab-btn { 
  background: transparent; border: none; padding: 8px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; 
  font-size: 14px; font-weight: 600; color: var(--muted); transition: var(--transition); cursor: pointer; position: relative;
}
.dl-tab-btn::after {
  content: ""; position: absolute; bottom: 0; left: 16px; right: 16px; height: 3px; 
  background: var(--blue); transform: scaleX(0); transition: var(--transition);
}
.dl-tab-btn:hover { color: var(--blue); }
.dl-tab-btn.active { color: var(--blue); font-weight: 700; }
.dl-tab-btn.active::after { transform: scaleX(1); }

.dl-table { 
  width: 100%; border-collapse: collapse; background: var(--white); 
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.dl-table th, .dl-table td { padding: 9px 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dl-table th { background: #f5f5f7; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
body.dark-mode .dl-table th { background: #1a1a1c; }
.dl-table td { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.dl-table tr:last-child td { border-bottom: none; }
.dl-table tr:hover td { background: var(--paper); }
.dl-table th:last-child, .dl-table td:last-child { width: 130px; text-align: center; padding-right: 15px; }
.dl-table th:first-child, .dl-table td:first-child { padding-left: 18px; }

.dl-btn { 
  display: inline-flex; align-items: center; justify-content: center; padding: 5px 14px; 
  background: var(--blue-soft); color: var(--blue); font-size: 11px; font-weight: 700; 
  border-radius: var(--radius-sm); text-transform: uppercase; transition: var(--transition);
}
body.dark-mode .dl-btn { background: rgba(0, 113, 227, 0.15); }
.dl-btn:hover { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); transform: translateY(-1px); }

/* --- Contact Page --- */
.contact-page { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 30px; align-items: start; }
.contact-panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: var(--white); box-shadow: var(--shadow-md); }
.contact-panel.dark { background: var(--black); color: #fff; border-color: var(--black); box-shadow: var(--shadow-lg); }
.contact-panel h2 { font-size: 32px; font-weight: 800; line-height: 1.1; margin-bottom: 12px; letter-spacing: -1px; }
.contact-panel p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.contact-panel.dark p { color: #a9a9a9; }
.contact-phone { font-size: 32px; font-weight: 900; margin: 24px 0; color: var(--blue); letter-spacing: -1px; }
.contact-panel.dark .contact-phone { color: #fff; }
.contact-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-links .contact { font-size: 14px; height: 48px; }

/* --- Footer --- */
footer { 
  background: #161617; color: #86868b; padding: 22px 28px; font-size: 12px; 
  border-top: 1px solid rgba(255,255,255,0.05); line-height: 1.5; 
}
.footer-content { max-width: var(--max); margin: auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-left { text-align: left; max-width: 500px; }
.footer-left strong { color: #fff; font-size: 13px; display: inline-block; font-weight: 700; }
.footer-right { text-align: right; max-width: 550px; color: #6e6e73; }
.footer-right p { margin: 2px 0; }

/* --- Side Contact Bar --- */
.side-contact-bar { position: fixed; right: 20px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 999; }
.sc-item { 
  width: 50px; height: 50px; background-color: var(--white); border: 1px solid var(--line); 
  display: flex; align-items: center; justify-content: center; color: var(--ink); 
  border-radius: 50%; transition: var(--transition); position: relative; box-shadow: var(--shadow-md); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
body.dark-mode .sc-item { background-color: rgba(30,30,32,0.85); border-color: rgba(255,255,255,0.1); color: #fff; }
.sc-item:hover { background-color: var(--blue); color: #fff; border-color: var(--blue); transform: scale(1.1); box-shadow: var(--shadow-lg); }
.sc-item.to-top { margin-top: 10px; background-color: var(--ink); color: var(--white); border: none; }
body.dark-mode .sc-item.to-top { background-color: #fff; color: #000; }
.sc-item.to-top:hover { background-color: var(--blue); color: #fff; }
.sc-item::after { 
  content: attr(data-tooltip); position: absolute; right: 60px; top: 50%; transform: translateY(-50%) translateX(10px); 
  background: var(--black); color: #fff; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; 
  white-space: nowrap; opacity: 0; visibility: hidden; transition: var(--transition); pointer-events: none; box-shadow: var(--shadow-md);
}
body.dark-mode .sc-item::after { background: #fff; color: #000; }
.sc-item:hover::after { opacity: 1; visibility: visible; transform: translateY(-50%) translateX(0); }

/* --- Sync Toast --- */
.sync-toast {
  position: fixed; 
  bottom: 24px; 
  left: 50%; 
  transform: translateX(-50%) translateY(100px);
  background: var(--paper); 
  color: var(--ink); 
  padding: 10px 20px; 
  border-radius: 30px;
  box-shadow: var(--shadow-md); 
  border: 1px solid var(--line); 
  display: flex; 
  align-items: center;
  gap: 12px; 
  font-size: 13px; 
  font-weight: 600; 
  z-index: 9999; 
  opacity: 0; 
  visibility: hidden;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}
.sync-toast.show { 
  transform: translateX(-50%) translateY(0); 
  opacity: 1; 
  visibility: visible; 
}
body.dark-mode .sync-toast { 
  background: #1c1c1e; 
  border-color: #333; 
  color: #fff; 
}
.sync-spinner {
  width: 16px; 
  height: 16px; 
  border: 2px solid var(--blue-soft); 
  border-top: 2px solid var(--blue);
  border-radius: 50%; 
  animation: spin 1s linear infinite;
}

/* --- Configuration Zoom Box --- */
.config-zoom-box {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
body.dark-mode .config-zoom-box {
  background: #1c1c1e !important;
  border-color: var(--line) !important;
}
.config-zoom-inner {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #f8f9fa;
  cursor: crosshair;
  touch-action: pan-y;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark-mode .config-zoom-inner {
  background: #141416;
}
.config-zoom-inner img {
  max-width: 100%;
  max-height: 650px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
  transition: transform 0.15s ease-out;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}
.config-zoom-hint {
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  color: var(--blue);
  font-weight: 600;
  -webkit-user-select: none;
  user-select: none;
}
.hint-desktop { display: inline-block; }
.hint-mobile { display: none; }

/* --- Full Specs Block --- */
.detail-full-specs {
  margin-top: 36px;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.detail-full-specs .spec-block {
  width: 100%;
  margin-top: 0;
}
.detail-full-specs .features-block {
  width: 100%;
  margin: 0 0 28px 0;
}
.detail-full-specs .features-block ul {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

/* --- Tối ưu hóa PhotoSwipe (nếu dùng) --- */
.pswp__img { 
  object-fit: contain !important; 
  object-position: center !important;
}

/* --- Chống copy & kéo thả ảnh --- */
img {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-select: none;
  user-select: none;
}

/* --- Khóa tràn viền chiều ngang --- */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* =======================================================
   LIGHTBOX OVERLAY (XEM ẢNH PHÓNG TO, CHUYỂN ẢNH, ZOOM)
   ======================================================= */
.fdb-lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  user-select: none;
  animation: fdbFadeIn 0.2s ease-out;
}
.fdb-lightbox-overlay.fdb-lb-closing {
  opacity: 0;
  transition: opacity 0.2s ease;
}
.fdb-lb-header {
  height: 60px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  z-index: 10;
}
.fdb-lb-counter {
  font-size: 14px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.15);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}
.fdb-lb-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.fdb-lb-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.fdb-lb-btn:hover {
  background: #0071e3;
  border-color: #0071e3;
  transform: scale(1.05);
}
.fdb-lb-close-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  justify-content: center;
  font-size: 18px;
}
.fdb-lb-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 10px 70px;
}
.fdb-lb-viewport {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.fdb-lb-viewport img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease-out;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.fdb-lb-viewport img.is-zoomed {
  cursor: grab;
}
.fdb-lb-viewport img.is-zoomed:active {
  cursor: grabbing;
}
.fdb-lb-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}
.fdb-lb-arrow:hover {
  background: #0071e3;
  border-color: #0071e3;
  transform: translateY(-50%) scale(1.1);
}
.fdb-lb-prev { left: 20px; }
.fdb-lb-next { right: 20px; }
.fdb-lb-footer {
  height: 85px;
  padding: 10px 20px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}
.fdb-lb-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  max-width: 90vw;
  padding: 4px;
}
.fdb-lb-thumb-btn {
  flex: 0 0 65px;
  width: 65px;
  height: 50px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: #111;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}
.fdb-lb-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.fdb-lb-thumb-btn.active {
  border-color: #0071e3;
  box-shadow: 0 0 10px #0071e3;
  transform: scale(1.08);
}

/* =======================================================
   RESPONSIVE DESIGN (THEO THỨ TỰ ƯU TIÊN CHUẨN CSS)
   ======================================================= */

/* 1. Màn hình Laptop & Desktop nhỏ (<= 1024px) */
@media (max-width: 1024px) {
  :root { --max: 100%; }
  .detail-layout { gap: 30px; padding-right: 0; }
  .side-contact-bar {
    right: 15px; bottom: 15px; top: auto;
    transform: none; flex-direction: row; gap: 8px;
  }
  .sc-item { width: 44px; height: 44px; }
  .sc-item.to-top { margin-top: 0; }
  .sc-item::after { display: none; }
}

/* 2. Màn hình Tablet ngang (<= 950px) */
@media (max-width: 950px) {
  .section-pad { padding: 60px 0; }
  .series-grid { grid-template-columns: 1fr; gap: 20px; }
  .model-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .detail-media-wrap { position: relative; top: 0; }
  .detail-media { min-height: 380px; }
  .detail-media img { height: 320px; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* 3. Màn hình Tablet & Mobile lớn (<= 768px) */
@media (max-width: 768px) {
  .config-zoom-inner img { max-height: 450px; }
  .fdb-lb-body { padding: 10px; }
  .fdb-lb-viewport img { max-width: 96vw; max-height: 70vh; }
  .fdb-lb-arrow { width: 40px; height: 40px; font-size: 24px; }
  .fdb-lb-prev { left: 8px; }
  .fdb-lb-next { right: 8px; }
  .fdb-lb-thumb-btn { flex: 0 0 50px; width: 50px; height: 38px; }
}

/* 4. Màn hình Mobile chuẩn (<= 760px) */
@media (max-width: 760px) {
  .header-inner { min-height: 64px; padding: 0 16px; } 
  .brand img { height: 28px; }
  .brand-divider, .brand-vn { display: none; }
  .menu { display: block; }
  .nav { 
    display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--black); 
    padding: 20px; flex-direction: column; align-items: stretch; gap: 8px;
    border-bottom: 1px solid #222; animation: fadeInDown 0.3s var(--ease);
  }
  .nav.open { display: flex; } 

  .nav.open ~ .header-search-mini,
  .site-header:has(.nav.open) .header-search-mini {
    display: none;
  }

  .nav button, .nav a { text-align: left; color: #ccc; padding: 12px; }
  .nav button:hover, .nav a:hover { background: rgba(255,255,255,0.1); color: #fff; }
  .nav button.active { background: rgba(0,113,227,0.2); color: #fff; }
  .hero { min-height: 220px; background: #000; }
  
  .hero-bg-layer { background-size: contain; }
  .series-head { display: block; margin-bottom: 25px; }
  .series-head p { margin-top: 10px; font-size: 14px; }
  .simple-note-inner { display: block; padding: 20px 16px; text-align: center; }
  .simple-note .btn { margin-top: 16px; width: 100%; }
  .footer-content { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .footer-left, .footer-right { text-align: center; max-width: 100%; }

  .header-right { position: static !important; }
  .header-search-mini { 
    top: 72px; 
    right: 16px; 
    left: auto;
    width: 42px;
    padding: 6px;
    overflow: hidden;
    justify-content: flex-end;
    transition: width 0.3s ease;
  }
  
  /* 👉 Khi chạm vào ô tìm kiếm HOẶC khi bấm nút Micro */
  .header-search-mini:focus-within,
  .header-search-mini.is-listening {
    width: calc(100% - 32px) !important;
    justify-content: space-between !important;
    padding: 6px 14px !important;
  }
  .header-search-mini input { 
    width: 0;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.2s ease;
  }
  
  /* 👉 Tự động mở rộng ô nhập để thấy chữ 'Đang nghe...' */
  .header-search-mini:focus-within input,
  .header-search-mini.is-listening input {
    width: 100% !important;
    opacity: 1 !important;
  }

  .detail-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 340px;
    min-height: 240px;
    padding: 8px;
    height: auto !important;
  }
  .detail-media img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
  }
}

/* 5. Màn hình Mobile nhỏ (<= 560px) */
@media (max-width: 560px) {
  .container { padding: 0 16px; }
  .series-img-grid { grid-template-columns: 1fr; }
  .series-card { padding: 20px; }
  .model-grid { grid-template-columns: 1fr; gap: 16px; }
  .catalog-img { height: 200px; }
  .catalog-body {
    padding: 16px 20px;
    display: flex; 
    flex-direction: column;
  }
  .detail-page { padding: 20px 0 60px; }
  .detail-media { min-height: 280px; padding: 15px; } 
  .detail-media img { height: 240px; }
  .thumb-btn { width: 48px; height: 38px; flex: 0 0 48px; }
  .contact-links { grid-template-columns: 1fr; }
  .features-block ul { grid-template-columns: 1fr; }
  .spec-block { overflow-x: hidden; }
  .specs { width: 100%; min-width: 0; table-layout: fixed; font-size: 11px; }
  .specs th,
  .specs td { padding: 7px 5px; line-height: 1.3; overflow-wrap: anywhere; word-break: break-word; }
  .specs th { width: 38% !important; min-width: 0 !important; font-size: 10px; letter-spacing: 0; }
  .specs td { font-size: 11px; }
  .dl-tabs { overflow-x: auto; }
  .dl-tab-btn { padding: 8px 12px; font-size: 13px; white-space: nowrap; }
}

/* 6. Thiết bị cảm ứng / không hỗ trợ hover */
@media (hover: none) {
  .hint-desktop { display: none; }
  .hint-mobile { display: inline-block; }
  .config-zoom-box { padding: 10px; }
  .config-zoom-inner { cursor: zoom-in; min-height: 180px; }
  .config-zoom-box.is-zoomed .config-zoom-inner { cursor: zoom-out; }
  .config-zoom-box.is-zoomed {
    border-color: var(--blue);
    box-shadow: 0 0 0 2px var(--blue-soft);
  }
}
