/* DMHP Optimizer v4.1 Elementor Safe */

/* DMHP Hotfix v3.5 */

/* Logo */
.header-logo-full img,
.footer-logo-text img,
.site-header .header-logo img,
.site-footer .footer-logo img,
.site-footer .footer-logo-text img {
  object-fit: contain !important;
  background: transparent !important;
}
.header-logo-full img,
.site-header .header-logo img {
  height: 42px !important;
  max-width: 260px !important;
  width: auto !important;
}
.footer-logo-text img,
.site-footer .footer-logo img,
.site-footer .footer-logo-text img {
  height: 48px !important;
  max-width: 300px !important;
  width: auto !important;
}

/* Ẩn cụm cam kết trang chủ */
.benefits-bar,
.dmhp-why-home {
  display: none !important;
}

/* Ẩn toàn bộ nút cũ của theme/hotfix cũ */
.dmhp-readmore-wrap,
.dmhp-spec-readmore-wrap,
.dmhp-v31-readmore-wrap,
.dmhp-v32-readmore-wrap,
.dmhp-v33-readmore-wrap,
.dmhp-v34-readmore-wrap {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Vô hiệu class/gradient cũ */
.dmhp-desc-content:after,
.dmhp-tab-panel .dmhp-desc-content:after,
.woocommerce-Tabs-panel--description:after,
#tab-description:after,
.dmhp-panel-desc:after,
.dmhp-panel-spec:after,
.dmhp-v33-panel:after,
.dmhp-v34-panel:after {
  display: none !important;
  content: none !important;
}

.dmhp-desc-content,
.dmhp-tab-panel .dmhp-desc-content,
.woocommerce-Tabs-panel--description,
#tab-description,
.dmhp-panel-desc,
.dmhp-panel-spec,
.dmhp-v33-panel,
.dmhp-v34-panel {
  max-height: none !important;
  overflow: visible !important;
}

/* Vùng duy nhất do v3.5 quản lý */
.dmhp-v35-target {
  position: relative !important;
}

.dmhp-v35-target.dmhp-v35-collapsed {
  overflow: hidden !important;
}

.dmhp-v35-target.dmhp-v35-desc.dmhp-v35-collapsed {
  max-height: 620px !important;
}

.dmhp-v35-target.dmhp-v35-spec.dmhp-v35-collapsed {
  max-height: 380px !important;
}

.dmhp-v35-target.dmhp-v35-expanded {
  max-height: none !important;
  overflow: visible !important;
}

.dmhp-v35-target.dmhp-v35-collapsed::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  height: 115px !important;
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 82%) !important;
  pointer-events: none !important;
  z-index: 20 !important;
}

/* Chỉ nút v3.5 được hiển thị */
.dmhp-v35-readmore-wrap {
  display: flex !important;
  justify-content: center;
  position: relative;
  z-index: 60;
  margin: -52px 0 20px;
}

.dmhp-v35-readmore-wrap.is-expanded {
  margin: 14px 0 20px;
}

.dmhp-v35-readmore-btn {
  min-width: 165px;
  border: none;
  border-radius: 999px;
  background: #0b66c3;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  padding: 11px 18px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(11,102,195,.20);
}

.dmhp-v35-readmore-btn:hover {
  background: #084f99;
}

/* Nếu tab bị ẩn thì nút ngay sau vùng đó cũng ẩn */
.dmhp-tab-panel:not(.active) .dmhp-v35-readmore-wrap,
.dmhp-tab-panel:not(.active) + .dmhp-v35-readmore-wrap {
  display: none !important;
}

/* Shortdesc trong thông số */
.dmhp-shortdesc-tech-block {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #e5e7eb;
}
.dmhp-shortdesc-tech-block h3 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 900;
  color: #111827;
}
.dmhp-shortdesc-tech-content {
  font-size: 15px;
  line-height: 1.75;
  color: #374151;
}
.dmhp-shortdesc-tech-content ul,
.dmhp-shortdesc-tech-content ol {
  margin: 10px 0 10px 22px;
  padding: 0;
}
.dmhp-shortdesc-tech-content li {
  margin-bottom: 8px;
}

