/*
Theme Name: DFAS Bearings
Theme URI: https://localhost/wordpress
Author: WorkBuddy
Description: 仿 dfas-sh.com 布局结构的工业轴承企业官网主题：深蓝主色调，含品牌展示、产品网格、新闻资讯、关于我们等版块。
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dfas-bearings
*/

:root {
  --primary: #0f58d6;
  --primary-dark: #0c46ab;

  --primary-light: #eef3fc;
  --accent-red: #e60012;
  --accent-gold: #e4a519;
  --text-dark: #333333;
  --text-gray: #666666;
  --text-light: #999999;
  --bg-gray: #f6f6f6;
  --border: #e5e5e5;
  --white: #ffffff;
}

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

body {
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.7;
  background: var(--white);
}

a { color: inherit; text-decoration: none; transition: all 0.25s; }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

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

/* ========== 顶部信息条 ========== */
.topbar {
  background: #093382;
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  padding: 8px 0;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar a:hover { color: #fff; }

/* ========== 页头 ========== */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 999;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-badge {
  width: 46px; height: 46px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: bold;
}
.logo-text .cn { font-size: 22px; font-weight: bold; color: var(--text-dark); letter-spacing: 1px; }
.logo-text .en { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 2px; }

.main-nav ul { display: flex; gap: 4px; }
.main-nav li a {
  display: block;
  padding: 28px 18px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
}
.main-nav li a::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.25s;
}
.main-nav li a:hover,
.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a { color: var(--primary); }
.main-nav li a:hover::after,
.main-nav li.current-menu-item > a::after,
.main-nav li.current_page_item > a::after { transform: scaleX(1); }

/* ========== Banner ========== */
.hero {
  background: linear-gradient(115deg, var(--primary-dark) 0%, var(--primary) 55%, #2f7bec 100%);
  color: #fff;
  padding: 100px 0 120px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  right: -80px; top: -80px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.hero::after {
  content: "";
  position: absolute;
  right: 140px; bottom: -140px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.hero .container { position: relative; z-index: 2; }
.hero .kicker {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 24px;
}
.hero h1 { font-size: 44px; line-height: 1.35; margin-bottom: 18px; }
.hero h1 span { color: var(--accent-gold); }
.hero p { font-size: 17px; color: rgba(255,255,255,0.85); max-width: 640px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 38px;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.25s;
}
.btn-primary { background: var(--accent-red); color: #fff; }
.btn-primary:hover { background: #c50010; color: #fff; }
.btn-outline { border: 1px solid rgba(255,255,255,0.7); color: #fff; }
.btn-outline:hover { background: #fff; color: var(--primary); }

/* ========== 版块通用 ========== */
.section { padding: 70px 0; }
.section.alt { background: var(--bg-gray); }
.section-head { text-align: center; margin-bottom: 45px; }
.section-head .en {
  font-size: 14px;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 3px;
}
.section-head h2 { font-size: 30px; margin: 6px 0 0; position: relative; display: inline-block; padding-bottom: 14px; }
.section-head h2::after {
  content: "";
  position: absolute;
  left: 50%; transform: translateX(-50%);
  bottom: 0;
  width: 44px; height: 3px;
  background: var(--primary);
}
.section-head p { color: var(--text-gray); max-width: 720px; margin: 14px auto 0; }

/* ========== 品牌展示 ========== */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 16px;
}
.brand-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 26px 14px;
  text-align: center;
  transition: all 0.3s;
}
.brand-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 22px rgba(15,88,214,0.12);
  transform: translateY(-4px);
}
.brand-card .flag { font-size: 13px; color: var(--text-light); }
.brand-card .name { font-size: 18px; font-weight: bold; color: var(--text-dark); margin-top: 4px; }
.brand-card:hover .name { color: var(--primary); }

/* ========== 产品展示 ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.product-card {
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.product-card:hover {
  box-shadow: 0 10px 26px rgba(0,0,0,0.1);
  transform: translateY(-4px);
}
.product-thumb {
  height: 190px;
  background: linear-gradient(135deg, var(--primary-light), #dfe9fa);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  font-size: 40px;
  font-weight: bold;
  overflow: hidden;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 16px 18px 20px; }
.product-info h3 { font-size: 16px; margin-bottom: 6px; line-height: 1.4; }
.product-info h3 a:hover { color: var(--primary); }
.product-info .cat { font-size: 13px; color: var(--text-light); }

/* ========== 关于我们 ========== */
.about-wrap { display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center; }
.about-text h2 { font-size: 30px; margin-bottom: 20px; }
.about-text p { color: var(--text-gray); margin-bottom: 14px; text-align: justify; }
.about-stats { display: flex; gap: 40px; margin-top: 26px; }
.about-stats .num { font-size: 34px; font-weight: bold; color: var(--primary); }
.about-stats .num em { font-style: normal; color: var(--accent-gold); }
.about-stats .label { font-size: 13px; color: var(--text-light); }
.about-visual {
  background: linear-gradient(135deg, var(--primary) 0%, #2f7bec 100%);
  border-radius: 10px;
  min-height: 320px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: flex-end;
  padding: 30px;
  color: #fff;
}
.about-visual::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.15) 0 60px, transparent 61px),
    radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1) 0 90px, transparent 91px),
    radial-gradient(circle at 60% 70%, rgba(255,255,255,0.12) 0 120px, transparent 121px);
}
.about-visual .tag { position: relative; font-size: 15px; }

/* ========== 应用领域 ========== */
.app-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.app-card {
  background: var(--white);
  border-radius: 6px;
  padding: 30px 10px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s;
}
.app-card:hover { border-color: var(--primary); transform: translateY(-4px); }
.app-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 12px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
}
.app-card .name { font-weight: bold; font-size: 15px; }

