/* fiberopticattenuator.com 子页面样式 v2 —— Patti 视觉延续，亮色系精致版 */
:root {
  --accent: #0fa9c9;
  --accent-dark: #0b7f99;
  --accent-light: #e2f6fb;
  --ink: #2c3e50;
  --muted: #7a869a;
  --line: #e8edf3;
  --bg-soft: #f6f9fc;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif; color: #55606e; line-height: 1.75; font-size: 15px; background: #fff; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }

/* Header */
#header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 8px rgba(44,62,80,.05); }
.header-inner { max-width: 1170px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; }
.logo img { max-height: 52px; }
#mainnav { list-style: none; display: flex; gap: 4px; }
#mainnav > li > a { display: block; padding: 10px 16px; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: 1px; border-radius: 6px; }
#mainnav > li > a:hover, #mainnav > li.active > a { color: var(--accent); background: var(--accent-light); }
#mainnav li.has-sub { position: relative; }
#mainnav .submenu { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 250px; box-shadow: 0 12px 32px rgba(44,62,80,.14); list-style: none; border-radius: 0 0 10px 10px; overflow: hidden; border-top: 3px solid var(--accent); }
#mainnav li.has-sub:hover .submenu { display: block; }
#mainnav .submenu li a { display: block; width: 100%; box-sizing: border-box; padding: 11px 18px; color: #55606e; font-size: 13px; border-bottom: 1px solid #f2f5f9; }
#mainnav .submenu li a:hover { background: var(--bg-soft); color: var(--accent); padding-left: 24px; transition: padding .15s; }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 11px; font-size: 0; line-height: 0; color: var(--ink); background: none; border: none; cursor: pointer; position: relative; z-index: 21001; pointer-events: auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.menu-toggle::before { content: ""; display: block; width: 24px; height: 2px; background: #2c3e50; margin: 4px auto 0; box-shadow: 0 7px 0 #2c3e50, 0 14px 0 #2c3e50; }

/* Hero / page title —— 亮蓝渐变 */
.page-title { background: linear-gradient(120deg, var(--accent-dark) 0%, var(--accent) 55%, #c9e378 100%); padding: 56px 20px; text-align: center; position: relative; overflow: hidden; }
.page-title:before { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,.08); }
.page-title:after { content: ""; position: absolute; left: -60px; bottom: -100px; width: 240px; height: 240px; border-radius: 50%; background: rgba(255,255,255,.06); }
.page-title h1 { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: .3px; max-width: 1000px; margin: 0 auto; position: relative; text-shadow: 0 1px 2px rgba(0,0,0,.08); }
.page-title p.sub { color: rgba(255,255,255,.92); margin-top: 10px; font-size: 13px; letter-spacing: 2.5px; text-transform: uppercase; position: relative; }

/* Breadcrumb */
.breadcrumb { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.breadcrumb-inner { max-width: 1170px; margin: 0 auto; padding: 10px 20px; font-size: 13px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* Layout */
.container { max-width: 1170px; margin: 0 auto; padding: 54px 20px; }
.product-layout { display: grid; grid-template-columns: 430px 1fr; gap: 48px; align-items: start; }
.product-image { border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #fff; text-align: center; box-shadow: 0 4px 18px rgba(44,62,80,.06); }
.product-image img { max-height: 380px; }
h2.sec { color: var(--ink); font-size: 20px; font-weight: 700; margin: 36px 0 16px; padding-left: 14px; border-left: 4px solid var(--accent); letter-spacing: .3px; }
ul.highlights { list-style: none; margin: 12px 0; }
ul.highlights li { padding: 7px 0 7px 30px; position: relative; }
ul.highlights li:before { content: "\2713"; position: absolute; left: 0; top: 7px; width: 20px; height: 20px; line-height: 20px; text-align: center; color: #fff; background: var(--accent); border-radius: 50%; font-size: 12px; font-weight: 700; }

/* Spec table */
table.specs { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.specs th, table.specs td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
table.specs tr:last-child th, table.specs tr:last-child td { border-bottom: none; }
table.specs th { background: var(--bg-soft); color: var(--ink); width: 36%; font-weight: 600; }
table.specs tr:nth-child(even) td { background: #fbfdf6; }

/* dB chips —— 圆角胶囊 */
.db-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.db-chips a, .db-chips span.cur { border: 1px solid var(--line); padding: 5px 14px; font-size: 13px; color: #55606e; background: #fff; border-radius: 999px; transition: all .15s; }
.db-chips a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(33,150,243,.18); }
.db-chips span.cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* Category grid —— 圆角卡片 + 悬浮 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 26px; margin-top: 26px; }
.cat-card { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(44,62,80,.12); }
.cat-card .thumb { padding: 20px; text-align: center; border-bottom: 1px solid #f2f5f9; background: linear-gradient(180deg, #fbfdf6, #fff); }
.cat-card .thumb img { max-height: 170px; }
.cat-card .info { padding: 16px 18px 20px; }
.cat-card .info h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.cat-card .info h3 a { color: var(--ink); }
.cat-card .info h3 a:hover { color: var(--accent); }
.cat-card .info p { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.cat-card .info a.more { font-size: 13px; font-weight: 700; }
.cat-card .info a.more:hover { letter-spacing: .3px; }

/* Related */
.related { background: var(--bg-soft); border-top: 1px solid var(--line); }
.related .container { padding: 44px 20px; }

/* CTA —— 渐变 + 白按钮 */
.cta { background: linear-gradient(120deg, var(--accent-dark), var(--accent)); text-align: center; padding: 44px 20px; }
.cta p { color: #fff; font-size: 18px; margin-bottom: 18px; font-weight: 600; }
.cta a.btn { display: inline-block; background: #fff; color: var(--accent-dark); padding: 13px 38px; font-weight: 700; letter-spacing: 1px; font-size: 14px; border-radius: 999px; transition: transform .15s, box-shadow .15s; }
.cta a.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.18); color: var(--accent-dark); }

/* Footer */
#footer { background: #26333f; color: #93a1b0; font-size: 13px; }
.footer-inner { max-width: 1170px; margin: 0 auto; padding: 36px 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 18px; align-items: center; }
#footer a { color: #c3cedb; }
#footer a:hover { color: var(--accent); }
.footer-nav { list-style: none; display: flex; gap: 20px; flex-wrap: wrap; }

@media (max-width: 900px) {
  .product-layout { grid-template-columns: 1fr; }
  #mainnav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; box-shadow: 0 12px 24px rgba(44,62,80,.12); }
  #mainnav.open { display: flex; }
  #mainnav .submenu { position: static; box-shadow: none; border-top: none; }
  #mainnav li.has-sub:hover .submenu { display: none; }
  #mainnav li.has-sub.open .submenu { display: block; }
  .menu-toggle { display: block; }
  .page-title { padding: 40px 20px; }
  .page-title h1 { font-size: 23px; }
  .container { padding: 38px 20px; }
}

/* 触摸设备子菜单点击展开 */
@media (max-width: 900px) {
  #mainnav li.has-sub > a { cursor: pointer; }
}

/* 邮箱 COPY 按钮 */
.copy-email-btn { background: var(--accent, #0fa9c9); color: #fff; border: none; border-radius: 4px; padding: 3px 10px; font-size: 11px; letter-spacing: 1px; cursor: pointer; margin-left: 8px; vertical-align: middle; transition: background .15s; }
.copy-email-btn:hover { background: var(--accent-dark, #0b7f99); }

/* --- rich content sections --- */
.guide-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin: 16px 0; }
@media (max-width: 860px) { .guide-cols { grid-template-columns: 1fr; } }
.guide-cols h3 { color: var(--ink); font-size: 16px; margin: 0 0 10px; }
.note-box { background: var(--bg-soft); border-left: 4px solid var(--accent); border-radius: 8px; padding: 16px 20px; margin: 18px 0; font-size: 14.5px; line-height: 1.75; }
.note-box strong { color: var(--ink); }
.faq { margin: 14px 0; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.faq-item summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); background: #fff; list-style: none; position: relative; padding-right: 44px; }
.faq-item summary:after { content: "+"; position: absolute; right: 18px; top: 12px; font-size: 20px; color: var(--accent); font-weight: 700; }
.faq-item[open] summary:after { content: "\2212"; }
.faq-item summary:hover { color: var(--accent); }
.faq-item .faq-a { padding: 0 18px 16px; font-size: 14.5px; line-height: 1.75; color: #44506070; }
.faq-item .faq-a p { margin: 0; color: #55606e; }
.compare-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 14px 0; font-size: 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.compare-table th, .compare-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table thead th { background: var(--accent); color: #fff; font-weight: 600; }
.compare-table tbody th { background: var(--bg-soft); color: var(--ink); width: 26%; font-weight: 600; }
.compare-table tbody tr:nth-child(even) td { background: #fbfdf6; }


.case-media{display:flex;gap:18px;flex-wrap:wrap;margin:20px 0}
.case-img{flex:1 1 320px;margin:0}
.case-img img{width:100%;height:auto;border-radius:8px;border:1px solid #e3e9ef;background:#fff}
.case-img figcaption{font-size:13px;color:#666;margin-top:8px;text-align:center;line-height:1.4}


.product-image.gallery{background:#fff}
.gallery-main{border:1px solid #e3e9ef;border-radius:8px;overflow:hidden;background:#fff}
.gallery-main img{width:100%;height:auto;display:block}
.gallery-thumbs{display:flex;gap:10px;margin-top:10px}
.gallery-thumbs img{width:calc(25% - 7.5px);height:auto;border:1px solid #e3e9ef;border-radius:6px;cursor:pointer;opacity:.75;transition:all .15s ease}
.gallery-thumbs img:hover{opacity:1;border-color:#c9e08f}
.gallery-thumbs img.active{opacity:1;border-color:#0fa9c9;box-shadow:0 0 0 2px rgba(15,169,201,.25)}

figure.factory-img{max-width:880px;margin:18px auto}
figure.factory-img img{width:100%;height:auto;border-radius:8px;display:block}
figure.factory-img figcaption{font-size:13px;color:#777;text-align:center;margin-top:6px}

/* Related products as buttons */
.rel-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 20px; }
.rel-links a { display: inline-block; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent-light); color: var(--accent-dark); font-size: 13.5px; font-weight: 600; line-height: 1.3; transition: background .15s, color .15s, box-shadow .15s; }
.rel-links a:hover { background: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(15,169,201,.35); }

/* product card grid for collection pages */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 24px 0 32px; }
.prod-card { display: block; border: 1px solid #e5e9ee; border-radius: 10px; padding: 12px; background: #fff; transition: box-shadow .15s, transform .15s; }
.prod-card:hover { box-shadow: 0 8px 24px rgba(15,169,201,.18); transform: translateY(-2px); }
.prod-card img { width: 100%; height: auto; border-radius: 6px; display: block; }
.prod-card span { display: block; margin-top: 10px; font-size: 13px; font-weight: 600; color: #2c3e50; line-height: 1.4; }

/* PRODUCTS 下拉 16 项：两列布局 + 超高安全网（产品页/集合页共用本文件） */
#mainnav > li.has-sub .submenu { max-height: calc(100vh - 110px); overflow-y: auto; overflow-x: hidden; }
#mainnav > li:nth-child(2) .submenu { columns: 2; column-gap: 0; min-width: 460px; }
#mainnav > li:nth-child(2) .submenu li { break-inside: avoid; }
@media (max-width: 900px) {
  #mainnav > li:nth-child(2) .submenu { columns: 1; min-width: 0; max-height: none; }
}
