/* ==========================================================================
   PHIÊN BẢN ĐIỆN THOẠI (MOBILE VERSION) - VIỄN ĐÔNG ELECTRIC (ABB)
   Chuẩn UX/UI Mobile của CADIVI.VN + Tối ưu thao tác cảm ứng & Khung giả lập
   ========================================================================== */

:root {
  --primary-red: #cb212a;
  --primary-red-bright: #cb212a;
  --primary-blue: #1b4c98;
  --primary-blue-dark: #0c254e;
  --text-main: #222222;
  --text-body: #333333;
  --text-muted: #555555;
  --font-main: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-heading: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

section[id],
div[id],
footer[id] {
  scroll-margin-top: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-body);
  background: #f2f4f7;
  overflow-x: hidden;
  max-width: 100vw;
  letter-spacing: normal;
  word-spacing: normal;
}

h1, h2, h3, h4, h5, h6, p, span, a, button, input, select {
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  letter-spacing: normal;
}

a {
  color: var(--text-body);
  text-decoration: none;
  transition: all 0.25s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   THANH ĐIỀU KHIỂN XEM TRÊN MÁY TÍNH (DESKTOP SIMULATOR BAR)
   Tự động ẩn trên màn hình điện thoại thật (< 600px)
   ========================================================================== */
.sim-toolbar {
  background: #0c254e;
  color: #ffffff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  position: relative;
  z-index: 3000;
  border-bottom: 2px solid var(--primary-red-bright);
}

.sim-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.sim-badge {
  background: var(--primary-red-bright);
  color: #ffffff;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: normal;
}

.sim-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sim-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-main);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.sim-btn.active,
.sim-btn:hover {
  background: var(--primary-red-bright);
  border-color: var(--primary-red-bright);
  color: #ffffff !important;
}

.sim-btn-desktop {
  background: #ffffff;
  color: #0c254e !important;
  border-color: #ffffff;
}

.sim-btn-desktop:hover {
  background: #ffd600;
  border-color: #ffd600;
  color: #111111 !important;
}

/* Khung giả lập Smartphone khi xem trên PC */
body.phone-frame-mode {
  background: radial-gradient(circle at top, #1e3a6d 0%, #09152b 100%);
  min-height: 100vh;
  padding-bottom: 30px;
}

body.phone-frame-mode .mobile-shell {
  max-width: 430px;
  margin: 18px auto;
  background: #ffffff;
  border-radius: 38px;
  border: 10px solid #1c2433;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  position: relative;
}

/* Tai thỏ / Dynamic Island khi ở chế độ khung điện thoại */
.phone-notch {
  display: none;
}

body.phone-frame-mode .phone-notch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 8px 20px 4px;
  font-size: 12px;
  font-weight: 700;
  color: #111111;
  border-bottom: 1px solid #f0f0f0;
}

.notch-pill {
  width: 96px;
  height: 20px;
  background: #111111;
  border-radius: 20px;
}

/* Chế độ Rộng toàn màn hình hoặc trên Điện thoại thật */
body:not(.phone-frame-mode) .mobile-shell {
  max-width: 540px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.08);
}

@media screen and (max-width: 768px) {
  .sim-toolbar {
    display: none !important;
  }
  body.phone-frame-mode {
    background: #ffffff;
    padding-bottom: 0;
  }
  body.phone-frame-mode .mobile-shell,
  body:not(.phone-frame-mode) .mobile-shell {
    max-width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  body.phone-frame-mode .phone-notch,
  .phone-notch {
    display: none !important;
  }
}

/* ==========================================================================
   1. HEADER MOBILE CHUẨN CADIVI.VN (.mb-header + .menu_mobile + .formSearch_mb)
   ========================================================================== */
.mb-header {
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--primary-red);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.mb-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  gap: 8px;
}

.mb-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.mb-logo img {
  height: 44px;
  width: auto;
  flex-shrink: 0;
}

.mb-logo-text {
  min-width: 0;
}

