/*
Theme Name: Cat
Theme URI: https://cattransformers.com
Author: FanZong
Author URI: https://workbuddy.cn
Description: Custom lightweight theme for Cat Transformers - a foreign trade low voltage transformer website targeting Middle East, Southeast Asia, Africa and South America. Fast, mobile-first, SEO friendly.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cat
Tags: one-column, custom-menu, featured-images, translation-ready, block-styles
*/

/* =========================================================
   1. CSS Variables & Reset
   ========================================================= */
:root {
  --primary: #1b4d8f;
  --primary-dark: #123a6b;
  --primary-light: #e8f0fa;
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #5b6472;
  --border: #e3e8ef;
  --footer-bg: #102a4a;
  --footer-text: #c7d4e4;
  --whatsapp: #25d366;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(16, 42, 74, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3, h4 { line-height: 1.3; color: var(--primary-dark); font-weight: 700; }
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; margin-bottom: 12px; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 14px; }

.section { padding: 68px 0; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { margin-bottom: 8px; }
.section-title p { color: var(--muted); max-width: 640px; margin: 0 auto; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.75); }
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
.btn-blue { background: var(--primary); color: #fff; }
.btn-blue:hover { background: var(--primary-dark); color: #fff; }

/* =========================================================
   2. Topbar & Header
   ========================================================= */
.topbar {
  background: var(--primary-dark);
  color: #dbe7f5;
  font-size: 0.82rem;
  padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.topbar a { color: #dbe7f5; }
.topbar a:hover { color: #fff; }

.site-header {
  background: var(--surface);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.site-brand { display: flex; align-items: center; gap: 10px; }
.site-brand .logo-text { font-size: 1.35rem; font-weight: 700; color: var(--primary); }
.site-brand .logo-text span { color: var(--accent); }
/* Custom logo image (when uploaded via Customizer / site_logo option) */
.site-brand .custom-logo-link { display: inline-flex; align-items: center; line-height: 0; }
.site-brand .custom-logo { height: 56px; width: auto; max-width: 240px; display: block; }

.main-nav ul { display: flex; list-style: none; gap: 26px; align-items: center; }
.main-nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--accent-dark); }
.main-nav .current-menu-item > a { color: var(--primary); font-weight: 600; }
.main-nav .menu-item-has-children { position: relative; }
.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 8px;
  min-width: 220px;
  padding: 8px 0;
  z-index: 200;
}
.main-nav .menu-item-has-children:hover .sub-menu { display: block; }
.main-nav .sub-menu a { display: block; padding: 9px 18px; font-weight: 400; }
.main-nav .sub-menu a:hover { background: var(--primary-light); color: var(--primary); }

.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--primary); }

/* =========================================================
   3. Hero (Front Page)
   ========================================================= */
.hero {
  background: var(--primary-dark);
  color: #fff;
  padding: 96px 0 88px;
}
.hero h1 { color: #fff; font-size: 2.6rem; margin-bottom: 16px; }
.hero p { color: #c7d4e4; font-size: 1.12rem; max-width: 640px; }
.hero .hero-cta { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .hero-tags { margin-top: 34px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .hero-tags span {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: #dbe7f5;
}

/* =========================================================
   4. Product Cards
   ========================================================= */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(16,42,74,0.12); }
.product-card .pc-icon {
  width: 62px; height: 62px; margin: 0 auto 16px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
}
.product-card h3 { margin-bottom: 8px; }
.product-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.product-card .pc-link { font-weight: 600; font-size: 0.88rem; }

/* =========================================================
   5. Trust / Advantage Blocks
   ========================================================= */
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.trust-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
}
.trust-item .t-icon { font-size: 1.9rem; margin-bottom: 10px; }
.trust-item h3 { font-size: 1.05rem; margin-bottom: 6px; }
.trust-item p { font-size: 0.88rem; color: var(--muted); margin: 0; }

/* =========================================================
   6. CTA Banner
   ========================================================= */
.cta-banner {
  background: var(--primary);
  color: #fff;
  padding: 54px 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 10px; }
.cta-banner p { color: #c7d4e4; max-width: 560px; margin: 0 auto 26px; }

/* =========================================================
   7. Page & Blog
   ========================================================= */
.breadcrumb { padding: 14px 0 0; font-size: 0.85rem; color: var(--muted); }
.breadcrumb a { color: var(--primary); font-weight: 500; }
.breadcrumb a:hover { color: var(--accent-dark); }
.breadcrumb .bc-sep { margin: 0 8px; color: #b0b8c4; }
.breadcrumb .bc-current { color: var(--muted); }

.page-hero {
  background: var(--primary-dark);
  color: #fff;
  padding: 52px 0;
}
.page-hero h1 { color: #fff; font-size: 2rem; margin: 0; }

.page-content { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px; margin: 40px 0; }
.page-content h2 { margin-top: 28px; }
.page-content ul, .page-content ol { margin: 0 0 14px 22px; }

.post-list { display: grid; gap: 22px; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: var(--shadow); }
.post-card h2 { font-size: 1.35rem; margin-bottom: 6px; }
.post-card .post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.post-card .post-excerpt { color: var(--muted); }

.single-post .post-content { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 44px; }
.single-post .post-meta { color: var(--muted); font-size: 0.88rem; margin-bottom: 20px; }
.single-post .post-content h2 { margin-top: 28px; }
.single-post .post-content ul, .single-post .post-content ol { margin: 0 0 14px 22px; }
.single-post .post-content blockquote { border-left: 4px solid var(--accent); padding: 10px 18px; background: var(--primary-light); border-radius: 0 8px 8px 0; margin-bottom: 14px; }

/* Pagination */
.pagination { margin-top: 34px; text-align: center; }
.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  margin: 0 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* =========================================================
   8. Forms & Contact
   ========================================================= */
.wpcf7-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="number"],
.wpcf7-form select,
.wpcf7-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  margin-bottom: 16px;
  background: #fafbfd;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus, .wpcf7-form select:focus { border-color: var(--primary); outline: none; }
.wpcf7-form label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 5px; }
.wpcf7-form .wpcf7-submit { background: var(--accent); color: #fff; border: none; padding: 13px 34px; border-radius: 6px; font-weight: 600; font-size: 0.98rem; cursor: pointer; }
.wpcf7-form .wpcf7-submit:hover { background: var(--accent-dark); }

/* =========================================================
   9. Footer
   ========================================================= */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 56px 0 0; }
.site-footer .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 36px; padding-bottom: 40px; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.site-footer a { color: var(--footer-text); }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 18px 0; font-size: 0.82rem; text-align: center; color: #8aa3c0; }

/* WhatsApp floating button */
.wa-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 58px;
  height: 58px;
  background: var(--whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }

/* =========================================================
   10. Misc
   ========================================================= */
/* Category grid (products hub) */
.category-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0 0 34px; }
.category-grid br, .featured-grid br, .benefit-grid br, .product-list br { display: none; }
/* wpautop wraps grid cards in <p>; make <p> transparent so card <a>/<div> stays the grid child */
.category-grid > p, .featured-grid > p, .benefit-grid > p, .product-list > p { display: contents; margin: 0; }
.category-card { display: flex; align-items: center; gap: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 24px; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.category-card .cc-icon { width: 54px; height: 54px; flex-shrink: 0; background: var(--primary-light); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; color: var(--primary); }
.category-card b { display: block; font-size: 1.02rem; color: var(--text); margin-bottom: 4px; }
.category-card small { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 400; line-height: 1.45; }

/* Category hero (large banner style for product category pages) */
.hero-large { background: linear-gradient(135deg, #1b4d8f 0%, #0c335c 100%); color: #fff; padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero-large::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08), transparent 60%); }
.hero-large .container { position: relative; z-index: 1; }
.hero-tag { display: inline-block; background: rgba(255,255,255,0.14); padding: 5px 16px; border-radius: 20px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; margin-bottom: 18px; }
.hero-large h1 { color: #fff; font-size: 2.5rem; line-height: 1.18; margin: 0 0 18px; max-width: 860px; }
.hero-intro { font-size: 1.02rem; color: rgba(255,255,255,0.92); max-width: 820px; line-height: 1.7; margin-bottom: 26px; }
.hero-intro p { margin-bottom: 8px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn-primary { background: var(--accent); padding: 13px 30px; font-size: 0.98rem; }
.hero-cta .btn-outline { border-color: rgba(255,255,255,0.45); color: #fff; padding: 13px 28px; font-size: 0.98rem; }
.hero-cta .btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 768px) { .hero-large { padding: 54px 0 46px; } .hero-large h1 { font-size: 1.75rem; } .hero-intro { font-size: 0.95rem; } }

/* Featured products (products hub) */
.featured-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin: 0 0 36px; }
.featured-card { display: grid; grid-template-columns: 180px 1fr; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; transition: transform 0.2s, box-shadow 0.2s; }
.featured-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--primary); }
.featured-card img { width: 180px; height: 180px; object-fit: cover; border-radius: 10px; }
.featured-card b { font-size: 1.05rem; display: block; margin-bottom: 6px; color: var(--primary-dark); }
.featured-card small { display: block; color: var(--muted); margin-bottom: 12px; font-size: 0.85rem; line-height: 1.5; }
.featured-card .btn { padding: 8px 18px; font-size: 0.85rem; }
@media (max-width: 768px) { .featured-grid { grid-template-columns: 1fr; } .featured-card { grid-template-columns: 1fr; text-align: center; } .featured-card img { width: 100%; height: 200px; } }

/* Benefit cards */
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 0 36px; }
.benefit-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px 20px; text-align: center; }
.benefit-card .b-icon { width: 52px; height: 52px; margin: 0 auto 14px; background: var(--primary-light); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; }
.benefit-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--primary-dark); }
.benefit-card p { font-size: 0.85rem; color: var(--muted); margin: 0; line-height: 1.5; }
@media (max-width: 992px) { .benefit-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .benefit-grid { grid-template-columns: 1fr; } }

/* Product detail page */
.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; margin: 40px 0; }
.pd-gallery img { width: 100%; border-radius: 10px; display: block; }
.pd-info h1 { font-size: 1.65rem; margin: 0 0 12px; color: var(--primary-dark); }
.pd-short { font-size: 1.02rem; color: var(--muted); margin-bottom: 16px; }
.pd-points { list-style: none; margin: 0 0 24px; }
.pd-points li { position: relative; padding: 7px 0 7px 26px; color: var(--text); font-size: 0.95rem; }
.pd-points li::before { content: ""; position: absolute; left: 0; top: 15px; width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.pd-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.pd-cta .btn { padding: 12px 26px; }
.pd-meta { margin-top: 18px; font-size: 0.82rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 14px; }
.pd-body { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px 44px; margin-bottom: 40px; }

@media (max-width: 900px) { .product-detail { grid-template-columns: 1fr; padding: 22px; gap: 24px; } .pd-body { padding: 26px 20px; } }
@media (max-width: 768px) { .category-grid { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; margin: 0 0 22px; }
th, td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; font-size: 0.92rem; vertical-align: top; }
th { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
tr:nth-child(even) td { background: #fafbfd; }
/* Product shelf: large image cards (e-commerce grid style) */
.product-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 0 0 30px; }
/* wpautop wraps cards in <p>; make <p> transparent so <a> stays the grid child */
.product-list > p { display: contents; margin: 0; }
.product-list a { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; color: var(--text); text-decoration: none; transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s; }
.product-list a:hover { border-color: var(--primary); box-shadow: 0 10px 26px rgba(11, 48, 92, 0.14); transform: translateY(-3px); }
.product-list img { width: 100%; height: 230px; object-fit: cover; display: block; background: #f2f5f9; }
.product-list a > span { display: flex; flex-direction: column; gap: 7px; padding: 15px 16px 18px; }
.product-list b { font-weight: 600; color: var(--primary-dark); font-size: 0.98rem; line-height: 1.4; }
.product-list small { font-size: 0.84rem; color: var(--muted); font-weight: 400; line-height: 1.5; }
/* Mid-page CTA strip */
.cta-strip { background: linear-gradient(120deg, #0c335c 0%, #1b4d8f 100%); color: #fff; border-radius: 12px; padding: 30px 34px; margin: 0 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta-strip b { font-size: 1.15rem; display: block; margin-bottom: 6px; }
.cta-strip p { margin: 0; color: rgba(255,255,255,0.85); font-size: 0.94rem; }
.cta-strip .btn-primary { white-space: nowrap; }
@media (max-width: 992px) { .product-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .product-list { grid-template-columns: 1fr; } .product-list img { height: 200px; } }
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
input, textarea, select, button { font-family: inherit; }

/* =========================================================
   11. Responsive
   ========================================================= */
@media (max-width: 992px) {
  .product-grid, .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 60px 0 54px; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 48px 0; }
  .page-content, .single-post .post-content { padding: 26px 20px; }
  .menu-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; padding: 14px 20px 20px; gap: 4px; }
  .main-nav li { width: 100%; }
  .main-nav .sub-menu { position: static; display: none; box-shadow: none; padding-left: 16px; }
  .main-nav li.open > .sub-menu { display: block; }
  .main-nav a { display: block; padding: 10px 0; }
}

@media (max-width: 560px) {
  .product-grid, .trust-grid { grid-template-columns: 1fr; }
  .site-footer .footer-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; }
}

/* =========================================================
   12. Quote Request Modal
   ========================================================= */
.modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(10, 22, 40, 0.62);
	backdrop-filter: blur(2px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	z-index: 9999;
}
.modal-overlay.open { display: flex; }
body.modal-open { overflow: hidden; }
.modal-box {
	background: #fff;
	border-radius: 14px;
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 26px 26px 22px;
	position: relative;
	box-shadow: 0 24px 60px rgba(6, 20, 40, 0.35);
	animation: modal-in 0.22s ease-out;
}
@keyframes modal-in {
	from { opacity: 0; transform: translateY(14px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	color: #8a94a3;
	cursor: pointer;
	padding: 4px 8px;
}
.modal-close:hover { color: var(--primary-dark); }
.modal-box h2 { margin: 0 0 4px; color: var(--primary-dark); font-size: 1.3rem; text-align: center; }
.modal-hint { margin: 0 0 16px; color: var(--muted); font-size: 0.88rem; text-align: center; }
.modal-form .wpcf7-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px 12px;
	background: transparent;
	border: none;
	padding: 0;
}
.modal-form .wpcf7-form > p { margin: 0; grid-column: span 1; }
.modal-form .wpcf7-form > p:nth-child(5),
.modal-form .wpcf7-form > p:nth-child(6) { grid-column: 1 / -1; }
.modal-form .wpcf7-form > p:has(.wpcf7-submit) { grid-column: 1 / -1; margin-top: 4px; }
.modal-form label { display: block; font-weight: 600; font-size: 0.78rem; color: var(--text); margin-bottom: 3px; }
.modal-form input[type="text"],
.modal-form input[type="email"],
.modal-form input[type="number"],
.modal-form textarea {
	width: 100%;
	padding: 8px 11px;
	border: 1px solid var(--border);
	border-radius: 6px;
	font-size: 0.88rem;
	background: #fafbfd;
	box-sizing: border-box;
}
.modal-form input:focus, .modal-form textarea:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(27, 77, 143, 0.10);
	background: #fff;
}
.modal-form textarea { min-height: 70px; resize: vertical; }
.modal-form .wpcf7-submit {
	background: #c9302c;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 24px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	width: 100%;
	letter-spacing: 0.4px;
	transition: background 0.2s;
}
.modal-form .wpcf7-submit:hover { background: #a82424; }
.modal-form .wpcf7-not-valid-tip { font-size: 0.75rem; margin-top: 2px; }
.modal-form .wpcf7-response-output { grid-column: 1 / -1; margin: 6px 0 0; font-size: 0.85rem; border-radius: 6px; }
@media (max-width: 480px) {
	.modal-form .wpcf7-form { grid-template-columns: 1fr; }
	.modal-form .wpcf7-form > p,
	.modal-form .wpcf7-form > p:nth-child(6),
	.modal-form .wpcf7-form > p:has(.wpcf7-submit) { grid-column: 1 / -1 !important; }
	.modal-box { padding: 22px 18px 18px; }
}

/* =========================================================
   13. Blog post images
   ========================================================= */
.post-thumb { margin: 0 0 18px; }
.post-thumb img { width: 100%; max-width: 860px; border-radius: 10px; display: block; }
.post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.post-card-thumb { display: block; margin-bottom: 12px; }
.post-card-thumb img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; }
@media (max-width: 560px) {
	.post-card-thumb img { height: 170px; }
}

/* =========================================================
   14. Blog content enhancement (viox-style)
   ========================================================= */
/* Key takeaways box */
.key-takeaways { background: #E6F1FB; border-left: 4px solid #185FA5; border-radius: 0 10px 10px 0; padding: 18px 22px; margin: 0 0 28px; }
.key-takeaways b { color: #0C447C; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.4px; display: block; margin-bottom: 8px; }
.key-takeaways ul { margin: 0; padding-left: 18px; }
.key-takeaways li { font-size: 0.95rem; color: #1d3557; margin-bottom: 6px; line-height: 1.55; }
/* At-a-glance table wrapper */
.glance-table { background: #fafbfd; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin: 0 0 26px; }
.glance-table b { display: block; color: var(--primary-dark); font-size: 0.9rem; margin-bottom: 8px; }
/* Blockquote emphasis */
.post-content blockquote { border-left: 4px solid var(--accent); background: #fdf6ef; padding: 14px 20px; margin: 22px 0; font-size: 1.02rem; color: #5c3a1e; border-radius: 0 8px 8px 0; }
.post-content blockquote p { margin: 0; }
/* End-of-post CTA card */
.post-cta { background: linear-gradient(120deg, #0c335c 0%, #1b4d8f 100%); color: #fff; border-radius: 12px; padding: 28px 30px; margin: 34px 0 10px; text-align: center; }
.post-cta b { font-size: 1.15rem; display: block; margin-bottom: 6px; }
.post-cta p { color: rgba(255,255,255,0.88); font-size: 0.94rem; margin: 0 0 16px; }
.post-cta .btn { margin: 0 6px; }

/* =========================================================
   15. Blog index (VIOX-style single column)
   ========================================================= */
.blog-head { background: linear-gradient(135deg, #0c335c 0%, #1b4d8f 100%); color: #fff; padding: 46px 0 40px; margin-bottom: 36px; }
.blog-head h1 { color: #fff; font-size: 1.9rem; margin: 0 0 10px; }
.blog-head p { color: rgba(255,255,255,0.85); font-size: 0.98rem; max-width: 720px; line-height: 1.6; margin: 0; }
.blog-list { display: block; max-width: 880px; margin: 0 auto; }
.blog-item { display: flex; gap: 26px; align-items: flex-start; padding: 0 0 34px; margin: 0 0 34px; border-bottom: 1px solid var(--border); }
.blog-item:last-child { border-bottom: none; }
.blog-item-thumb { flex-shrink: 0; width: 300px; }
.blog-item-thumb img { width: 100%; height: 190px; object-fit: cover; border-radius: 10px; display: block; transition: transform 0.25s; }
.blog-item:hover .blog-item-thumb img { transform: scale(1.03); }
.blog-item-body h2 { margin: 0 0 8px; font-size: 1.22rem; line-height: 1.35; }
.blog-item-body h2 a { color: var(--primary-dark); }
.blog-item-body h2 a:hover { color: var(--accent-dark); }
.blog-item-body .post-meta { color: var(--muted); font-size: 0.85rem; margin-bottom: 10px; }
.blog-item-body .post-excerpt { color: var(--text); font-size: 0.94rem; line-height: 1.6; margin-bottom: 12px; }
@media (max-width: 768px) {
	.blog-item { flex-direction: column; gap: 14px; }
	.blog-item-thumb { width: 100%; }
	.blog-item-thumb img { height: 200px; }
	.blog-head { padding: 34px 0 28px; }
	.blog-head h1 { font-size: 1.5rem; }
}

/* =========================================================
   16. Homepage complete range tree (VIOX-style index)
   ========================================================= */
.range-tree { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin: 0 0 10px; }
.range-group { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.range-group h3 { margin: 0 0 10px; font-size: 1.02rem; }
.range-group h3 a { color: var(--primary-dark); }
.range-group h3 a:hover { color: var(--accent-dark); }
.range-group ul { margin: 0; padding: 0; list-style: none; }
.range-group li { margin-bottom: 7px; }
.range-group li:last-child { margin-bottom: 0; }
.range-group li a { color: var(--text); font-size: 0.9rem; text-decoration: none; }
.range-group li a:hover { color: var(--primary); text-decoration: underline; }
.range-group li a::before { content: "› "; color: var(--accent); font-weight: 500; }
@media (max-width: 768px) {
	.range-tree { grid-template-columns: 1fr; }
}

/* =========================================================
   17. Category page light visual upgrade (VIOX-inspired)
   ========================================================= */
/* Eyebrow label above H2 blocks */
.section-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--accent-dark);
	background: #fdf3e7;
	border: 1px solid #f0d9bd;
	border-radius: 20px;
	padding: 3px 12px;
	margin: 0 0 8px;
}
/* Spec chips (voltage / curve / capacity tags) */
.spec-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.spec-chip {
	display: inline-block;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--primary-dark);
	background: #E6F1FB;
	border: 1px solid #B5D4F4;
	border-radius: 6px;
	padding: 5px 12px;
}
/* Certification wall */
.cert-wall {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 0 0 26px;
	padding: 14px 16px;
	background: var(--surface);
	border: 1px dashed var(--border);
	border-radius: 10px;
	align-items: center;
}
.cert-wall b { font-size: 0.8rem; color: var(--muted); font-weight: 500; margin-right: 2px; }
.cert-item {
	display: inline-block;
	font-size: 0.85rem;
	font-weight: 500;
	color: #0F6E56;
	background: #E1F5EE;
	border: 1px solid #9FE1CB;
	border-radius: 6px;
	padding: 5px 12px;
}
/* Icon cards (Series We Make / Applications) */
.icon-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0 0 26px; }
.icon-card {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 10px;
	padding: 16px 18px;
}
.icon-card .ic {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.15rem;
	background: #E6F1FB;
	color: var(--primary-dark);
	border-radius: 9px;
}
.icon-card h3 { margin: 0 0 4px; font-size: 0.98rem; }
.icon-card p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
@media (max-width: 640px) {
	.icon-card-grid { grid-template-columns: 1fr; }
}
/* Blockquote-style callout already exists; keep tables consistent */

/* =========================================================
   18. Factory photo showcase (About + Projects)
   Layout tiers: .factory-feature (hero-wide) > .factory-grid
   (2x2 detail cards) > .factory-wide (full-width strip).
   ========================================================= */
   Layout tiers: .factory-feature (hero-wide) > .factory-grid
   (2x2 detail cards) > .factory-wide (full-width strip).
   ========================================================= */
.factory-feature,
.factory-wide {
	margin: 0 0 16px;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}
.factory-feature img,
.factory-wide img {
	width: 100%;
	height: 340px;
	object-fit: cover;
	display: block;
}
.factory-feature figcaption,
.factory-wide figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 26px 18px 12px;
	background: linear-gradient(180deg, rgba(8, 20, 34, 0) 0%, rgba(8, 20, 34, 0.72) 100%);
	color: #fff;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
}
.factory-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
	margin: 0 0 16px;
}
.factory-grid figure {
	margin: 0;
	border-radius: 12px;
	overflow: hidden;
	position: relative;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}
.factory-grid img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	display: block;
	transition: transform 0.35s ease;
}
.factory-grid figure:hover img {
	transform: scale(1.04);
}
.factory-grid figcaption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 22px 14px 10px;
	background: linear-gradient(180deg, rgba(8, 20, 34, 0) 0%, rgba(8, 20, 34, 0.68) 100%);
	color: #fff;
	font-size: 0.8rem;
}
.factory-wide {
	margin-bottom: 28px;
}
.factory-wide img {
	height: 260px;
}
@media (max-width: 768px) {
	.factory-feature img { height: 240px; }
	.factory-grid img { height: 160px; }
	.factory-wide img { height: 190px; }
}
@media (max-width: 480px) {
	.factory-grid { grid-template-columns: 1fr; }
	.factory-grid img { height: 220px; }
}

/* =========================================================
   19. Admin bar logo swap (Wilmall logo)
   Replace the default WordPress "W" icon on the admin bar
   with the Wilmall brand logo PNG.
   ========================================================= */
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon {
	background-image: none;
	background-color: transparent;
	width: 110px;
	height: 28px;
	display: block;
}
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::before,
#wpadminbar #wp-admin-bar-wp-logo > .ab-item .ab-icon::after { display: none !important; }
#wpadminbar #wp-admin-bar-wp-logo .ab-item img.custom-admin-bar-logo {
	height: 22px;
	width: auto;
	max-width: 100px;
	display: inline-block;
	vertical-align: middle;
	margin-top: 0;
}

