/* ==========================================================================
   Sales UI cho maihienxep.vn — 03/12/2026
   Nạp SAU style.css (xem include/head.php). Gỡ file này + dòng <link> là về như cũ.
   ========================================================================== */

/* ---------- Nút dùng chung ---------- */
.mh-btn {
  display: inline-block;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none !important;
  cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.mh-btn:active { transform: scale(.98); }
.mh-btn:focus-visible,
.mh-sticky-bar a:focus-visible { outline: 3px solid #203290; outline-offset: 2px; }
.mh-btn-detail { width: 100%; background: #203290; color: #fff !important; font-size: 15px; padding: 10px 12px; }
.mh-btn-detail:hover { background: #16226b; }
.mh-btn-call { background: #e03b19; color: #fff !important; }
.mh-btn-call:hover { background: #c32f10; }
.mh-btn-zalo { background: #0068ff; color: #fff !important; }
.mh-btn-zalo:hover { background: #0052cc; }
.mh-zalo-ic {
  display: inline-block;
  width: 20px; height: 20px;
  margin-right: 6px;
  border-radius: 5px;
  background: #fff;
  color: #0068ff;
  font-size: 13px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  vertical-align: 1px;
}

/* ---------- Trang chủ: lưới sản phẩm (thay ticker trượt dọc) ---------- */
.mh-products .title-header { margin-bottom: 12px; }
.mh-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
@media (max-width: 1199px) { .mh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991px)  { .mh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px)  { .mh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

.mh-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e3e7f3;
  border-radius: 10px;
  transition: box-shadow .2s, transform .2s;
}
.mh-card:hover { box-shadow: 0 6px 18px rgba(32, 50, 144, .16); transform: translateY(-2px); }
.mh-card .img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #eef1f8; }
.mh-card .img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.mh-card:hover .img img { transform: scale(1.04); }
.mh-card .body { display: flex; flex: 1; flex-direction: column; padding: 10px 10px 12px; }
.mh-card h3 {
  display: -webkit-box;
  height: 60px;
  margin: 0 0 8px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  line-height: 20px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.mh-card h3 a { color: #111; }
.mh-card .mh-price { margin: auto 0 10px; }
.mh-card .product-item-price { margin-right: 6px; color: #e03b19; font-size: 19px; font-weight: 700; }
.mh-card .product-item-price-old { color: #999; font-size: 13px; text-decoration: line-through; }

/* ---------- Thẻ sản phẩm trong carousel / trang danh mục ---------- */
.products .item .title h3,
.product-slider-horizontal .item .title h3 {
  display: -webkit-box;
  height: auto;
  min-height: 50px;
  padding: 0 8px;
  font-size: 16px;
  line-height: 25px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.mh-item-cta { padding: 0 10px 12px; }

/* ---------- Trang chi tiết sản phẩm ---------- */
.products-detail h1.header { font-size: 22px; line-height: 1.3; text-transform: none; }
.products-detail .gallery-product-img img,
.products-detail .gallery-product-img .zoomWrapper {
  height: auto !important;
  max-height: 420px;
  object-fit: contain;
}
.mh-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; }
.mh-cta .mh-btn { flex: 1 1 200px; }
.mh-cta-note { margin: 0 0 14px; color: #555; font-size: 14px; line-height: 20px; }

/* ---------- Ẩn mục menu dẫn tới form đăng nhập (site không có giỏ hàng/thanh toán thật) ---------- */
li:has(> a[href="gio-hang"]),
li:has(> a[href="thanh-toan"]),
li:has(> a[href="don-hang"]),
a[href="gio-hang"],
a[href="thanh-toan"],
a[href="don-hang"] { display: none !important; }

/* ---------- Nút gọi nổi trên desktop: đưa xuống góc dưới, khỏi che menu ---------- */
.mypage-alo-phone { top: auto !important; bottom: 70px !important; }

/* ---------- Thanh liên hệ dính đáy (chỉ mobile) ---------- */
.mh-sticky-bar { display: none; }
@media (max-width: 767px) {
  body { padding-bottom: 60px; }
  .mypage-alo-phone, .hotlinemp { display: none !important; }
  .mh-sticky-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, .18);
  }
  .mh-sticky-bar a {
    flex: 1;
    padding: 12px 6px;
    border-radius: 8px;
    color: #fff !important;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
  }
  .mh-sticky-bar .mh-s-call { background: #e03b19; }
  .mh-sticky-bar .mh-s-zalo { background: #0068ff; }
  .box-fb-chat, .fb-chat-right { bottom: 60px !important; }

  .navigation-mobile,
  .navigation-mobile .menu-mobile,
  .navigation-mobile .menu-mobile .dropdown,
  .navigation-mobile .nav-left { height: 64px; }
  .navigation-mobile .nav-left a img { width: auto; max-height: 54px; }
  .products-detail { padding: 8px 4px; }
  .products-detail h1.header { font-size: 19px; }
  .products-detail .box-price-detail p.price { font-size: 26px; }
}

/* ==========================================================================
   Trang chủ: thứ tự & bố cục (03/12/2026)
   Thứ tự: chọn nhanh danh mục -> sản phẩm -> hình ảnh công trình -> giới thiệu & bảng giá
   ========================================================================== */
.mh-home { display: flex; flex-direction: column; }
.mh-w { display: contents; }
.mh-products { order: 0; }
.mh-gallery { order: 20; }
.mh-about { order: 30; }

.mh-chips { order: -1; display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 8px; }
.mh-chip {
  padding: 8px 16px;
  border: 1px solid #203290;
  border-radius: 999px;
  background: #fff;
  color: #203290;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
}
.mh-chip:hover { background: #203290; color: #fff; }
.mh-chip-sub { border-color: #9aa5d6; color: #44509a; font-weight: 600; }

.mh-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.mh-head .header { margin-bottom: 0; }
.mh-viewall { padding-bottom: 6px; color: #203290; font-weight: 700; white-space: nowrap; }

.mh-gallery, .mh-about { margin: 8px 0 28px; padding: 14px 16px 18px; background: #fff; border-radius: 10px; }
.mh-gal-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 991px) { .mh-gal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 575px) { .mh-gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .mh-gallery, .mh-about { padding: 12px 10px 16px; } }
.mh-gal-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 8px; background: #eef1f8; }
.mh-gal-grid img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.mh-gal-grid a:hover img { transform: scale(1.05); }
.mh-gal-grid.mh-collapsed a:nth-child(n+9) { display: none; }

.mh-more {
  display: block;
  margin: 14px auto 0;
  padding: 10px 26px;
  border: 2px solid #203290;
  border-radius: 8px;
  background: #fff;
  color: #203290;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.mh-more:hover { background: #203290; color: #fff; }

.mh-about article { margin-top: 12px; color: #222; font-size: 16px; line-height: 1.65; text-align: left; }
.mh-about article h1, .mh-about article h2 { margin: 18px 0 8px; font-size: 20px; line-height: 1.3; }
.mh-about article h3, .mh-about article h4 { margin: 14px 0 6px; font-size: 17px; line-height: 1.3; }
.mh-about article p { margin: 0 0 10px; }
.mh-about article span[style*="font-size"] { font-size: inherit !important; }
.mh-clamp { position: relative; max-height: 300px; overflow: hidden; }
.mh-clamp:after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.mh-clamp.mh-open { max-height: none; }
.mh-clamp.mh-open:after { display: none; }

/* ---------- Đầu trang: hotline + MXH ---------- */
header .topcall li.mh-hotline a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e03b19;
  color: #fff;
  font-weight: 700;
  line-height: 1.3;
}
header .topcall li.mh-hotline a:hover { background: #c32f10; }

/* ---------- Menu mobile: mục con ---------- */
.menu-mobile .mh-subnav { margin: 2px 0 6px; padding-left: 14px; list-style: none; }
.menu-mobile .mh-subnav a { font-size: 13px; opacity: .9; }

/* ---------- Menu chính desktop: chữ HOA đồng nhất ---------- */
.navigation .navbar-nav > li > a { text-transform: uppercase; }

/* ---------- Bài giới thiệu: căn trái cho dễ đọc (nội dung gốc căn giữa từng đoạn) ---------- */
.mh-about article p, .mh-about article div, .mh-about article li,
.mh-about article h1, .mh-about article h2, .mh-about article h3, .mh-about article h4,
.mh-about article [style*="text-align"] { text-align: left !important; }
.mh-about article ul, .mh-about article ol { padding-left: 22px; margin: 0 0 10px; }

.menu-mobile .dropdown-menu li a { text-transform: uppercase; }
.menu-mobile .dropdown-menu .mh-subnav a { text-transform: none; }