.mb-logo-text strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 12.5px;
  line-height: 16px;
  font-weight: 700;
  color: var(--primary-blue);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: normal;
}

.mb-logo-text span {
  display: block;
  font-family: var(--font-heading);
  font-size: 12px;
  line-height: 16px;
  font-weight: 700;
  color: var(--primary-blue);
  text-transform: uppercase;
  white-space: nowrap;
  letter-spacing: normal;
}

/* Nút vuông đỏ MENU (.icon_menu) chuẩn 100% CADIVI.VN Mobile */
.mb-header-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mb-search-toggle {
  width: 42px;
  height: 46px;
  background: #f3f4f6;
  border: 1px solid #e0e0e0;
  color: #333333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  gap: 2px;
}

.icon_menu {
  width: 50px;
  height: 46px;
  background: var(--primary-red-bright);
  color: #ffffff;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  gap: 2px;
}

.icon_menu svg {
  stroke: #ffffff;
}

/* Khung tìm kiếm mã SKU & Các dòng sản phẩm tại mục Sản phẩm */
.mb-prod-search-section {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  margin-bottom: 4px;
}

.mb-prod-search-section .formSearch_mb {
  padding: 12px 12px 10px;
  background: #ffffff;
}

.mb-prod-search-section .formSearch_mb .form-control {
  border-radius: 4px 0 0 4px;
}

.mb-prod-search-section .formSearch_mb button.btn {
  background: var(--primary-red);
  border-radius: 0 4px 4px 0;
}

.mb-prod-search-section .formSearch_mb button.btn:hover {
  background: var(--primary-red-bright);
}

.mb-prod-search-section .mb-quick-pills {
  padding: 8px 12px 10px;
  background: #f8fafc;
  border-top: 1px solid #ececec;
  border-bottom: none;
  -webkit-overflow-scrolling: touch;
}

/* Thanh tìm kiếm Mobile (.formSearch_mb) chuẩn CADIVI.VN */
.formSearch_mb {
  padding: 0 12px 10px;
  background: #ffffff;
  display: block;
}

.formSearch_mb .input-group {
  display: flex;
  width: 100%;
}

.formSearch_mb .form-control {
  flex: 1;
  height: 38px;
  border: 1px solid #d8d8d8;
  border-right: none;
  padding: 0 12px;
  font-size: 14px;
  font-style: italic;
  font-family: var(--font-main);
  color: #222222;
  outline: none;
}

.formSearch_mb .form-control:focus {
  border-color: var(--primary-red);
  font-style: normal;
}

.formSearch_mb button.btn {
  width: 46px;
  height: 38px;
  background: #444444;
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.formSearch_mb button.btn:hover {
  background: var(--primary-red-bright);
}

/* Thanh trượt danh mục nhanh dưới Header */
.mb-quick-pills {
  display: flex;
  overflow-x: auto;
  gap: 6px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-top: 1px solid #ececec;
  scrollbar-width: none;
}

.mb-quick-pills::-webkit-scrollbar {
  display: none;
}

.mb-pill {
  flex-shrink: 0;
  padding: 5px 12px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  color: #333333 !important;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  font-family: var(--font-heading);
}

.mb-pill.active,
.mb-pill:hover {
  background: var(--primary-red);
  color: #ffffff !important;
  border-color: var(--primary-red);
}

/* ==========================================================================
   OFF-CANVAS MOBILE DRAWER (.divmm) CHUẨN 100% CADIVI.VN
   ========================================================================== */
.divmm {
  position: fixed;
  inset: 0;
  z-index: 4000;
  visibility: hidden;
  pointer-events: none;
}

.divmm.show {
  visibility: visible;
  pointer-events: auto;
}

.divmmbg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.divmm.show .divmmbg {
  opacity: 1;
}

.mmContent {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 340px;
  background: #ffffff;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  display: flex;
  flex-direction: column;
  z-index: 2;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.35);
}

.divmm.show .mmContent {
  transform: translateX(0);
}

