/* ============================================================
   FireHub bridge CSS — khớp Elementor / CF7 / WooCommerce
   với hệ thống thiết kế trong firehub-shared.css + page-*.css
   ============================================================ */

/* ---------- Elementor container = .container của thiết kế ---------- */
body .e-con {
  gap: 0;
  padding-left: 24px;
  padding-right: 24px;
}
body .e-con .e-con { padding-left: 0; padding-right: 0; }
@media (max-width: 1080px) {
  body .e-con { padding-left: 20px; padding-right: 20px; }
  body .e-con .e-con { padding-left: 0; padding-right: 0; }
}
/* Section design có border-top .section: giữ nguyên qua css_classes */
.e-con.section:first-child { border-top: none; }

/* Widget wrapper trong suốt với thiết kế */
.elementor-widget-text-editor, .elementor-widget-shortcode { width: 100%; }
.elementor-widget-heading .elementor-heading-title {
  font: inherit; line-height: inherit; color: inherit;
  letter-spacing: inherit; margin: 0;
}
/* sol-list gap 20px (card tách widget riêng ở trang giải pháp) */
.elementor-widget + .elementor-widget .sol-card { margin-top: 20px; }

/* Khối form 2 cột trang Hồ sơ PCCC: container Elementor mang class final-form */
body .e-con.final-form { display: grid; }

/* ---------- Hero carousel (trang chủ) ---------- */
.hero-band { padding-top: 18px; padding-bottom: 6px; }
.fh-hero-carousel .elementor-image-carousel-wrapper { border-radius: 16px; overflow: hidden; }
.fh-hero-carousel .swiper-slide img { width: 100%; height: auto; display: block; }
.fh-hero-carousel .swiper-pagination { bottom: 12px !important; }
.fh-hero-carousel .swiper-pagination-bullet {
  width: 26px; height: 4px; border-radius: 999px;
  background: #fff; opacity: .55; transition: opacity .2s;
}
.fh-hero-carousel .swiper-pagination-bullet-active { opacity: 1; background: var(--fs-red); }
.fh-hero-carousel .elementor-swiper-button {
  width: 38px; height: 38px; border-radius: 999px;
  background: rgba(27,34,44,.45); color: #fff;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}
.fh-hero-carousel:hover .elementor-swiper-button { opacity: 1; }
.fh-hero-carousel .elementor-swiper-button svg { width: 14px; height: 14px; fill: #fff; }
@media (max-width: 640px) {
  .fh-hero-carousel .elementor-swiper-button { opacity: 1; width: 34px; height: 34px; }
}

/* ---------- Contact Form 7 ---------- */
.wpcf7 form { display: block; }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="tel"], .wpcf7 input[type="email"],
.wpcf7 input[type="number"], .wpcf7 select, .wpcf7 textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 11px 13px; font: inherit; font-size: 14.5px; color: var(--text);
  background: #fff; box-sizing: border-box;
}
.wpcf7 input:focus, .wpcf7 select:focus, .wpcf7 textarea:focus {
  outline: none; border-color: var(--fs-red);
  box-shadow: 0 0 0 3px rgba(230, 51, 34, .12);
}
.wpcf7 textarea { min-height: 110px; resize: vertical; }
.wpcf7 .fh-field { margin-bottom: 14px; }
.wpcf7 .fh-field > label {
  display: block; font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.wpcf7 .fh-field .req { color: var(--fs-red); }
.wpcf7 .fh-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .wpcf7 .fh-2col { grid-template-columns: 1fr; } }
.wpcf7 .wpcf7-radio { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.wpcf7 .wpcf7-radio .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-radio label { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
.wpcf7 .wpcf7-acceptance label { display: inline-flex; gap: 8px; font-size: 13px; color: var(--text-muted); }
.wpcf7 .wpcf7-submit {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gradient-brand, linear-gradient(135deg, #F6871F 0%, #E63322 55%, #C8221A 100%));
  color: #fff; border: none; border-radius: 12px; padding: 13px 26px;
  font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.wpcf7 .wpcf7-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(230,51,34,.35); }
.wpcf7 .wpcf7-spinner { margin: 0 0 0 10px; }
.wpcf7 form .wpcf7-response-output {
  margin: 14px 0 0; padding: 11px 14px; border-radius: 10px;
  border: 1px solid var(--border-strong); font-size: 13.5px;
}
.wpcf7 form.sent .wpcf7-response-output { border-color: #1d9e55; color: #157a41; background: #effaf3; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border-color: var(--fs-red); color: var(--fs-red-deep); background: var(--fs-red-light); }
.wpcf7-not-valid-tip { color: var(--fs-red-deep); font-size: 12.5px; margin-top: 4px; }

/* ---------- WooCommerce: grid sản phẩm theo design ---------- */
.woocommerce-notices-wrapper .woocommerce-message,
.woocommerce-notices-wrapper .woocommerce-info,
.woocommerce-notices-wrapper .woocommerce-error {
  list-style: none; margin: 0 0 18px; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--border-strong); background: #fff; font-size: 14px;
}
ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; margin: 14px 0 0; padding: 0; }
@media (max-width: 1080px) { ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px)  { ul.products { grid-template-columns: 1fr; } }
ul.products li.product {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 12px; display: flex; flex-direction: column; gap: 8px; position: relative;
  transition: transform .18s ease, box-shadow .18s ease;
}
ul.products li.product:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 10px 26px rgba(27,34,44,.10)); }
ul.products li.product > a { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; }
ul.products li.product img { width: 100%; height: auto; border-radius: 10px; background: var(--surface-2); }
.woocommerce-loop-product__title { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.45; margin: 0; }
ul.products li.product:hover .woocommerce-loop-product__title { color: var(--fs-red); }
ul.products .price { color: var(--fs-red); font-weight: 700; font-size: 15px; margin: 0; }
ul.products .price del { color: var(--text-faint); font-weight: 500; margin-right: 6px; }
.fh-price-contact { color: var(--fs-red); font-weight: 700; }
ul.products li.product .button, .woocommerce a.button, .woocommerce button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: auto; background: #fff; color: var(--fs-red);
  border: 1px solid var(--fs-red); border-radius: 10px; padding: 9px 14px;
  font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .18s, color .18s;
}
ul.products li.product .button:hover, .woocommerce a.button:hover { background: var(--fs-red); color: #fff; }
.woocommerce span.onsale {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  background: var(--gradient-brand, #E63322); color: #fff; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; padding: 4px 10px;
}
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { font-size: 13.5px; color: var(--text-muted); }
.woocommerce .woocommerce-ordering select { border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13.5px; }

/* Trang chi tiết sản phẩm Woo */
.single-product div.product { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 36px; align-items: start; }
@media (max-width: 900px) { .single-product div.product { grid-template-columns: 1fr; } }
.single-product div.product .woocommerce-product-gallery img { width: 100%; border-radius: 16px; border: 1px solid var(--border); background: var(--surface-2); }
.single-product div.product .product_title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 10px; }
.single-product div.product p.price { font-size: 22px; color: var(--fs-red); font-weight: 800; margin: 0 0 16px; }
.single-product div.product .woocommerce-product-details__short-description { color: var(--text-muted); font-size: 14.5px; line-height: 1.75; }
.single-product form.cart { display: flex; gap: 12px; align-items: center; margin: 18px 0; }
.single-product form.cart .qty { width: 74px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 11px 10px; font: inherit; text-align: center; }
.single-product form.cart .single_add_to_cart_button {
  background: var(--gradient-brand, #E63322); color: #fff; border: none; border-radius: 12px;
  padding: 13px 26px; font-weight: 700; font-size: 15px;
}
.single-product .product_meta { font-size: 13px; color: var(--text-muted); display: grid; gap: 4px; margin-top: 14px; }
.single-product .product_meta a { color: var(--fs-red); text-decoration: none; }
.woocommerce-tabs { grid-column: 1 / -1; margin-top: 26px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 8px; list-style: none; margin: 0 0 0; padding: 0; border-bottom: 1px solid var(--border); }
.woocommerce-tabs ul.tabs li a { display: inline-block; padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent; }
.woocommerce-tabs ul.tabs li.active a { color: var(--fs-red); border-bottom-color: var(--fs-red); }
.woocommerce-tabs .panel { padding: 20px 2px; font-size: 14.5px; line-height: 1.75; color: var(--text); }
.related.products, .up-sells { grid-column: 1 / -1; margin-top: 30px; }
.related.products > h2, .up-sells > h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }

/* Giỏ hàng / thanh toán tối thiểu */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: 14px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 12px 14px; border-bottom: 1px solid var(--border); text-align: left; }