/* ========== 新闻资讯 ========== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s;
}
.news-card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.08); transform: translateY(-4px); }
.news-body { padding: 20px 22px 24px; }
.news-date { font-size: 13px; color: var(--text-light); }
.news-body h3 {
  font-size: 16px;
  margin: 8px 0 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-body h3 a:hover { color: var(--primary); }
.news-body p {
  font-size: 14px;
  color: var(--text-gray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== 页脚 ========== */
.site-footer { background: #16233b; color: rgba(255,255,255,0.75); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 17px; margin-bottom: 18px; }
.site-footer ul li { margin-bottom: 9px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ========== 内页 ========== */
 .page-banner {
  background: radial-gradient(circle at 15% 25%, rgba(255,255,255,0.12) 0%, transparent 45%), radial-gradient(circle at 85% 75%, rgba(255,255,255,0.1) 0%, transparent 45%), linear-gradient(135deg, #0a40b4 0%, #0f58d6 60%, #1e6bf2 100%) !important;
  padding: 55px 0 45px !important;
  color: #fff !important;
  text-align: center !important;
}
.page-banner h1 { font-size: 32px; }
.page-banner .crumbs { font-size: 14px; color: rgba(255,255,255,0.75); margin-top: 8px; }

.post-list { max-width: 860px; margin: 0 auto; }
.post-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 26px 30px;
  margin-bottom: 20px;
  transition: all 0.25s;
}
.post-item:hover { box-shadow: 0 8px 20px rgba(0,0,0,0.08); }
.post-item h2, .post-item h2 a { font-size: 20px; line-height: 1.5; }
.post-item h2 a:hover { color: var(--primary); }
.post-meta { font-size: 13px; color: var(--text-light); margin: 8px 0 12px; }
.post-item .excerpt { color: var(--text-gray); }

.single-content { max-width: 860px; margin: 0 auto; background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 40px 44px; }
.single-content h1 { font-size: 26px; line-height: 1.5; margin-bottom: 12px; }
.single-content .entry-content { margin-top: 24px; color: var(--text-gray); }
.single-content .entry-content p { margin-bottom: 14px; }
.single-content .entry-content h2, .single-content .entry-content h3 { color: var(--text-dark); margin: 22px 0 10px; }
.single-content img { border-radius: 4px; }

/* ========== 响应式 ========== */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .app-grid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .about-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .hero h1 { font-size: 30px; }
  .product-grid, .news-grid { grid-template-columns: 1fr; }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .about-stats { gap: 20px; }
}

/* Page content owns its own layout: remove the legacy outer card wrapper. */
body.page-id-31 .section, body.page-id-21 .section { padding-top: 0; padding-bottom: 0; }
body.page-id-31 .single-content, body.page-id-21 .single-content { max-width: none; margin: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }

/* Product card media: strict 1:1 image containers */
body.page-id-21 .dfas-card { display:flex; flex-direction:column; height:100%; }
body.page-id-21 .dfas-card-media { width:100%; aspect-ratio:1 / 1; height:auto; min-height:0; display:flex; align-items:center; justify-content:center; overflow:hidden; }
body.page-id-21 .dfas-card-media > svg,
body.page-id-21 .dfas-card-media > img { width:60%; height:60%; max-width:60%; max-height:60%; object-fit:contain; flex:0 0 auto; }
body.page-id-21 .dfas-card-body { display:flex; flex:1; flex-direction:column; }
body.page-id-21 .dfas-card-actions { margin-top:auto; }

/* Product detail refinement */
.dfas-product-page { background: #f8fafc; color: #334155; }
.dfas-product-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; box-sizing: border-box; }
.dfas-product-top { display: flex; align-items: flex-start; gap: 40px; }
.dfas-product-gallery { width: 460px; flex: 0 0 460px; }
.dfas-product-main { aspect-ratio: 1 / 1; width: 100%; border: 1px solid #e2e8f0; border-radius: 8px; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dfas-product-main img { width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .2s ease; }
.dfas-product-placeholder { color: #2563eb; font-size: 52px; font-weight: 700; }
.dfas-product-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.dfas-product-thumb { width: 60px; height: 60px; padding: 3px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.dfas-product-thumb:hover, .dfas-product-thumb.is-active { border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); transform: translateY(-1px); }
.dfas-product-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.dfas-product-info { flex: 1; min-width: 0; }
.dfas-product-info h1 { margin: 0 0 16px; color: #1e293b; font-size: 24px; line-height: 1.35; font-weight: 700; }
.dfas-spec-card { padding: 18px 24px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.dfas-spec-card h2 { margin: 0 0 14px; color: #1e3a8a; font-size: 17px; font-weight: 700; }
.dfas-spec-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.dfas-spec-item { display: grid; grid-template-columns: minmax(75px, 1fr) minmax(90px, 1.3fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid #e2e8f0; font-size: 14px; }
.dfas-spec-item:nth-last-child(-n+2) { border-bottom: 0; }
.dfas-spec-item dt { color: #64748b; }
.dfas-spec-item dd { margin: 0; color: #1e293b; font-weight: 600; }
.dfas-product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.dfas-inquiry-button, .dfas-contact-button { min-height: 46px; padding: 10px 20px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none !important; font-size: 15px; font-weight: 700; transition: all .2s ease; }
.dfas-inquiry-button { color: #fff !important; background: linear-gradient(135deg, #2563eb, #0f58d6); box-shadow: 0 5px 14px rgba(37,99,235,.2); }
.dfas-inquiry-button:hover { color: #fff !important; transform: translateY(-1px); box-shadow: 0 8px 18px rgba(37,99,235,.28); }
.dfas-contact-button { flex-direction: column; gap: 1px; color: #1d4ed8 !important; border: 1px solid #2563eb; background: #fff; line-height: 1.25; }
.dfas-contact-button span { color: #64748b; font-size: 12px; font-weight: 500; }
.dfas-contact-button:hover { color: #1d4ed8 !important; background: #eff6ff; }
.dfas-product-details { margin-top: 48px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.dfas-product-tabs { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 1px solid #e2e8f0; background: #f8fafc; }
.dfas-product-tabs button { border: 0; border-right: 1px solid #e2e8f0; padding: 15px 24px; background: transparent; color: #64748b; font: inherit; font-size: 15px; cursor: pointer; transition: all .2s ease; }
.dfas-product-tabs button:hover { color: #1d4ed8; background: #eff6ff; }
.dfas-product-tabs button.is-active { color: #fff; background: #2563eb; }
.dfas-tab-panel { padding: 28px 30px; min-height: 180px; }
.dfas-content-body { color: #475569; font-size: 15px; line-height: 1.85; }
.dfas-content-body h2, .dfas-content-body h3 { margin: 0 0 12px; color: #1e3a8a; }
.dfas-content-body p { margin: 0 0 12px; }
.dfas-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dfas-spec-table th, .dfas-spec-table td { padding: 12px 16px; border: 1px solid #e2e8f0; text-align: left; }
.dfas-spec-table th { width: 30%; color: #475569; background: #f8fafc; font-weight: 600; }
.dfas-related-products { margin-top: 42px; }
.dfas-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.dfas-section-heading h2 { margin: 0; color: #1e293b; font-size: 22px; }
.dfas-section-heading a { color: #2563eb; font-size: 14px; }
.dfas-related-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.dfas-related-card { display: block; overflow: hidden; background: #fff; border: 1px solid #e2e8f0; border-radius: 7px; color: #334155 !important; transition: box-shadow .2s ease, transform .2s ease; }
.dfas-related-card:hover { color: #1d4ed8 !important; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15,88,214,.12); }
.dfas-related-image { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #f8fafc; overflow: hidden; color: #2563eb; font-weight: 700; }
.dfas-related-image img { width: 100%; height: 100%; object-fit: contain; }
.dfas-related-card strong { display: block; padding: 12px 14px; font-size: 14px; }
.dfas-empty-related { color: #64748b; }
.dfas-inquiry-anchor { height: 1px; }
@media (max-width: 900px) { .dfas-product-top { gap: 28px; } .dfas-product-gallery { width: 42%; flex-basis: 42%; } .dfas-spec-card { padding: 16px; } .dfas-spec-item { grid-template-columns: 1fr 1fr; } }
@media (max-width: 767px) { .dfas-product-container { margin: 24px auto; padding: 0 16px; } .dfas-product-top { display: block; } .dfas-product-gallery { width: 100%; } .dfas-product-info { margin-top: 24px; } .dfas-product-info h1 { font-size: 22px; } .dfas-spec-grid { grid-template-columns: 1fr; } .dfas-spec-item:nth-last-child(-n+2) { border-bottom: 1px solid #e2e8f0; } .dfas-spec-item:last-child { border-bottom: 0; } .dfas-product-actions { display: grid; grid-template-columns: 1fr 1fr; } .dfas-inquiry-button, .dfas-contact-button { padding-left: 10px; padding-right: 10px; font-size: 14px; } .dfas-product-tabs { display: grid; grid-template-columns: 1fr; } .dfas-product-tabs button { border-right: 0; border-bottom: 1px solid #e2e8f0; text-align: left; } .dfas-product-tabs button:last-child { border-bottom: 0; } .dfas-tab-panel { padding: 22px 18px; } .dfas-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }



/* Universal Search Bar Styles */
.dfas-search-bar-wrap {
    background: #082b70 !important;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.dfas-search-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-sizing: border-box;
}
.dfas-search-label { color: #fff; display: flex; flex-direction: column; font-weight: bold; white-space: nowrap; }
.dfas-search-label span { font-size: 10px; letter-spacing: 1px; opacity: 0.8; }
.dfas-search-label strong { font-size: 16px; }
.dfas-search-inputs { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.dfas-input-group { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 140px; }
.dfas-input-group label { color: #fff; font-size: 13px; white-space: nowrap; font-weight: 500; }
.dfas-input-group input { width: 100%; height: 38px; border-radius: 20px; border: 1px solid #e2e8f0; padding: 0 14px; font-size: 13px; outline: none; background: #fff; color: #1e293b; box-sizing: border-box; }
.dfas-search-btn { height: 38px; padding: 0 24px; border-radius: 20px; background: #f59e0b; color: #1e293b; font-weight: bold; font-size: 14px; border: none; cursor: pointer; white-space: nowrap; transition: background 0.2s, transform 0.1s; }
.dfas-search-btn:hover { background: #d97706; }

/* LIST PAGE FIX */
.products-page .container,.products-results .container,.dfas-news-layout{max-width:1200px;margin:40px auto;padding:0 20px;display:flex;gap:30px;align-items:flex-start;box-sizing:border-box}.products-layout{display:flex;gap:30px;align-items:flex-start}.products-sidebar,.news-list-sidebar{width:260px;flex:0 0 260px}.products-sidebar>h2,.news-list-title{margin:0;padding:16px 20px;background:#0f58d6;color:#fff}.product-category-list,.news-list-categories{margin:0;padding:0;list-style:none;background:#fff;border:1px solid #e5e5e5}.product-category-list a,.news-list-category-link{display:block;padding:11px 16px;border-left:3px solid transparent}.product-category-list li.is-active a,.product-category-list a:hover,.news-list-category-item.is-active .news-list-category-link{background:#eff6ff;color:#0f58d6;border-left-color:#0f58d6}.products-contact,.news-list-contact{margin-top:24px;padding:20px;background:#f6f8fc;border:1px solid #e1e7f0}.products-main,.news-list-main{flex:1;min-width:0}.products-toolbar,.news-list-toolbar{display:flex;justify-content:space-between;align-items:center;padding-bottom:16px;border-bottom:2px solid #0f58d6}.product-list-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;margin-top:24px}.product-list-card{display:block;overflow:hidden;background:#fff;border:1px solid #e5e5e5}.product-list-image{aspect-ratio:1/1;padding:6px;background:#fff;overflow:hidden}.product-list-image img{width:100%;height:100%;object-fit:contain}.product-list-info{padding:14px 16px;min-height:135px}.news-list-card{margin-top:24px;background:#fff;border:1px solid #e5e5e5}.news-list-item{padding:22px 24px;border-bottom:1px solid #e5e5e5}.news-list-item:last-child{border-bottom:0}.news-list-item-excerpt{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.news-list-item-title{margin:0 0 5px;font-size:19px}.news-list-item-date{margin-bottom:6px;color:#8a96a8;font-size:12px}@media(max-width:700px){.products-layout,.dfas-news-layout{flex-direction:column}.products-sidebar,.news-list-sidebar{width:100%;flex-basis:auto}.product-list-grid{grid-template-columns:1fr}}

/* Center product card titles across homepage and product lists. */
.product-grid .product-card .product-info h3,.product-grid .product-card .product-title,.product-grid .product-card .p-card-title,.product-list-grid .product-list-card .product-list-info h2,.product-list-grid .product-list-card .product-title,.product-list-grid .product-list-card .p-card-title{text-align:center;}

.dfas-product-card h3, .p-card h3, .product-card h3, h3.product-title { text-align: center !important; }


/* Robust horizontal products grid */
.dfas-products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; box-sizing: border-box; }
.dfas-product-card { min-width: 0; }
@media (max-width: 900px) { .dfas-products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .dfas-products-grid { grid-template-columns: 1fr; } }


/* Product applications card layout */
.dfas-app-card .app-thumb-wrap, .dfas-app-thumb-wrap {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    overflow: hidden !important;
    background: #f8fafc !important;
}
.dfas-app-card img, .dfas-app-thumb-wrap img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}
.dfas-app-card p, .dfas-app-excerpt {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.6 !important;
    max-height: 3.2em !important;
    font-size: 13px !important;
    color: #64748b !important;
    margin: 0 0 16px !important;
}
.dfas-app-card a.app-btn {
    margin-top: auto !important;
}

/* Global Mobile Responsiveness Fixes */
@media (max-width: 768px) {
  .topbar { font-size: 11.5px; padding: 6px 0; }
  .topbar .container { flex-direction: column; gap: 4px; text-align: center; }
  .site-header { height: auto !important; padding: 10px 0; }
  .site-header .container { flex-direction: column; height: auto; gap: 10px; }
  .site-logo img { height: 44px !important; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 2px; }
  .main-nav li a { padding: 8px 10px; font-size: 14px; }
  .page-banner { padding: 24px 0 !important; }
  .banner-title { font-size: 20px !important; line-height: 1.3 !important; }
  .banner-subtitle { font-size: 12px !important; line-height: 1.5 !important; }
  .dfas-search-bar-wrap { padding: 12px 0; }
  .dfas-search-bar { flex-direction: column; align-items: stretch; gap: 10px; padding: 0 12px; }
  .dfas-search-label { text-align: center; }
  .dfas-search-inputs { flex-direction: column; width: 100%; gap: 8px; }
  .dfas-input-group { width: 100%; min-width: 0; }
  .dfas-search-btn { width: 100%; }
}

/* Hide secondary action button for application pages */
.dfas-app-secondary { display: none !important; }


/* High-end B2B pagination */
.dfas-pagination-wrap {
    width: 100%;
    margin: 60px 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    clear: both;
}
.dfas-pagination {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
}
.dfas-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.04);
    transition: all 0.2s ease;
    cursor: pointer;
}
.dfas-pagination a.page-numbers:hover {
    border-color: #0f58d6;
    color: #0f58d6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 88, 214, 0.15);
}
.dfas-pagination .page-numbers.current {
    background: #0f58d6;
    border-color: #0f58d6;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(15, 88, 214, 0.28);
}

/* Pagination specificity safeguard */
.dfas-pagination .page-numbers { border-width: 1px; border-style: solid; border-color: #cbd5e1; background-color: #fff; color: #1e293b; padding: 0 16px; }
.dfas-pagination .page-numbers.current { background-color: #0f58d6; border-color: #0f58d6; color: #fff; box-shadow: 0 4px 14px rgba(15, 88, 214, 0.28); }


/* Scoped important pagination overrides */
.dfas-pagination-wrap {
    width: 100% !important;
    margin: 60px 0 40px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    clear: both !important;
}
.dfas-pagination {
    display: flex !important;
    gap: 12px !important;
    align-items: center !important;
    justify-content: center !important;
}
.dfas-pagination .page-numbers, .dfas-pagination a, .dfas-pagination span.current {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 18px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #fff !important;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}
.dfas-pagination a.page-numbers:hover, .dfas-pagination a:hover {
    border-color: #0f58d6 !important;
    color: #0f58d6 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(15, 88, 214, 0.18) !important;
}
.dfas-pagination .page-numbers.current, .dfas-pagination span.current {
    background: #0f58d6 !important;
    border-color: #0f58d6 !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 14px rgba(15, 88, 214, 0.3) !important;
}


/* Final pagination verification overrides */
.dfas-pagination-wrap{width:100% !important;margin:60px 0 40px !important;display:flex !important;justify-content:center !important;align-items:center !important;clear:both !important;box-sizing:border-box !important}.dfas-pagination{display:flex !important;gap:12px !important;align-items:center !important;justify-content:center !important;flex-wrap:wrap !important}.dfas-pagination .page-numbers,.dfas-pagination a,.dfas-pagination span.current{display:inline-flex !important;align-items:center !important;justify-content:center !important;min-width:44px !important;height:44px !important;padding:0 18px !important;border-radius:8px !important;border:1px solid #cbd5e1 !important;background:#fff !important;color:#1e293b !important;text-decoration:none !important;font-size:15px !important;font-weight:600 !important;line-height:1 !important;box-shadow:0 2px 6px rgba(0,0,0,.05) !important;cursor:pointer !important}.dfas-pagination .page-numbers.current,.dfas-pagination span.current{background:#0f58d6 !important;border-color:#0f58d6 !important;color:#fff !important;font-weight:700 !important;box-shadow:0 4px 14px rgba(15,88,214,.3) !important}

/* Mobile Overflow Protection */
html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}
@media (max-width: 768px) {
    #products, .home-product-grid, .product-panel, .home-p-card, .container, .dfas-container, .dfas-wrapper, .dfas-hero-search {
        max-width: 100% !important;
        box-sizing: border-box !important;
        min-width: 0 !important;
    }
    .home-product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        width: 100% !important;
    }
}
@media (max-width: 480px) {
    .home-product-grid {
        grid-template-columns: 1fr !important;
    }
}