.mmTitle {
  background: var(--primary-red);
  color: #ffffff;
  padding: 14px 16px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.close-mmenu {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: none;
  width: 32px;
  height: 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.mmMenu {
  flex: 1;
  overflow-y: auto;
}

.mmMenu > ul > li {
  border-bottom: 1px solid #eeeeee;
  position: relative;
}

.mmMenu > ul > li > .mm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mmMenu > ul > li > .mm-row > a,
.mmMenu > ul > li > a {
  display: block;
  flex: 1;
  padding: 13px 16px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #222222 !important;
  text-transform: uppercase;
}

.mmMenu > ul > li > .mm-row > a:hover,
.mmMenu > ul > li > a:hover {
  color: var(--primary-red) !important;
}

.button-submenu {
  width: 46px;
  height: 46px;
  border: none;
  border-left: 1px solid #eeeeee;
  background: #fafafa;
  color: #333333;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.mm-sub-list {
  display: none;
  background: #f9f9fb;
  border-top: 1px solid #eeeeee;
  padding-left: 12px;
}

.mm-sub-list.open {
  display: block;
}

.mm-sub-list li {
  border-bottom: 1px solid #efefef;
}

.mm-sub-list li:last-child {
  border-bottom: none;
}

.mm-sub-list li a {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: #333333 !important;
}

.mm-sub-list li a:hover {
  color: var(--primary-red) !important;
}

/* ==========================================================================
   2. BANNER MOBILE SLIDER (.mb-banner)
   ========================================================================== */
.mb-banner {
  position: relative;
  overflow: hidden;
  background: #0c254e;
}

.mb-banner-slide {
  display: none;
  padding: 20px 15px 40px;
  color: #ffffff;
  position: relative;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.mb-banner-slide > * {
  position: relative;
  z-index: 2;
}

.mb-banner-slide::before {
  content: '';
  position: absolute;
  inset: -32px;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 1;
}

.mb-banner-slide:not(.active)::before {
  animation: none !important;
}

.mb-banner-slide.active::before {
  animation: mbGridMove 14s linear infinite;
}

.mb-banner-slide::after {
  display: none !important;
  content: '';
  position: absolute;
  top: -30%;
  left: -35%;
  width: 110px;
  height: 160%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0) 100%);
  transform: rotate(24deg);
  animation: mbBeamMove 6.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
  z-index: 1;
}

.mb-banner-slide.active {
  display: block;
  animation: mbSlideFadeIn 0.4s ease-out both;
}

.mb-banner-slide:not(.active) {
  animation: none !important;
}

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

.mb-bg-1 {
  background: linear-gradient(145deg, #0c254e 0%, #1b4c98 50%, #cb212a 92%, #1b4c98 100%);
  background-size: 200% 200%;
}

.mb-banner-slide.active.mb-bg-1 {
  animation: mbGradFlow 10s ease-in-out infinite alternate;
}

.mb-bg-2 {
  background: linear-gradient(145deg, #112240 0%, #1b4c98 55%, #90141b 92%, #1b4c98 100%);
  background-size: 200% 200%;
}

.mb-banner-slide.active.mb-bg-2 {
  animation: mbGradFlow 11s ease-in-out infinite alternate;
}

.mb-bg-3 {
  background: linear-gradient(145deg, #1b4c98 0%, #0d274c 60%, #cb212a 100%);
  background-size: 200% 200%;
}

.mb-banner-slide.active.mb-bg-3 {
  animation: mbGradFlow 12s ease-in-out infinite alternate;
}

@keyframes mbGradFlow {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

@keyframes mbGridMove {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(32px, 32px, 0); }
}

@keyframes mbBeamMove {
  0% { left: -35%; opacity: 0; }
  25% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 125%; opacity: 0; }
}

.mb-banner-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.96);
  color: var(--primary-blue-dark);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  border-left: 3px solid var(--primary-red-bright);
  margin-bottom: 8px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.4;
  border-radius: 2px;
  max-width: 100%;
  letter-spacing: normal;
}

.mb-banner-slide h2 {
  font-family: var(--font-heading);
  font-size: 18.5px;
  line-height: 1.35;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: block;
  word-break: normal;
  overflow-wrap: break-word;
  letter-spacing: normal;
  white-space: pre-line;
}

.mb-banner-slide h2 span {
  color: #ffffff !important;
}

/* Khung hình hiển thị banner header mobile cố định & thống nhất tỷ lệ 16:9 đồng nhất với PC */
.mb-banner-frame {
  background: #ffffff;
  padding: 5px 5px 0 5px;
  border-radius: 6px;
  border-bottom: 3.5px solid var(--primary-red);
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  display: block;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mb-banner-frame:active {
  transform: scale(0.985);
}

.mb-banner-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 4px 4px 0 0;
}

.mb-banner-caption {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--primary-blue);
  text-align: center;
  padding: 8px 8px 6px;
  text-transform: uppercase;
  line-height: 1.45;
  display: block;
  word-break: normal;
  overflow-wrap: break-word;
  letter-spacing: normal;
  background: #ffffff;
  border-top: 1px solid #f0f0f0;
  white-space: pre-line;
}

