/* AI Care – lớp nhận diện thương hiệu phủ lên theme Teapoz
   Theo Cẩm nang nhận diện AI Care v1.0 (28/06/2026):
   - Tiêu đề serif (Playfair Display), nội dung sans-serif (Open Sans)
   - H1 Golden Bronze · H2 Deep Brown · H3 sans-serif Deep Brown
   - Body Deep Brown/Black · Caption Warm Grey
   - Logo: không bóp méo/đổi màu/tách phần tử; tối thiểu 64 px; vùng an toàn quanh logo
   Màu lấy từ biến :root do plugin in ra (xem aicare-brand.php) */

/* ---------- Typography ---------- */
body,
button, input, select, textarea,
.elementor-widget-text-editor {
  font-family: 'Open Sans', Arial, sans-serif;
  color: var(--text);
}
h1, h2,
.elementor-widget-heading h1.elementor-heading-title,
.elementor-widget-heading h2.elementor-heading-title,
.product_title,
.entry-title,
.page-title {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif !important;
  letter-spacing: 0;
  line-height: 1.25; /* chừa chỗ cho dấu tiếng Việt */
}
h1, .elementor-widget-heading h1.elementor-heading-title,
.product_title, .page-title { color: var(--accent); }          /* Golden Bronze */
h2, .elementor-widget-heading h2.elementor-heading-title { color: var(--primary); } /* Deep Brown */
h3, h4, h5, h6,
.woocommerce-loop-product__title,
.elementor-widget-heading h3.elementor-heading-title,
.elementor-widget-heading h4.elementor-heading-title {
  font-family: 'Open Sans', Arial, sans-serif !important;
  color: var(--primary);
  line-height: 1.35;
}
small, figcaption, .wp-caption-text, .woocommerce-result-count,
.posted_in, .tagged_as, .entry-meta {
  color: #8A8A8A; /* Warm Grey làm đậm để đọc được trên nền trắng */
}

/* ---------- Logo ---------- */
.custom-logo,
.site-logo img,
.elementor-widget-site-logo img,
.hfe-site-logo img {
  height: auto;
  min-width: 64px;          /* kích thước tối thiểu digital */
  max-height: 96px;
  width: auto;
  object-fit: contain;      /* không bóp méo */
  filter: none !important;  /* không đổi màu */
}
.elementor-widget-site-logo,
.hfe-site-logo { padding: 6px 0; } /* vùng an toàn */

/* ---------- Hình mờ logo giữa trang ---------- */
body.aicare-wm::after {
  content: "";
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(80vw, 680px);
  height: min(80vw, 680px);
  transform: translate(-50%, -50%);
  background: no-repeat center / contain;
  opacity: .07;
  pointer-events: none;
  z-index: 40;
}
@media print { body.aicare-wm::after { display: none; } }

/* ---------- Nút ---------- */
.button, button.button, a.button, input[type="submit"],
.elementor-button,
.woocommerce a.button, .woocommerce button.button,
.woocommerce #respond input#submit,
.single_add_to_cart_button,
.checkout-button,
#place_order {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
  font-family: 'Open Sans', Arial, sans-serif;
  font-weight: 600;
}
.button:hover, button.button:hover, a.button:hover, input[type="submit"]:hover,
.elementor-button:hover,
.woocommerce a.button:hover, .woocommerce button.button:hover,
.single_add_to_cart_button:hover,
.checkout-button:hover,
#place_order:hover {
  background-color: var(--primary_hover) !important;
  border-color: var(--primary_hover) !important;
}

