/* Ẩ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: 480px !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: 420px !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 v5.0.1 - Khôi phục nút xem thêm và chuẩn hóa font mô tả
 * ====================================================================== */
.single-product .dmhp-desc-content {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.72 !important;
  color: #263548 !important;
  text-align: left !important;
  overflow-wrap: anywhere;
}
.single-product .dmhp-desc-content *:not(svg):not(path) {
  font-family: inherit !important;
}
.single-product .dmhp-desc-content p,
.single-product .dmhp-desc-content ul,
.single-product .dmhp-desc-content ol,
.single-product .dmhp-desc-content table,
.single-product .dmhp-desc-content blockquote {
  margin-top: 0 !important;
  margin-bottom: 14px !important;
}
.single-product .dmhp-desc-content h1,
.single-product .dmhp-desc-content h2,
.single-product .dmhp-desc-content h3,
.single-product .dmhp-desc-content h4,
.single-product .dmhp-desc-content h5 {
  color: #111827 !important;
  line-height: 1.35 !important;
  font-weight: 800 !important;
  text-align: left !important;
  margin: 20px 0 12px !important;
}
.single-product .dmhp-desc-content h1 { font-size: 24px !important; }
.single-product .dmhp-desc-content h2 { font-size: 21px !important; }
.single-product .dmhp-desc-content h3 { font-size: 18px !important; }
.single-product .dmhp-desc-content h4,
.single-product .dmhp-desc-content h5 { font-size: 16px !important; }
.single-product .dmhp-desc-content table {
  width: 100% !important;
  max-width: 100% !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: auto !important;
  background: #fff !important;
}
.single-product .dmhp-desc-content th,
.single-product .dmhp-desc-content td {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: #263548 !important;
  text-align: left !important;
  vertical-align: top !important;
  white-space: normal !important;
  word-break: normal !important;
  padding: 9px 10px !important;
  border: 0 !important;
  border-bottom: 1px solid #edf1f5 !important;
  background: transparent !important;
}
.single-product .dmhp-desc-content th {
  font-weight: 800 !important;
  color: #111827 !important;
  background: #f7f9fc !important;
}
.single-product .dmhp-desc-content td:first-child {
  color: #1f2937 !important;
  font-weight: 700 !important;
}
.single-product .dmhp-desc-content img,
.single-product .dmhp-desc-content iframe,
.single-product .dmhp-desc-content video {
  max-width: 100% !important;
  height: auto !important;
}
.single-product .dmhp-v35-readmore-wrap {
  margin-top: -48px !important;
}
.single-product .dmhp-v35-readmore-wrap.is-expanded {
  margin-top: 14px !important;
}
.single-product .dmhp-v35-readmore-btn {
  background: #fff !important;
  color: #0b66c3 !important;
  border: 1px solid #0b66c3 !important;
  box-shadow: 0 5px 14px rgba(11,102,195,.12) !important;
}
.single-product .dmhp-v35-readmore-btn:hover {
  background: #eef6ff !important;
}
@media (max-width: 768px) {
  .single-product .dmhp-desc-content,
  .single-product .dmhp-desc-content th,
  .single-product .dmhp-desc-content td {
    font-size: 14px !important;
  }
  .single-product .dmhp-desc-content th,
  .single-product .dmhp-desc-content td {
    padding: 8px 7px !important;
  }
  .single-product .dmhp-desc-content h2 { font-size: 20px !important; }
  .single-product .dmhp-desc-content h3 { font-size: 17px !important; }
}
