/* ==========================================================================
   FILE TÙY CHỈNH GIAO DIỆN & RESPONSIVE ĐA THIẾT BỊ (assets/css/custom.css)
   --------------------------------------------------------------------------
   Hỗ trợ đồng thời:
   1. Giao diện Desktop chuẩn Điện Máy Xanh (>= 1024px) - #dmx-desktop-root
   2. Giao diện Tablet chuẩn Điện Máy Xanh (640px - 1023px) - #dmx-mobile-root
   3. Giao diện Mobile chuẩn Điện Máy Xanh (< 640px) - #dmx-mobile-root
   ========================================================================== */

:root {
  --dmx-primary: #2A83E9;        /* Màu xanh chủ đạo của Header Điện Máy Xanh */
  --dmx-primary-hover: #1868c4;  /* Màu xanh đậm khi hover nút trên Header */
  --dmx-location-bg: #105bb5;    /* Màu nền ô chọn địa chỉ trên Header */
  --dmx-yellow: #FFF200;         /* Màu vàng điểm nhấn đặc trưng ĐMX */
  --dmx-red-sale: #E83A45;       /* Màu đỏ giá khuyến mãi chuẩn ĐMX */
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

/* ==========================================================================
   1. RESPONSIVE SWITCHING: DESKTOP (>= 1024px) vs MOBILE & TABLET (< 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  #dmx-desktop-root {
    display: block !important;
  }
  #dmx-mobile-root {
    display: none !important;
  }
}

@media (max-width: 1023.98px) {
  #dmx-desktop-root {
    display: none !important;
  }
  #dmx-mobile-root {
    display: block !important;
  }
}

/* Màn hình Laptop nhỏ (1024px -> 1230px): chống tràn ngang thanh 1200px */
@media (min-width: 1024px) and (max-width: 1230px) {
  #dmx-desktop-root .min-w-1200px {
    min-width: 100% !important;
  }
  #dmx-desktop-root .w-\[1200px\],
  #dmx-desktop-root .w-1200px,
  #dmx-desktop-root .max-w-1200px {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px;
    padding-right: 12px;
    box-sizing: border-box;
  }
}

/* Giao diện TABLET (640px -> 1023.98px): mở rộng khung mượt mà, lưới sản phẩm 3-4 cột */
@media (min-width: 640px) and (max-width: 1023.98px) {
  #dmx-mobile-root .max-w-640px {
    max-width: 100% !important;
  }
  #dmx-mobile-root main.max-w-640px {
    max-width: 960px !important;
    padding-left: 12px;
    padding-right: 12px;
  }
  #dmx-mobile-root .grid-cols-2 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 820px) and (max-width: 1023.98px) {
  #dmx-mobile-root .grid-cols-2 {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* ==========================================================================
   2. HIỆU ỨNG THẺ SẢN PHẨM & THANH CUỘN NGANG
   ========================================================================== */
[data-product-code] {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
[data-product-code]:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1) !important;
}
[data-product-code] img[aria-label] {
  transition: transform 0.25s ease;
}
[data-product-code]:hover img[aria-label] {
  transform: scale(1.03);
}

/* Ẩn thanh cuộn mặc định nhưng vẫn cho phép vuốt cảm ứng / kéo chuột */
.scrollbar-none::-webkit-scrollbar,
.scrollbar-hide::-webkit-scrollbar,
.overflow-x-scroll::-webkit-scrollbar,
.overflow-x-auto::-webkit-scrollbar {
  display: none;
}
.scrollbar-none,
.scrollbar-hide,
.overflow-x-scroll,
.overflow-x-auto {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* ==========================================================================
   3. BỘ LỌC THƯƠNG HIỆU & SẮP XẾP TRÊN TRANG DANH MỤC (CHUẨN ĐMX)
   ========================================================================== */
.dmx-native-filter-active {
  border: 1.5px solid #2A83E9 !important;
  background-color: #EEF6FF !important;
  color: #2A83E9 !important;
  font-weight: 600 !important;
  position: relative;
}

/* ==========================================================================
   4. DRAWER DANH MỤC MOBILE & TABLET (#dmx-mobile-menu-drawer - MODULE 6880)
   ========================================================================== */
.dmx-mobile-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: #f2f4f7;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.dmx-mobile-drawer-overlay.is-open {
  display: flex;
}