/* ---------- Liên kết & giá ---------- */
a { color: var(--primary); }
a:hover { color: var(--primary_hover); }
.price, .woocommerce-Price-amount { color: var(--secondary); font-weight: 600; }
.price ins .woocommerce-Price-amount { color: var(--highlight); }
.price del .woocommerce-Price-amount { color: var(--light); font-weight: 400; }
.onsale, .product-label .onsale { background: var(--highlight) !important; color: #fff !important; }

/* ---------- Viền vàng kiểu truyền thống, nền kem ---------- */
hr { border-color: var(--border); }
.woocommerce-tabs ul.tabs li { border-color: var(--border); }
.woocommerce-info, .woocommerce-message {
  border-top-color: var(--accent);
  background: var(--background_light);
}
.woocommerce-info::before, .woocommerce-message::before { color: var(--accent); }
.elementor-divider-separator { border-color: var(--accent) !important; }

/* ---------- Ô nhập ---------- */
input:focus, select:focus, textarea:focus {
  border-color: var(--accent) !important;
  outline-color: var(--accent);
}

/* ---------- Khuyến cáo TPBVSK ---------- */
.aicare-disclaimer {
  margin: 16px 0;
  padding: 10px 14px;
  border-left: 3px solid var(--accent);
  background: var(--background_light);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}
.aicare-disclaimer--footer {
  margin: 0;
  border-left: 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 12px;
  position: relative;
  z-index: 41;
}

/* ---------- Tiếng Việt: không tự viết hoa mỗi chữ ---------- */
.product-categories a, .widget_product_categories a, .woocommerce-loop-category__title,
.woocommerce-loop-product__title, .product_title, .page-title, .entry-title,
.elementor-nav-menu a, .menu-item > a, .breadcrumb, .woocommerce-breadcrumb,
.elementor-heading-title, h1, h2, h3, h4 { text-transform: none !important; }
.cat-item .count { color: var(--light); }

/* ---------- Thông tin chủ sở hữu + Bộ Công Thương ---------- */
.aicare-legal { background: #2A1608; color: #E9D9B4; font-size: 13px; line-height: 1.7; position: relative; z-index: 41; }
.aicare-legal__in { max-width: 1240px; margin: 0 auto; padding: 16px 20px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.aicare-legal strong { color: #F4E4BC; }
.aicare-legal nav { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 4px; }
.aicare-legal a { color: #DAA520; text-decoration: none; }
.aicare-legal a:hover { text-decoration: underline; }
.aicare-legal__bct img { display: block; width: 150px; height: auto; background: #fff; border-radius: 4px; padding: 2px; }
.ac-updated { color: var(--light); }
.entry-content table { border-collapse: collapse; width: 100%; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.entry-content th { background: var(--background_light); }

/* ---------- Hộp VietQR ---------- */
.aicare-qr { max-width: 440px; margin: 24px auto; padding: 20px; border: 1px solid var(--border); border-top: 3px solid var(--accent); border-radius: 10px; background: var(--background_light); text-align: center; position: relative; z-index: 41; }
.aicare-qr h3 { margin: 0 0 10px; }
.aicare-qr img { width: 100%; max-width: 300px; height: auto; background: #fff; border-radius: 8px; }
.aicare-qr table { width: 100%; margin: 12px 0 0; font-size: 14px; text-align: left; border: 0; }
.aicare-qr td { padding: 4px 6px; border: 0; border-bottom: 1px dashed var(--border); }
.aicare-qr__code { color: var(--highlight); font-size: 16px; letter-spacing: .05em; }
.aicare-qr__note { font-size: 12px; color: var(--text_light); margin: 10px 0 0; }

/* ---------- Mua ngay / Tiếp tục mua sắm ---------- */
.aicare-buynow { display: inline-flex; align-items: center; justify-content: center; background: var(--gold) !important; border: 2px solid var(--gold) !important; color: #2A1608 !important; font-weight: 700; border-radius: 6px; text-decoration: none; transition: background .2s; }
.aicare-buynow:hover { background: #C8961A !important; border-color: #C8961A !important; }
.aicare-buynow--loop { width: 100%; margin-top: 10px; padding: 8px 12px; font-size: 14px; }
.aicare-buynow--single { margin-left: 10px; padding: 0 28px; min-height: 50px; font-size: 16px; }
@media (max-width: 560px) { .aicare-buynow--single { margin: 10px 0 0; width: 100%; } }
.product-caption .product-action { flex-wrap: wrap; }
.aicare-continue-wrap { margin-top: 12px; text-align: center; }
.aicare-continue { display: inline-block; color: var(--primary); font-weight: 600; text-decoration: none; padding: 10px 0; }
.aicare-continue:hover { text-decoration: underline; }
.aicare-continue--mini { background: transparent !important; color: var(--primary) !important; border: 1px solid var(--border) !important; }
.aicare-backcart { margin: 0 0 16px; font-size: 14px; }
.aicare-backcart a { color: var(--primary); font-weight: 600; }

/* ---------- Nút giỏ hàng / thanh toán dạng khối ---------- */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wc-block-components-button:not(.is-link).contained {
  background: var(--primary) !important; color: #fff !important; border-radius: 6px !important; font-weight: 700;
}
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover { background: var(--primary_hover) !important; }
.wc-block-components-radio-control__option--checked-option-highlighted,
.wc-block-components-radio-control-accordion-option--checked-option-highlighted { border-color: var(--accent) !important; box-shadow: inset 0 0 0 1px var(--accent) !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--highlight); }
