/* ============================================================
   HÒA CƯỜNG M&E — Bugfix v6 (from 4-round audit)
   Pure-CSS fixes for issues that can't be regex-fixed
   ============================================================ */

/* ============================================================
   1. STICKY HEADER LOGO — fix aspect distort + size
   ============================================================ */
.stuck #logo img {
  max-height: 48px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
#logo img {
  max-height: 64px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}
@media (max-width: 549px) {
  #logo img,
  .stuck #logo img { max-height: 40px !important; }
}

/* ============================================================
   2. HIDE LEFT-BOTTOM Flatsome .float-contact (replaced by Phase 1 sticky CTA)
   Already done in Phase 1 for mobile — extend to desktop too if not needed
   ============================================================ */
.float-contact { display: none !important; }
.float-contact.show-only-mobile { display: none !important; }

/* Hide WhatsApp+FB+Tel cũ floating left side (Flatsome contact buttons) */
.chat-zalo, .chat-face,
.float-contact .hotline,
.float-contact .chat-zalo,
.float-contact .chat-face { display: none !important; }

/* ============================================================
   3. HOME-PAGE: Force header-bottom visible on scroll
   (Was hidden via .home .stuck .header-bottom display:none)
   ============================================================ */
.home .stuck .header-bottom,
body.home .stuck .header-bottom {
  display: block !important;
}

/* ============================================================
   4. FB IFRAME footer width — ensure responsive
   ============================================================ */
.footer-wrapper iframe[src*="facebook.com"],
.footer-section iframe[src*="facebook.com"] {
  max-width: 100% !important;
  width: 100% !important;
  height: auto;
  min-height: 250px;
}

/* ============================================================
   5. YITH WISHLIST — hide duplicate IDs UI (also redundant with our CTA)
   ============================================================ */
.yith-wcwl-add-to-wishlist,
.yith-wcwl-add-button,
.yith-wcwl-icon-heart-outline {
  display: none !important;
}

/* ============================================================
   6. HIDE empty Flatsome banner-block on mobile (chỉ desktop)
   ============================================================ */
@media (max-width: 549px) {
  .header-block-block-2,
  .header-block-block-3 { display: none !important; }
}

/* ============================================================
   7. CATEGORY EMPTY STATE — better than default WC string
   ============================================================ */
.woocommerce-info.message-wrapper {
  background: var(--hc-gray-50, #f9fafb) !important;
  border: 1px dashed var(--hc-gray-300, #d1d5db) !important;
  border-radius: var(--hc-r-lg, 12px) !important;
  padding: 32px 24px !important;
  text-align: center;
  color: var(--hc-gray-700, #374151) !important;
  margin: 24px auto !important;
  max-width: 720px;
}
.woocommerce-info.message-wrapper::before {
  content: "📦";
  display: block;
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}

/* ============================================================
   8. PRODUCT PAGE — verify CTA visible + sticky form area
   ============================================================ */
body.single-product .product-info h1.product-title {
  display: block !important;
  visibility: visible !important;
}

/* ============================================================
   9. SEARCH RESULT page — basic styling fallback
   ============================================================ */
.search-no-results .entry-content,
.search-results .entry-content {
  padding: 32px 24px !important;
  text-align: center;
}

/* ============================================================
   10. 404 PAGE — basic styling for nginx fallback
   ============================================================ */
.error-404 .entry-title,
.error-404 .page-title {
  font-size: 6rem !important;
  color: var(--hc-navy, #0d4d8c) !important;
  text-align: center;
  margin: 32px 0 16px !important;
}
.error-404 .entry-content {
  text-align: center;
  padding: 24px;
}

/* ============================================================
   11. INPUT FIELD focus state — premium ring
   ============================================================ */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: var(--hc-navy, #0d4d8c) !important;
  box-shadow: 0 0 0 3px rgba(13,77,140,0.12) !important;
}

/* ============================================================
   12. KILL Flatsome inline 'header-block-block-2' green button mobile
   ============================================================ */
.header-block-block-2 ul li a {
  background: var(--hc-navy, #0d4d8c) !important;
}

/* ============================================================
   13. ACTIVE state for menu item on category page
   ============================================================ */
.header-bottom .nav > li.current-menu-item > a,
.header-bottom .nav > li.current-menu-parent > a,
.header-bottom .nav > li.current-page-ancestor > a {
  color: var(--hc-navy, #0d4d8c) !important;
  border-bottom: 3px solid var(--hc-orange, #ff6a00);
  line-height: 47px !important;
}

/* ============================================================
   14. ENSURE Phase 1 sticky CTA bar visible mobile
   (verify .hc-sticky-cta display)
   ============================================================ */
@media (max-width: 767px) {
  .hc-sticky-cta { display: block !important; }
  body { padding-bottom: 56px !important; }
}

/* ============================================================
   15. PAGE TITLE container — remove default ugly bg
   ============================================================ */
.page-title-inner.flex-row {
  background: transparent !important;
}

/* ============================================================
   16. NUKE legacy yellow widget-title (was sai green)
   ============================================================ */
.product-categories,
.widget_product_categories {
  background: white !important;
}

/* ============================================================
   17. FOOTER widgets text contrast fix
   ============================================================ */
.footer-wrapper .widget li,
.footer-wrapper .widget a,
.footer-wrapper p,
.absolute-footer .footer-nav a {
  color: rgba(255,255,255,0.82) !important;
}
.footer-wrapper .widget a:hover,
.absolute-footer .footer-nav a:hover {
  color: var(--hc-orange-light, #ffa15a) !important;
}

/* ============================================================
   18. FIX product-info specs format on PDP
   ============================================================ */
body.single-product .product-info ul,
body.single-product .woocommerce-tabs ul {
  padding-left: 20px;
}
body.single-product .product-info li,
body.single-product .woocommerce-tabs li {
  margin-bottom: 6px;
  line-height: 1.55;
}

/* ============================================================
   19. RESPONSIVE breakpoint normalization (visual hint only)
   Standard set: 549/767/1023/1279
   ============================================================ */

/* ============================================================
   20. KILL Flatsome footer-wrapper negative margin-top
   ============================================================ */
.footer-wrapper { margin-top: 0 !important; }