/* ==========================================================================
   5. MODAL CHỌN ĐỊA CHỈ NHẬN HÀNG & TÌM KIẾM (CHUẨN ĐMX)
   ========================================================================== */
.dmx-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 40, 0.55);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.dmx-modal-backdrop.is-open {
  display: flex;
}
.dmx-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
  animation: dmxPopIn 0.18s ease-out;
}
@keyframes dmxPopIn {
  from { opacity: 0; transform: scale(0.96) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ==========================================================================
   6. TOAST THÔNG BÁO GIỎ HÀNG CHUẨN ĐIỆN MÁY XANH
   ========================================================================== */
.dmx-toast {
  position: fixed;
  bottom: 76px;
  right: 20px;
  background: #101828;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  z-index: 10005;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.22s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dmx-toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   7. TRANG ĐĂNG NHẬP (/dang-nhap) & ĐĂNG KÝ (/dang-ky) CHUẨN ĐIỆN MÁY XANH
   ========================================================================== */
.dmx-auth-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 32px 36px;
  width: 480px;
  max-width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
}
.dmx-auth-card.is-register {
  width: 520px;
}
@media (max-width: 1023.98px) {
  .dmx-auth-card,
  .dmx-auth-card.is-register {
    width: 100%;
    padding: 20px 16px;
    box-shadow: 0 0 16px 0 rgba(0, 0, 0, 0.11);
  }
}

.dmx-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 20px;
}
.dmx-auth-tab {
  padding: 12px 8px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 2.5px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
}
.dmx-auth-tab:hover {
  color: #2A83E9;
}
.dmx-auth-tab.is-active {
  color: #2A83E9;
  font-weight: 700;
  border-bottom-color: #2A83E9;
}

.dmx-auth-field {
  margin-bottom: 16px;
  width: 100%;
}
.dmx-auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #344054;
  margin-bottom: 6px;
}
.dmx-auth-input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.dmx-auth-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.dmx-auth-input {
  width: 100%;
  height: 46px;
  border-radius: 20px !important;
  border: 1px solid #d0d5dd !important;
  background-color: #ffffff !important;
  padding-left: 52px !important;
  padding-right: 16px !important;
  font-size: 14px !important;
  color: #101828 !important;
  outline: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.dmx-auth-input.no-left-icon {
  padding-left: 16px !important;
}
.dmx-auth-input.has-right-btn {
  padding-right: 56px !important;
}
.dmx-auth-input:focus {
  border-color: #2A83E9 !important;
  box-shadow: 0 0 0 3px rgba(42, 131, 233, 0.12);
}
.dmx-auth-pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 600;
  color: #667085;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  z-index: 2;
}
.dmx-auth-pw-toggle:hover {
  color: #2A83E9;
}
.dmx-auth-submit {
  width: 100%;
  height: 48px;
  border-radius: 20px !important;
  background-color: #2A83E9 !important;
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: none;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.1s ease;
  margin-top: 8px;
}
.dmx-auth-submit:hover {
  background-color: #1868c4 !important;
}
.dmx-auth-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 540px) {
  .dmx-auth-grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Các class tiện ích bổ sung phòng trường hợp PurgeCSS của ĐMX lược bỏ */
.mb-1\.5 { margin-bottom: 6px !important; }
.mb-2\.5 { margin-bottom: 10px !important; }
.mb-3\.5 { margin-bottom: 14px !important; }
.mt-0\.5 { margin-top: 2px !important; }
.gap-1\.5 { gap: 6px !important; }
.gap-2\.5 { gap: 10px !important; }
.p-1\.5 { padding: 6px !important; }
.p-2\.5 { padding: 10px !important; }
.p-3\.5 { padding: 14px !important; }
.px-2\.5 { padding-left: 10px !important; padding-right: 10px !important; }
.px-3\.5 { padding-left: 14px !important; padding-right: 14px !important; }
.py-2\.5 { padding-top: 10px !important; padding-bottom: 10px !important; }
.py-3\.5 { padding-top: 14px !important; padding-bottom: 14px !important; }
.rounded-10px { border-radius: 10px !important; }
.rounded-16px { border-radius: 16px !important; }

/* ==========================================================================
   [9] HỆ THỐNG VÍ SỐ DƯ, NẠP TIỀN (/nap-tien, /tai-khoan) & GIỎ HÀNG (/gio-hang)
   ========================================================================== */
.dmx-wallet-wrap {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
@media (max-width: 1023px) {
  .dmx-wallet-wrap {
    grid-template-columns: 1fr;
    padding: 0 10px;
  }
}
.dmx-wallet-card {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e4e7ec;
  padding: 20px;
  box-shadow: 0 4px 16px rgba(16, 24, 40, 0.04);
}
.dmx-wallet-hero {
  background: linear-gradient(135deg, #155eef 0%, #2a83e9 100%);
  color: #ffffff;
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 16px;
}
.dmx-wallet-balance-val {
  font-size: 26px;
  font-weight: 800;
  color: #ffde59;
  line-height: 1.2;
  margin-top: 4px;
}
.dmx-wallet-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #344054;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: left;
  margin-bottom: 4px;
}
.dmx-wallet-nav-btn:hover {
  background: #f2f4f7;
}
.dmx-wallet-nav-btn.is-active {
  background: #eef6ff;
  color: #155eef;
  font-weight: 700;
}
.dmx-bank-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}
@media (max-width: 767px) {
  .dmx-bank-grid {
    grid-template-columns: 1fr;
  }
}
.dmx-bank-box {
  background: #f8fbff;
  border: 1.5px solid #b2ddff;
  border-radius: 12px;
  padding: 18px;
}
.dmx-bank-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed #d0e2ff;
  font-size: 13.5px;
  gap: 8px;
}
.dmx-bank-row:last-child {
  border-bottom: none;
}
.dmx-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.dmx-preset-btn {
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  color: #1d2939;
  cursor: pointer;
  transition: all 0.15s ease;
}
.dmx-preset-btn:hover,
.dmx-preset-btn.is-selected {
  border-color: #2A83E9;
  background: #eef6ff;
  color: #155eef;
}
.dmx-form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid #d0d5dd;
  font-size: 14px;
  color: #101828;
  background: #ffffff;
  outline: none;
  transition: border-color 0.16s ease;
}
.dmx-form-input:focus {
  border-color: #2A83E9;
  box-shadow: 0 0 0 3px rgba(42, 131, 233, 0.12);
}
.dmx-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: 10px;
  background: #2A83E9;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.16s ease;
}
.dmx-btn-primary:hover {
  background: #1868c4;
}
.dmx-btn-amber {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  background: #ffde59;
  color: #101828;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-decoration: none;
}
.dmx-header-user-pill {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 40px !important;
  padding: 4px 12px !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  max-width: none !important;
  width: auto !important;
  flex-shrink: 0 !important;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.dmx-header-user-pill:hover {
  background: rgba(255, 255, 255, 0.24) !important;
}
.dmx-header-user-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}
.dmx-header-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}
.dmx-header-user-bal {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffde59;
}
.dmx-header-deposit-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  height: 36px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  background: #ffde59 !important;
  color: #101828 !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.dmx-header-deposit-badge:hover {
  background: #ffe885 !important;
}