/* Mobile full width product page */
@media (max-width: 768px) {
  body.single-product .woo-main-wrap,
  body.single-product .page-body,
  body.single-product main,
  body.single-product .container,
  body.single-product .dmhp-product-page,
  body.single-product .dmhp-product-container,
  body.single-product .product,
  body.single-product .summary,
  body.single-product .entry-summary {
    max-width: none !important;
  }

  body.single-product .woo-main-wrap,
  body.single-product .page-body,
  body.single-product .dmhp-product-page,
  body.single-product .dmhp-product-container {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.single-product .dmhp-gallery-card,
  body.single-product .dmhp-buy-card,
  body.single-product .dmhp-quick-shelf,
  body.single-product .dmhp-product-tabs-wrap,
  body.single-product .dmhp-tab-main,
  body.single-product .dmhp-tab-panel,
  body.single-product .dmhp-related-bottom {
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  body.single-product .dmhp-buy-card,
  body.single-product .dmhp-quick-shelf,
  body.single-product .dmhp-tab-panel {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .dmhp-v35-target.dmhp-v35-desc.dmhp-v35-collapsed {
    max-height: 520px !important;
  }

  .dmhp-v35-target.dmhp-v35-spec.dmhp-v35-collapsed {
    max-height: 320px !important;
  }

  .dmhp-v35-readmore-btn {
    width: 190px;
    padding: 10px 16px;
  }

  .header-logo-full img,
  .site-header .header-logo img {
    height: 34px !important;
    max-width: 210px !important;
  }
}


/* DMHP Optimizer v4.0 extra */
.benefits-bar,.dmhp-why-home{display:none!important;}
img{max-width:100%;height:auto;}


/* ========================================================================
 * DMHP Optimizer v4.2 - Làm sạch tab Thông số kỹ thuật
 * ====================================================================== */

/* Ẩn bảng thông số mặc định gồm Thương hiệu / Danh mục / Mã sản phẩm */
.single-product .dmhp-spec-table,
.single-product .shop_attributes,
.single-product #tab-additional_information table,
.single-product .woocommerce-Tabs-panel--additional_information table {
  display: none !important;
}

/* Nếu bảng mặc định nằm trong wrapper riêng thì ẩn luôn khoảng trắng */
.single-product .dmhp-spec-table-wrap,
.single-product .dmhp-product-specs-table,
.single-product .woocommerce-product-attributes {
  display: none !important;
}

/* Biến phần mô tả ngắn được chèn vào thành thông số chính */
.single-product .dmhp-shortdesc-tech-block {
  margin-top: 0 !important;
  padding-top: 0 !important;
  border-top: 0 !important;
}

.single-product .dmhp-shortdesc-tech-block h3 {
  font-size: 26px !important;
  line-height: 1.25 !important;
  margin: 0 0 18px !important;
  color: #111827 !important;
  font-weight: 900 !important;
}

.single-product .dmhp-shortdesc-tech-content {
  font-size: 15px !important;
  line-height: 1.8 !important;
  color: #374151 !important;
}

.single-product .dmhp-shortdesc-tech-content ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.single-product .dmhp-shortdesc-tech-content li {
  margin: 0 0 10px !important;
  padding-left: 0 !important;
}

.single-product .dmhp-shortdesc-tech-content p {
  margin: 0 0 10px !important;
}

/* Dọn dòng trống/hàng thừa nếu còn sau khi ẩn bảng */
.single-product .dmhp-v35-spec > h2:first-child,
.single-product .dmhp-v35-spec > h3:first-child,
.single-product .dmhp-opt-spec > h2:first-child,
.single-product .dmhp-opt-spec > h3:first-child {
  margin-bottom: 18px !important;
}

@media (max-width: 768px) {
  .single-product .dmhp-shortdesc-tech-block h3 {
    font-size: 22px !important;
  }
  .single-product .dmhp-shortdesc-tech-content {
    font-size: 14px !important;
  }
}


/* DMHP Optimizer v4.3 - contact display */
.footer-contact a[href^="tel:"],
.header-hotline a[href^="tel:"],
.hotline a[href^="tel:"] {
  white-space: nowrap;
}


/* ========================================================================
 * DMHP Optimizer v4.7 - Bỏ Sản phẩm yêu thích cho nhẹ web
 * ====================================================================== */

/* Ẩn nút tim trong thẻ sản phẩm */
.pc-wishlist,
.product-card .pc-wishlist,
button.pc-wishlist {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ẩn badge/count wishlist nếu còn cache cũ */
.dmhp-wishlist-count,
.dmhp-wishlist-header {
  display: none !important;
}

/* Ẩn trang wishlist nếu lỡ còn truy cập trực tiếp */
.dmhp-wishlist-page {
  display: none !important;
}



/* ========================================================================
 * DMHP Optimizer v4.7.2 - Bộ lọc danh mục đầy đủ
 * ====================================================================== */
@media (min-width: 801px) {
  body.woocommerce .cat-page-layout,
  body.archive.woocommerce .cat-page-layout {
    grid-template-columns: 230px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: start;
  }
}

.dmhp-filter-v472-ready {
  overflow: hidden;
  border: 1px solid #e3e8ef !important;
  border-radius: 8px !important;
  background: #fff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06) !important;
}

.dmhp-filter-v472-ready .filter-sidebar-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 12px 14px !important;
  border-bottom: 1px solid rgba(255,255,255,.2);
  background: linear-gradient(135deg, #1775e5, #075ebe) !important;
  color: #fff !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

.dmhp-sidebar-count,
.dmhp-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff7400;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

.dmhp-filter-v472-ready .filter-group {
  margin: 0 !important;
  padding: 0 !important;
  border-bottom: 1px solid #e7ebf0 !important;
  background: #fff;
}

.dmhp-filter-v472-ready .filter-group-title {
  margin: 0 !important;
  padding: 12px 13px 9px !important;
  border-bottom: 1px solid #eef1f5;
  background: #fbfcfe;
  color: #161d29 !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.25;
  text-align: center;
  text-transform: uppercase;
}

.dmhp-filter-v472-ready .filter-group-body {
  padding: 10px 9px 11px !important;
}

.dmhp-filter-search-wrap-v472 {
  position: relative;
  display: flex;
  align-items: center;
  height: 34px;
  margin: 0 0 8px;
  border: 1px solid #e0e5eb;
  border-radius: 4px;
  background: #fff;
}

.dmhp-filter-search-wrap-v472 input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 34px 0 9px;
  border: 0 !important;
  background: transparent !important;
  color: #253044;
  font-size: 11px;
  outline: none;
}

.dmhp-filter-search-wrap-v472 span {
  position: absolute;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #ff9700;
  color: #fff;
  font-size: 17px;
}

.dmhp-brand-list-v472,
.dmhp-spec-list-v472,
.dmhp-price-list-v472 {
  display: flex;
  flex-direction: column;
}

.dmhp-check-option-v472,
.dmhp-price-option-v472 {
  display: flex !important;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-height: 28px;
  margin: 0 !important;
  padding: 4px 1px !important;
  border: 0 !important;
  background: transparent !important;
  color: #273247 !important;
  font-size: 11px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.dmhp-check-option-v472:hover,
.dmhp-price-option-v472:hover {
  color: #086ad6 !important;
}

.dmhp-check-option-v472 input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dmhp-checkbox-v472 {
  position: relative;
  flex: 0 0 13px;
  width: 13px;
  height: 13px;
  border: 1px solid #2491ff;
  border-radius: 2px;
  background: #fff;
}

.dmhp-check-option-v472 input:checked + .dmhp-checkbox-v472,
.dmhp-price-option-v472.is-active .dmhp-checkbox-v472 {
  border-color: #0876df;
  background: #0876df;
}

.dmhp-check-option-v472 input:checked + .dmhp-checkbox-v472::after,
.dmhp-price-option-v472.is-active .dmhp-checkbox-v472::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.dmhp-option-label-v472 {
  min-width: 0;
  flex: 1;
}

.dmhp-check-option-v472 small,
.dmhp-price-option-v472 small {
  flex: 0 0 auto;
  color: #98a1af;
  font-size: 10px;
}

.dmhp-option-hidden {
  display: none !important;
}

.dmhp-filter-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin: 6px 0 0;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #0071d9;
  font-size: 10px;
  font-weight: 700;
}

.dmhp-filter-more:hover {
  text-decoration: underline;
}

.dmhp-custom-price-row-v472 {
  display: none !important;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
}

.dmhp-manual-price-open .dmhp-custom-price-row-v472 {
  display: grid !important;
}

.dmhp-custom-price-row-v472 input {
  width: 100% !important;
  min-width: 0;
  height: 34px !important;
  padding: 6px 7px !important;
  border: 1px solid #dbe2ea !important;
  border-radius: 4px !important;
  font-size: 10px !important;
}

.dmhp-manual-price-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 7px;
  padding: 7px 0 2px;
  border: 0;
  border-top: 1px dashed #e4e8ed;
  background: transparent;
  color: #657086;
  font-size: 10px;
  font-weight: 700;
}

.dmhp-filter-submit-v472 {
  width: calc(100% - 18px) !important;
  min-height: 39px;
  margin: 12px 9px 7px !important;
  border-radius: 5px !important;
  background: linear-gradient(135deg, #1679eb, #0862c7) !important;
  box-shadow: 0 5px 12px rgba(8, 98, 199, .18);
  color: #fff !important;
  font-size: 12px !important;
  font-weight: 900 !important;
}

.dmhp-filter-submit-v472:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

.dmhp-filter-v472-ready .filter-reset-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: calc(100% - 18px);
  min-height: 34px;
  margin: 0 9px 11px;
  padding: 7px 9px;
  border: 1px solid #dce3eb;
  border-radius: 5px;
  background: #fff;
  color: #657086;
  font-size: 10px;
  font-weight: 700;
}

.dmhp-filter-v472-ready .filter-reset-btn:hover {
  border-color: #1679eb;
  color: #1679eb;
}

/* Thanh lọc nhanh phía trên danh sách sản phẩm */
.dmhp-quick-filter-v472 {
  margin-bottom: 10px;
  border: 1px solid #e2e7ed;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15,23,42,.045);
  overflow: hidden;
}

.dmhp-quick-section-v472 {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 9px 10px;
  border-bottom: 1px solid #edf0f4;
}

.dmhp-quick-title-v472 {
  padding-top: 8px;
  color: #1f2937;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.dmhp-quick-specs-v472,
.dmhp-quick-brands-v472 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dmhp-quick-spec-v472 {
  display: grid;
  grid-template-columns: 28px auto;
  grid-template-rows: auto auto;
  column-gap: 6px;
  min-width: 104px;
  min-height: 54px;
  padding: 6px 8px;
  border: 1px solid #dfe5ec;
  border-radius: 4px;
  background: #fff;
  color: #29364a;
  text-align: left;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.dmhp-quick-spec-v472:hover,
.dmhp-quick-spec-v472.is-active {
  border-color: #1679eb;
  box-shadow: 0 3px 10px rgba(22,121,235,.12);
  transform: translateY(-1px);
}

.dmhp-quick-spec-icon {
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.dmhp-quick-spec-v472 b {
  align-self: end;
  color: #172238;
  font-size: 10px;
  line-height: 1.2;
}

.dmhp-quick-spec-v472 small {
  align-self: start;
  color: #8b95a4;
  font-size: 8px;
}

.dmhp-quick-brand-v472,
.dmhp-quick-more-v472 {
  min-height: 33px;
  padding: 6px 11px;
  border: 1px solid #dce2e9;
  border-radius: 4px;
  background: #fff;
  color: #223047;
  font-size: 10px;
  font-weight: 800;
}

.dmhp-quick-brand-v472:hover,
.dmhp-quick-brand-v472.is-active {
  border-color: #1679eb;
  background: #eef6ff;
  color: #0866c9;
}

.dmhp-quick-more-v472 {
  background: #0872db;
  color: #fff;
}

.dmhp-quick-sort-v472 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 10px;
  background: #fbfcfe;
}

.dmhp-quick-sort-v472 span {
  margin-right: 3px;
  color: #4b5565;
  font-size: 10px;
  font-weight: 800;
}

.dmhp-quick-sort-v472 a {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid #dce2e9;
  border-radius: 4px;
  background: #fff;
  color: #263247;
  font-size: 10px;
  text-decoration: none !important;
}

.dmhp-quick-sort-v472 a:hover {
  border-color: #1679eb;
  color: #1679eb;
}

@media (max-width: 800px) {
  .dmhp-filter-v472-ready {
    margin-bottom: 12px;
  }

  .dmhp-filter-v472-ready .filter-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 3;
  }

  .dmhp-quick-section-v472 {
    display: block;
    padding: 9px;
  }

  .dmhp-quick-title-v472 {
    padding: 0 0 7px;
  }

  .dmhp-quick-specs-v472,
  .dmhp-quick-brands-v472 {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }

  .dmhp-quick-spec-v472,
  .dmhp-quick-brand-v472,
  .dmhp-quick-more-v472 {
    flex: 0 0 auto;
  }
}

@media (max-width: 480px) {
  .dmhp-quick-sort-v472 {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .dmhp-quick-sort-v472 span,
  .dmhp-quick-sort-v472 a {
    flex: 0 0 auto;
  }
}


/* ========================================================================
 * DMHP Optimizer v4.7.2 - Contact dock mới
 * ====================================================================== */
.dmhp-floating-contact {
  display: none !important;
}

.dmhp-contact-dock-v471 {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.8,.2,1);
}

.dmhp-contact-dock-v471.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dmhp-contact-action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-height: 50px;
  padding: 5px 6px 5px 13px;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: #172033;
  box-shadow: 0 10px 28px rgba(15,23,42,.18);
  text-decoration: none !important;
  overflow: visible;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  backdrop-filter: blur(8px);
}

.dmhp-contact-action:hover {
  transform: translateX(-6px);
  background: #fff;
  box-shadow: 0 14px 34px rgba(15,23,42,.24);
}

.dmhp-contact-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: visible;
}

.dmhp-contact-icon img {
  width: 34px !important;
  height: 34px !important;
  object-fit: contain;
  background: transparent !important;
}

.dmhp-contact-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.dmhp-contact-label {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 92px;
  line-height: 1.15;
}

.dmhp-contact-label b {
  color: #172033;
  font-size: 12px;
  font-weight: 900;
}

.dmhp-contact-label small {
  margin-top: 3px;
  color: #64748b;
  font-size: 9px;
  font-weight: 600;
}

.dmhp-contact-call .dmhp-contact-icon {
  background: linear-gradient(135deg, #ff3b30, #e20814);
  color: #fff;
  box-shadow: 0 6px 16px rgba(226,8,20,.30);
  animation: dmhpContactBob 2.8s ease-in-out infinite;
}

.dmhp-contact-call .dmhp-contact-icon::before,
.dmhp-contact-call .dmhp-contact-icon::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(226,8,20,.34);
  border-radius: 50%;
  opacity: 0;
  animation: dmhpContactRing 2.4s ease-out infinite;
}

.dmhp-contact-call .dmhp-contact-icon::after {
  animation-delay: 1.2s;
}

.dmhp-contact-zalo .dmhp-contact-icon {
  background: #fff;
  box-shadow: 0 5px 14px rgba(0,104,255,.20);
  animation: dmhpContactBob 2.8s ease-in-out .35s infinite;
}

.dmhp-contact-messenger .dmhp-contact-icon {
  background: #fff;
  box-shadow: 0 5px 14px rgba(0,104,255,.20);
  animation: dmhpContactBob 2.8s ease-in-out .7s infinite;
}

@keyframes dmhpContactRing {
  0% { transform: scale(.82); opacity: .72; }
  70%, 100% { transform: scale(1.55); opacity: 0; }
}

@keyframes dmhpContactBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@media (prefers-reduced-motion: reduce) {
  .dmhp-contact-dock-v471,
  .dmhp-contact-action,
  .dmhp-contact-icon,
  .dmhp-contact-icon::before,
  .dmhp-contact-icon::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 768px) {
  .dmhp-contact-dock-v471 {
    right: 10px;
    bottom: 78px;
    gap: 8px;
  }

  .dmhp-contact-action {
    min-height: 46px;
    padding: 4px 5px 4px 10px;
  }

  .dmhp-contact-icon {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .dmhp-contact-label {
    min-width: 78px;
  }

  .dmhp-contact-label b {
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .dmhp-contact-action {
    width: 46px;
    min-width: 46px;
    padding: 4px;
    justify-content: center;
    overflow: hidden;
  }

  .dmhp-contact-label {
    display: none;
  }

  .dmhp-contact-action:hover {
    transform: translateX(-3px) scale(1.03);
  }
}


/* ========================================================================
 * DMHP Optimizer v4.7.3 - Không che nút Back to top + ổn định header
 * ====================================================================== */

/* Desktop: dành riêng vùng cuối góc phải cho nút lên đầu trang. */
.dmhp-contact-dock-v471 {
  right: 18px !important;
  bottom: 82px !important;
  z-index: 9998 !important;
}

.back-to-top,
#backToTop {
  right: 22px !important;
  bottom: 22px !important;
  left: auto !important;
  z-index: 10001 !important;
}

/* Khóa cấu trúc ô tìm kiếm để không bị co, tràn hoặc lệch nút tìm kiếm. */
.site-header .header-main-v26 {
  grid-template-columns: auto minmax(320px, 1fr) auto !important;
  column-gap: 14px !important;
}

.site-header .header-logo-full {
  min-width: 0 !important;
}

.site-header .header-logo-full img {
  width: auto !important;
  height: 38px !important;
  max-width: 170px !important;
  object-fit: contain !important;
}

.site-header .header-search-v26 {
  min-width: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.site-header .header-search-v26 .search-form {
  display: flex !important;
  align-items: stretch !important;
  width: 100% !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #fff !important;
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: 0 4px 14px rgba(15,23,42,.14) !important;
}

.site-header .header-search-v26 .search-input {
  display: block !important;
  flex: 1 1 auto !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border: 0 !important;
  border-radius: 7px 0 0 7px !important;
  background: #fff !important;
  line-height: normal !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.site-header .header-search-v26 .search-btn {
  display: inline-flex !important;
  flex: 0 0 48px !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 40px !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 7px 7px 0 !important;
  background: #ff8700 !important;
  color: #111827 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  box-shadow: none !important;
}

.site-header .header-search-v26 .search-btn:hover {
  background: #f47b00 !important;
}

.site-header .header-actions-v26,
.site-header .header-utility-group {
  min-width: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 1100px) {
  .site-header .header-main-v26 {
    grid-template-columns: auto minmax(270px, 1fr) auto !important;
    column-gap: 10px !important;
  }

  .site-header .header-logo-full img {
    height: 34px !important;
    max-width: 150px !important;
  }

  .site-header .header-contact-card {
    min-width: 100px !important;
  }

  .site-header .hotline-number {
    font-size: 18px !important;
  }

  .site-header .header-location,
  .site-header .header-btn {
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
}

@media (max-width: 900px) {
  .site-header .header-main-v26 {
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-areas: 'logo actions' 'search search' !important;
    row-gap: 9px !important;
  }

  .site-header .header-logo-full { grid-area: logo !important; }
  .site-header .header-actions-v26 { grid-area: actions !important; }
  .site-header .header-search-v26 { grid-area: search !important; }
}

@media (max-width: 768px) {
  /* Trên mobile: nút lên đầu nằm bên trái, dock liên hệ nằm bên phải. */
  .dmhp-contact-dock-v471 {
    right: 10px !important;
    bottom: 76px !important;
  }

  .back-to-top,
  #backToTop {
    left: 12px !important;
    right: auto !important;
    bottom: 76px !important;
  }

  .site-header .header-search-v26 .search-form,
  .site-header .header-search-v26 .search-input,
  .site-header .header-search-v26 .search-btn {
    height: 40px !important;
    min-height: 40px !important;
  }
}

@media (max-width: 520px) {
  .site-header .header-logo-full img {
    height: 32px !important;
    max-width: 145px !important;
  }

  .site-header .header-search-v26 .search-input {
    font-size: 12px !important;
    padding-left: 11px !important;
    padding-right: 8px !important;
  }
}


/* v4.7.4: menu xổ xuống không bị nav overflow cắt */
@media (min-width:801px){
  .main-nav,.main-nav>.container,.main-nav .nav-inner{overflow:visible!important}
  .main-nav .nav-item,.main-nav .menu-item{position:relative!important}
  .main-nav .nav-dropdown,.main-nav .sub-menu{display:block!important;position:absolute!important;top:100%!important;left:0!important;min-width:230px!important;background:#fff!important;border-top:3px solid #1a73e8!important;border-radius:0 0 10px 10px!important;box-shadow:0 14px 32px rgba(15,23,42,.18)!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(8px)!important;transition:.18s ease!important;z-index:10050!important}
  .main-nav .nav-item:hover>.nav-dropdown,.main-nav .nav-item:focus-within>.nav-dropdown,.main-nav .menu-item:hover>.sub-menu,.main-nav .menu-item:focus-within>.sub-menu{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:translateY(0)!important}
  .main-nav .sub-menu a,.main-nav .nav-dropdown a{display:flex!important;width:100%!important;min-height:40px!important;padding:9px 16px!important;color:#263548!important;background:#fff!important;border-bottom:1px solid #eef2f7!important;white-space:nowrap!important}
  .main-nav .sub-menu a:hover,.main-nav .nav-dropdown a:hover{color:#1a73e8!important;background:#f0f7ff!important;padding-left:20px!important}
  .main-nav .sub-menu .sub-menu{top:-6px!important;left:100%!important;border-radius:10px!important}
}
.dmhp-brand-ready-v472 .dmhp-brand-list-v472{max-height:310px;overflow:auto;padding-right:4px}
.dmhp-brand-ready-v472 .dmhp-brand-option-v472{min-height:28px}


/* ========================================================================
 * DMHP Optimizer v4.7.5 - Mobile category/archive stability
 * ====================================================================== */
html.dmhp-filter-open-v475,
body.dmhp-filter-open-v475 {
  overflow: hidden !important;
  overscroll-behavior: none;
}

.dmhp-filter-overlay-v475 {
  display: none;
}

.dmhp-filter-close-v475 {
  display: none;
}

@media (max-width: 800px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body.archive.tax-product_cat .page-body,
  body.post-type-archive-product .page-body,
  body.search-results .page-body {
    width: 100% !important;
    max-width: 100% !important;
    margin: 6px auto 14px !important;
    padding: 0 8px !important;
  }

  body.archive.tax-product_cat .page-body > .container,
  body.post-type-archive-product .page-body > .container,
  body.search-results .page-body > .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
  }

  .dmhp-archive-breadcrumb {
    margin: 0 0 7px !important;
    padding: 0 2px !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .dmhp-archive-breadcrumb .breadcrumb {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    scrollbar-width: none;
    padding: 6px 0 !important;
  }

  .dmhp-archive-breadcrumb .breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .dmhp-category-header {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 8px !important;
    padding: 13px 14px !important;
    border-radius: 10px !important;
    gap: 10px !important;
    overflow: hidden !important;
  }

  .dmhp-category-header > div:first-child {
    min-width: 0 !important;
    flex: 1 1 auto !important;
  }

  .dmhp-category-header h1 {
    margin: 0 0 3px !important;
    font-size: 20px !important;
    line-height: 1.25 !important;
    overflow-wrap: anywhere !important;
  }

  .dmhp-category-header p {
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden !important;
  }

  .dmhp-category-icon {
    flex: 0 0 42px !important;
    width: 42px !important;
    font-size: 34px !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  .dmhp-filter-toggle {
    position: relative !important;
    z-index: 20 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 0 8px !important;
    padding: 10px 13px !important;
    border-radius: 9px !important;
    box-shadow: 0 3px 10px rgba(26,115,232,.18) !important;
    font-size: 13px !important;
  }

  .cat-page-layout {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin-top: 0 !important;
  }

  .products-area {
    width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  /* Bộ lọc mở thành ngăn kéo, không đẩy vỡ lưới sản phẩm. */
  #productFilterSidebar.filter-sidebar {
    display: block !important;
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    z-index: 10060 !important;
    width: min(88vw, 380px) !important;
    max-width: 380px !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    border-radius: 0 14px 14px 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    box-shadow: 12px 0 36px rgba(15,23,42,.24) !important;
    transform: translate3d(-105%,0,0) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform .24s ease, opacity .2s ease, visibility .2s ease !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }

  #productFilterSidebar.filter-sidebar.is-open {
    transform: translate3d(0,0,0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  #productFilterSidebar .filter-sidebar-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 9 !important;
    min-height: 52px !important;
    padding: 12px 52px 12px 15px !important;
    border-radius: 0 !important;
    font-size: 15px !important;
    box-shadow: 0 4px 12px rgba(15,23,42,.1) !important;
  }

  .dmhp-filter-close-v475 {
    display: inline-flex !important;
    position: absolute !important;
    top: 8px !important;
    right: 9px !important;
    z-index: 11 !important;
    width: 36px !important;
    height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(255,255,255,.34) !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,.14) !important;
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .dmhp-filter-overlay-v475 {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 10050 !important;
    background: rgba(15,23,42,.52) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity .22s ease, visibility .22s ease !important;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
  }

  .dmhp-filter-overlay-v475.is-open {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  #productFilterSidebar .filter-group {
    padding-left: 13px !important;
    padding-right: 13px !important;
  }

  #productFilterSidebar .dmhp-filter-submit-v472,
  #productFilterSidebar .dmhp-filter-submit,
  #productFilterSidebar .filter-reset-btn {
    min-height: 43px !important;
    font-size: 13px !important;
  }

  /* Thanh lọc nhanh phải cuộn ngang thay vì làm tràn màn hình. */
  .dmhp-quick-filter-v472 {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 8px !important;
    overflow: hidden !important;
    border-radius: 9px !important;
  }

  .dmhp-quick-section-v472,
  .dmhp-quick-sort-v472,
  .dmhp-quick-specs-v472,
  .dmhp-quick-brands-v472 {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .dmhp-quick-specs-v472,
  .dmhp-quick-brands-v472,
  .dmhp-quick-sort-v472 {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }

  .dmhp-quick-specs-v472::-webkit-scrollbar,
  .dmhp-quick-brands-v472::-webkit-scrollbar,
  .dmhp-quick-sort-v472::-webkit-scrollbar {
    display: none !important;
  }

  /* Thanh số lượng/sắp xếp gọn trên mobile. */
  .sort-bar {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 9px 10px !important;
    margin-bottom: 7px !important;
    border-radius: 9px !important;
  }

  .result-count {
    min-width: 0 !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere !important;
  }

  .sort-right {
    min-width: 0 !important;
    gap: 5px !important;
  }

  .sort-label {
    display: none !important;
  }

  .sort-select {
    width: auto !important;
    max-width: 132px !important;
    min-height: 34px !important;
    padding: 5px 26px 5px 8px !important;
    font-size: 11px !important;
  }

  /* Lưới 2 cột cân đối và không có phần tử con làm tràn cột. */
  .cat-products-grid.view-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0,1fr)) !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .cat-products-grid .product-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-radius: 8px !important;
    overflow: hidden !important;
  }

  .cat-products-grid .pc-img-wrap {
    width: 100% !important;
    min-width: 0 !important;
    padding-top: 100% !important;
  }

  .cat-products-grid .pc-img {
    padding: 7px !important;
  }

  .cat-products-grid .pc-badges {
    top: 4px !important;
    left: 4px !important;
  }

  .cat-products-grid .badge {
    padding: 1px 5px !important;
    font-size: 9px !important;
  }

  .cat-products-grid .pc-body {
    min-width: 0 !important;
    padding: 7px 8px 6px !important;
    gap: 3px !important;
  }

  .cat-products-grid .pc-brand {
    font-size: 8.5px !important;
  }

  .cat-products-grid .pc-name {
    min-height: 36px !important;
    font-size: 11.5px !important;
    line-height: 1.42 !important;
    overflow-wrap: anywhere !important;
  }

  .cat-products-grid .pc-price-box {
    min-width: 0 !important;
    gap: 3px !important;
  }

  .cat-products-grid .pc-price {
    max-width: 100% !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
  }

  .cat-products-grid .pc-compare {
    max-width: 100% !important;
    font-size: 9px !important;
  }

  .cat-products-grid .pc-rating,
  .cat-products-grid .pc-gift {
    font-size: 9px !important;
  }

  .cat-products-grid .pc-gift {
    padding: 3px 4px !important;
    line-height: 1.3 !important;
  }

  .cat-products-grid .pc-footer {
    padding: 0 7px 7px !important;
  }

  .cat-products-grid .pc-add-cart {
    min-height: 36px !important;
    padding: 7px 4px !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    text-align: center !important;
  }

  .pagination {
    max-width: 100% !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    padding: 4px 2px 8px !important;
    scrollbar-width: none !important;
  }

  .pagination::-webkit-scrollbar {
    display: none !important;
  }

  .pagination .page-btn {
    flex: 0 0 34px !important;
  }
}

@media (max-width: 380px) {
  .cat-products-grid.view-grid {
    gap: 5px !important;
  }

  .cat-products-grid .pc-body {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .cat-products-grid .pc-price {
    font-size: 13px !important;
  }

  .cat-products-grid .pc-compare {
    display: none !important;
  }

  .sort-select {
    max-width: 116px !important;
  }
}


/* ========================================================================
 * DMHP Optimizer v4.7.6 - Bộ lọc bấm ổn định + loại sản phẩm
 * ====================================================================== */
#productFilterSidebar,
#productFilterSidebar form,
#productFilterSidebar .filter-group,
#productFilterSidebar .filter-group-body,
#productFilterSidebar .dmhp-brand-list-v472,
#productFilterSidebar .dmhp-spec-list-v472,
#productFilterSidebar .dmhp-price-list-v472 {
  pointer-events: auto !important;
}

/* Hiển thị checkbox thật để Chrome/Safari/điện thoại đều bấm được chắc chắn. */
#productFilterSidebar .dmhp-check-option-v472 {
  position: relative !important;
  z-index: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(22,121,235,.12);
}

#productFilterSidebar .dmhp-check-option-v472 input[type="checkbox"],
#productFilterSidebar .dmhp-check-option-v472 input[type="radio"] {
  position: static !important;
  display: inline-block !important;
  flex: 0 0 15px !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  accent-color: #0876df;
  cursor: pointer !important;
}

#productFilterSidebar .dmhp-check-option-v472 .dmhp-checkbox-v472 {
  display: none !important;
}

#productFilterSidebar .dmhp-price-option-v472,
#productFilterSidebar .dmhp-filter-more,
#productFilterSidebar .dmhp-manual-price-toggle,
#productFilterSidebar .dmhp-filter-submit-v472,
#productFilterSidebar .dmhp-filter-submit,
#productFilterSidebar .filter-reset-btn,
#productFilterSidebar input,
#productFilterSidebar button,
#productFilterSidebar a {
  pointer-events: auto !important;
  touch-action: manipulation;
}

#productFilterSidebar .dmhp-filter-submit-v472,
#productFilterSidebar .dmhp-filter-submit {
  position: relative !important;
  z-index: 3 !important;
  cursor: pointer !important;
  user-select: none;
  -webkit-user-select: none;
}

#productFilterSidebar .dmhp-filter-submit-v472.is-pressing,
#productFilterSidebar .dmhp-filter-submit.is-pressing {
  transform: translateY(1px) scale(.99) !important;
}

#productFilterSidebar .dmhp-spec-machine_type .filter-group-title,
#productFilterSidebar .dmhp-spec-group-v472.dmhp-spec-machine_type .filter-group-title {
  color: #075ebe !important;
  background: #f1f7ff !important;
}

@media (max-width: 800px) {
  #productFilterSidebar .dmhp-check-option-v472,
  #productFilterSidebar .dmhp-price-option-v472 {
    min-height: 38px !important;
    padding: 8px 2px !important;
    font-size: 12px !important;
  }

  #productFilterSidebar .dmhp-check-option-v472 input[type="checkbox"],
  #productFilterSidebar .dmhp-check-option-v472 input[type="radio"] {
    width: 18px !important;
    height: 18px !important;
    flex-basis: 18px !important;
  }
}