.mb-banner-slide p {
  font-size: 13.5px;
  line-height: 20px;
  color: #f0f4f8;
  white-space: pre-line;
  word-break: normal;
  overflow-wrap: break-word;
  margin-bottom: 14px;
}

.mb-banner-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 10px;
  border-top: 3px solid var(--primary-red-bright);
  margin-bottom: 14px;
}

.mb-banner-prod {
  text-align: center;
  background: #f7f7f7;
  padding: 6px 4px;
  border: 1px solid #e6e6e6;
}

.mb-banner-prod img {
  height: 64px;
  margin: 0 auto 4px;
  object-fit: contain;
}

.mb-banner-prod strong {
  display: block;
  font-size: 11px;
  color: #222222;
  text-transform: uppercase;
}

.mb-banner-dots {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.mb-dot {
  width: 24px;
  height: 5px;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
}

.mb-dot.active {
  background: #ffd600;
  width: 34px;
}

/* Nút chuẩn .view-more CADIVI */
.view-more a {
  display: inline-block;
  padding: 9px 20px;
  font-size: 13px;
  line-height: 20px;
  background: var(--primary-red);
  color: #ffffff !important;
  text-transform: uppercase;
  font-weight: 700;
}

.view-more a span {
  color: #ffffff !important;
  padding-right: 14px;
  position: relative;
}

.view-more a span::after {
  content: '›';
  position: absolute;
  right: 0;
  top: -1px;
  font-size: 17px;
}

/* ==========================================================================
   TIÊU ĐỀ SECTION CHUẨN CADIVI.VN TRÊN MOBILE
   ========================================================================== */
.mb-sec-title {
  padding: 18px 12px 12px;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
}

.mb-sec-title h2 {
  font-family: var(--font-heading);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
  color: var(--primary-red);
  text-transform: uppercase;
  padding-left: 10px;
  border-left: 4px solid var(--primary-red);
  letter-spacing: normal;
  word-break: normal;
  overflow-wrap: break-word;
}

.mb-sec-title p {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-muted);
  margin-top: 5px;
  word-break: normal;
  overflow-wrap: break-word;
}

/* ==========================================================================
   3. SẢN PHẨM ABB (.mb-product) — LƯỚI 2 CỘT CHUẨN CADIVI MOBILE
   ========================================================================== */
.mb-prod-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: #ffffff;
}

.mb-prod-card {
  border-right: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
}

.mb-prod-card:nth-child(2n) {
  border-right: none;
}

.mb-prod-img {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 8px;
  padding-top: 22px;
  overflow: hidden;
  background: #f7f7f7;
  border-radius: 4px;
}

.mb-prod-img.mb-prod-banner-card {
  padding: 0;
  height: 145px;
  background: #0f172a;
}