/* ---------- Blog / bài viết ---------- */
.fh-article .container { max-width: 860px; padding-top: 10px; padding-bottom: 64px; }
.fh-article-thumb img { width: 100%; border-radius: 16px; margin-bottom: 26px; }
.fh-article-content { font-size: 15.5px; line-height: 1.85; color: var(--text); }
.fh-article-content h2 { font-size: 24px; margin: 34px 0 12px; letter-spacing: -0.01em; }
.fh-article-content h3 { font-size: 19px; margin: 26px 0 10px; }
.fh-article-content p { margin: 0 0 16px; }
.fh-article-content img { max-width: 100%; border-radius: 12px; }
.fh-article-content a { color: var(--fs-red); }
.fh-article-content ul, .fh-article-content ol { margin: 0 0 16px; padding-left: 22px; }
.fh-article-content blockquote { border-left: 3px solid var(--fs-red); margin: 0 0 16px; padding: 8px 0 8px 18px; color: var(--text-muted); }
.fh-pagination { margin-top: 34px; text-align: center; }
.fh-pagination .nav-links { display: inline-flex; gap: 8px; }
.fh-pagination .page-numbers {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 10px;
  font-size: 14px; color: var(--text); text-decoration: none;
}
.fh-pagination .page-numbers.current { background: var(--fs-red); border-color: var(--fs-red); color: #fff; }

/* Ảnh đại diện trống trong news-card -> nền gradient như design */
.news-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Trang 404 / tiện ích ---------- */
.fh-404 { padding: 90px 0; text-align: center; }
.fh-404 h1 { font-size: 64px; margin: 0; color: var(--fs-red); }