.mb-banner-link {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.mb-banner-img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}

.mb-prod-banner-card .prod-img-branding {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.25) 60%, transparent 100%);
  padding: 6px 8px 10px;
}

.mb-prod-banner-card .prod-brand-logo {
  background: #ffffff;
  padding: 2px 5px;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  height: 14px;
}

.mb-prod-img img {
  max-height: 98px;
  object-fit: contain;
}

.mb-swatches {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-bottom: 8px;
}

.mb-swatch {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid #bbbbbb;
  cursor: pointer;
}

.mb-swatch.active {
  transform: scale(1.2);
  border-color: var(--primary-red);
}

.sw-Gold { background: linear-gradient(135deg, #e5c168, #b88928); }
.sw-White { background: #ffffff; }
.sw-Silver { background: linear-gradient(135deg, #e2e5e8, #9aa2aa); }
.sw-Dark-Grey { background: #494e54; }
.sw-Black { background: #18191b; }

.mb-prod-title {
  background: var(--primary-red);
  color: #ffffff !important;
  text-align: center;
  padding: 7px 6px;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.mb-prod-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 6px;
}

/* ==========================================================================
   4. KHO TRA CỨU 1.448 MÃ SKU ABB TRÊN ĐIỆN THOẠI
   ========================================================================== */
.mb-explorer {
  padding: 14px 12px 22px;
  background: #f5f6f8;
  border-bottom: 1px solid #e2e2e2;
}

.mb-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.mb-filter-full {
  grid-column: 1 / -1;
}

.mb-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #222222;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.mb-select,
.mb-input {
  width: 100%;
  height: 38px;
  border: 1px solid #cccccc;
  background: #ffffff;
  padding: 0 10px;
  font-size: 13.5px;
  font-family: var(--font-main);
  color: #222222;
}

.mb-status-bar {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-left: 4px solid var(--primary-red);
  padding: 8px 10px;
  font-size: 12.5px;
  color: #222222;
  margin-bottom: 10px;
}

.mb-sku-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mb-sku-card {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
}

.mb-sku-card:active {
  border-color: var(--primary-red);
}

.mb-sku-thumb {
  position: relative;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  margin-bottom: 6px;
  padding: 24px 6px 6px;
  overflow: hidden;
}

.mb-sku-thumb img {
  max-height: 80px;
  object-fit: contain;
}

.mb-sku-tags {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.mb-tag-series {
  background: #fae8e9;
  color: var(--primary-red);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  text-transform: uppercase;
}

.mb-tag-color {
  background: #eef2f7;
  color: #333333;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 5px;
}

.mb-sku-code {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #111111;
}

.mb-sku-desc {
  font-size: 11.5px;
  color: #555555;
  margin-top: 2px;
}

/* ==========================================================================
   5. TIN TỨC & SỰ KIỆN MOBILE (.mb-news) CHUẨN CADIVI.VN
   ========================================================================== */
.mb-news {
  padding: 16px;
  background: #ffffff;
}

.mb-news-hot {
  border: 1px solid #e5e5e5;
  margin-bottom: 12px;
}

.mb-news-hot-visual {
  background: linear-gradient(135deg, #0c254e 0%, #1b4c98 100%);
  color: #ffffff;
  padding: 16px 12px;
  text-align: center;
}

.mb-news-hot-title {
  background: var(--primary-red);
  padding: 10px 12px;
}

.mb-news-hot-title a {
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 21px;
  font-weight: 700;
  text-transform: uppercase;
  display: block;
}

.mb-news-list li {
  border-bottom: 1px solid #ececec;
  padding: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.mb-news-list li img {
  width: 64px;
  height: 52px;
  object-fit: contain;
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  padding: 4px;
  flex-shrink: 0;
}

.mb-news-list li a {
  font-size: 13.5px;
  font-weight: 700;
  color: #222222 !important;
  line-height: 19px;
}

/* ==========================================================================
   6. GIỚI THIỆU & HỒ SƠ NĂNG LỰC MOBILE (.mb-about)
   ========================================================================== */
.mb-about {
  background: #f5f6f8;
  padding: 14px 12px 20px;
}

.mb-about-banner {
  background: linear-gradient(135deg, #0c254e 0%, #1b4c98 100%);
  color: #ffffff;
  padding: 16px 14px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary-red-bright);
}

.mb-about-banner h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.mb-about-banner p {
  font-size: 13.5px;
  color: #f0f4f8;
  margin-bottom: 12px;
}

.mb-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  text-align: center;
}

.mb-stat-box {
  background: rgba(255, 255, 255, 0.14);
  padding: 8px 4px;
}

.mb-stat-box strong {
  display: block;
  font-size: 18px;
  color: #ffd600;
}

.mb-stat-box span {
  font-size: 10.5px;
  color: #ffffff;
  text-transform: uppercase;
}

/* Accordion Giới thiệu Mobile */
.mb-accordion-item {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  margin-bottom: 8px;
}

.mb-accordion-btn {
  width: 100%;
  background: #ffffff;
  border: none;
  border-left: 4px solid var(--primary-red);
  padding: 12px;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #222222;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.mb-accordion-body {
  display: none;
  padding: 0 12px 12px;
  font-size: 13.5px;
  color: #333333;
  border-top: 1px solid #f0f0f0;
}

.mb-accordion-item.open .mb-accordion-body {
  display: block;
  padding-top: 10px;
}

/* ==========================================================================
   7. DỰ ÁN TIÊU BIỂU VUỐT NGANG (.mb-projects)
   ========================================================================== */

.mb-project-scroll {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 14px 12px 18px;
  background: #ffffff;
  scroll-snap-type: x mandatory;
}

.mb-proj-card {
  flex: 0 0 86%;
  max-width: 86%;
  scroll-snap-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

/* KHUNG HÌNH DỰ ÁN MOBILE: RÕ NÉT 100%, KHÔNG LỚP PHỦ CHE */
.mb-proj-media {
  position: relative;
  width: 100%;
  height: 200px;
  background: #0f172a;
  overflow: hidden;
}

.mb-proj-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.mb-proj-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.mb-proj-idx {
  background: var(--primary-red);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  letter-spacing: normal;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mb-proj-cat {
  background: rgba(15, 23, 42, 0.92);
  color: #ffffff !important;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.mb-proj-body {
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  background: #ffffff;
  box-sizing: border-box;
}

.mb-proj-brand {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--primary-red);
  text-transform: uppercase;
  letter-spacing: normal;
  margin-bottom: 4px;
}

.mb-proj-title {
  font-family: var(--font-heading);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.mb-proj-desc {
  font-size: 12px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 0 12px;
  flex-grow: 1;
}

.mb-proj-foot {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary-red);
  text-transform: uppercase;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.mb-proj-arrow {
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   8.5. ĐỐI TÁC TIÊU BIỂU MOBILE (#mb-doi-tac)
   ========================================================================== */
.mb-partners-sec {
  background: #f8fafc;
  padding: 16px 14px 22px;
  border-top: 1px solid #e2e8f0;
}

.mb-partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mb-partner-item {
  background: #ffffff;
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.mb-partner-logo {
  max-width: 100%;
  max-height: 44px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ==========================================================================
   8. FOOTER MOBILE CHUẨN CADIVI.VN + THANH CÔNG CỤ DƯỚI ĐÁY (BOTTOM TAB BAR)
   ========================================================================== */
.mb-footer {
  background: #ffffff;
  padding-bottom: 0;
}

.mb-footer-red {
  background: var(--primary-red);
  color: #ffffff;
  padding: 22px 16px 18px;
}

.mb-footer-red .name {
  font-family: var(--font-heading);
  font-size: 16.5px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  padding-bottom: 6px;
}

.mb-footer-red p {
  font-size: 13.5px;
  line-height: 22px;
  color: #ffffff;
  margin-bottom: 6px;
}

.mb-footer-red a {
  color: #ffffff !important;
  font-weight: 600;
  text-decoration: none;
}

.mb-footer-red a:hover {
  color: #ffd600 !important;
}

.mb-footer-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 16px;
  background: #ffffff;
  border-top: 1px solid #e5e5e5;
  box-sizing: border-box;
}

.mb-footer-links h4 {
  font-family: var(--font-heading);
  font-size: 14.5px;
  text-transform: uppercase;
  color: #222222;
  margin-bottom: 10px;
  border-bottom: none;
  display: inline-block;
  font-weight: 700;
}

.mb-footer-col-info ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.mb-footer-col-info li,
.mb-footer-col-prods li {
  margin-bottom: 0;
}

.mb-footer-links a {
  font-size: 13px;
  line-height: 20px;
  color: #444444 !important;
  text-decoration: none;
  display: block;
  transition: color 0.2s ease;
  word-break: break-word;
}

.mb-footer-links a:hover {
  color: var(--primary-red) !important;
}

/* 2-Column x 4-Row Product Grid on Mobile (TASK-007E-UX04) */
.mb-footer-prod-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(4, auto);
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  column-gap: 14px;
  row-gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

@media screen and (max-width: 290px) {
  .mb-footer-prod-grid,
  .mb-footer-col-info ul {
    grid-auto-flow: row;
    grid-template-columns: 1fr;
  }
}

.mb-copyright {
  padding: 12px 14px;
  font-size: 12px;
  color: #aaaaaa;
  text-align: center;
  background: #222222;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mb-copyright strong {
  color: #dddddd;
}

/* Thanh Bottom Navigation cố định khớp hoàn hảo dưới đáy màn hình điện thoại */
.mb-bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 2500;
  box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.08);
}

body.phone-frame-mode .mb-bottom-nav {
  max-width: 100%;
  margin: 0;
  bottom: 0;
  border-radius: 0;
}

.mb-nav-item {
  padding: 7px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #333333 !important;
  text-align: center;
  gap: 2px;
}

.mb-nav-item.call-now {
  background: var(--primary-red);
  color: #ffffff !important;
}

/* Modal chi tiết SKU trên Mobile */
.mb-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  padding: 14px;
}

.mb-modal-backdrop.open {
  display: flex;
}

.mb-modal-dialog {
  background: #ffffff;
  width: 100%;
  max-width: 400px;
  border-top: 4px solid var(--primary-red);
  padding: 14px;
  position: relative;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   ABB BRANDING & PACKAGING SPECIFICATION BADGES (MOBILE)
   ========================================================================== */
.prod-img-branding {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 5px 8px 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  z-index: 5;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 100%);
}

.prod-img-branding.card {
  padding: 4px 6px 2px;
}

.prod-img-branding.detail {
  position: relative;
  padding: 0 34px 8px 0;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.prod-brand-series {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-heading);
  font-size: 9.5px;
  line-height: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: normal;
  color: #1b4c98;
  background: rgba(239, 246, 255, 0.95);
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(27, 76, 152, 0.08);
}

.prod-img-branding.card .prod-brand-series {
  padding: 1.5px 5px;
  font-size: 8px;
  line-height: 11px;
}

.prod-brand-series.detail {
  padding: 3px 8px;
  font-size: 11px;
  line-height: 15px;
}

.prod-brand-logo {
  height: 12px !important;
  max-height: 12px !important;
  width: auto !important;
  object-fit: contain !important;
  display: block;
  flex-shrink: 0;
}

.prod-img-branding.card .prod-brand-logo {
  height: 10px !important;
  max-height: 10px !important;
}

.prod-brand-logo.detail {
  height: 16px !important;
  max-height: 16px !important;
}

/* Quy cách đóng gói badge */
.sku-pack-info {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 3px;
  padding: 2px 6px;
  text-align: center;
}

/* E-Catalogue Mobile Cards */
.mb-doc-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mb-doc-card:active {
  transform: translateY(1px);
}
