/*
Theme Name: Spirax Valve
Theme URI: https://spiraxsarcovalve.com/
Author: Sino Petroleum
Description: Lightweight industrial valve theme - 5-level IA (home / products / product detail / industries / about+contact), no page builder, SEO-friendly.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: spirax-valve
Tags: business, industrial, custom-menu, custom-logo, featured-images
*/

:root {
  --primary: #0b3d6f;
  --primary-dark: #072a4d;
  --accent: #e8a020;
  --text: #222;
  --muted: #5a6572;
  --bg-light: #f4f6f8;
  --white: #fff;
  --max-width: 1180px;
}

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

body {
  font-family: "Segoe UI", Arial, "Helvetica Neue", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  background: #002d72;
  border-bottom: 1px solid rgba(255,255,255,.14);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-utility {
  background: var(--white);
  border-bottom: 1px solid #e2e6ea;
}
.header-utility .container { height: 34px; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 90px;
}
.logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
}
.logo span { color: var(--accent); }
.main-nav { position: relative; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; align-items: center; gap: 26px; }
.main-nav > ul > li { position: relative; }
.main-nav a {
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
}
.main-nav > ul > li > a:hover, .main-nav a:hover { color: #43bccf; }
.caret { font-size: 10px; margin-left: 3px; }
.mega-menu {
  position: absolute;
  left: 0;
  top: 100%;
  width: 920px;
  max-width: calc(100vw - 40px);
  background: var(--white);
  border: 1px solid #e2e6ea;
  border-radius: 6px;
  box-shadow: 0 14px 32px rgba(11,61,111,.16);
  padding: 22px 26px;
  display: none;
  z-index: 300;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 28px;
}
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu { display: grid; }
.mega-col h4 { font-size: 14px; margin-bottom: 8px; }
.mega-col h4 a { color: var(--primary); font-weight: 700; }
.mega-col ul { display: block; }
.mega-col ul li { margin-bottom: 5px; line-height: 1.35; }
.mega-col ul li a { font-size: 13px; color: var(--muted); font-weight: 400; }
.mega-col ul li a:hover { color: var(--accent); }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255,255,255,.6);
  color: #fff;
  border-radius: 4px;
  padding: 8px 10px;
  cursor: pointer;
}

.btn, .btn:visited {
  display: inline-block;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.2;
}
.btn:hover { background: #cf8c14; color: #fff; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(rgba(7,42,77,.88), rgba(7,42,77,.88)), url(https://www.spiraxvalve.com/images/home-hero.jpg) center center no-repeat;
  background-size: cover;
  background-color: var(--primary-dark);
  color: #fff;
  padding: 104px 0;
  text-align: center;
}
.hero h1 { font-size: 42px; line-height: 1.25; margin-bottom: 16px; max-width: 860px; margin-left: auto; margin-right: auto; }
.hero p { font-size: 18px; color: #cfd8e3; max-width: 720px; margin: 0 auto 32px; }
.hero .btn { margin: 0 8px; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-light); }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 32px; color: var(--primary); line-height: 1.3; }
.section-title p { color: var(--muted); margin-top: 10px; max-width: 680px; margin-left: auto; margin-right: auto; }
.section-title.left { text-align: left; }
.section-title.left p { margin-left: 0; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 26px;
}
.product-card {
  background: var(--white);
  border: 1px solid #e2e6ea;
  border-radius: 6px;
  overflow: hidden;
  transition: box-shadow .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { box-shadow: 0 8px 24px rgba(11,61,111,.12); }
.product-thumb {
  height: 190px;
  background: linear-gradient(135deg, #e6ecf3, #d5dfe9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7d8b9a;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 1px;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .card-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 6px; }
.product-card p { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.product-card a.more { color: var(--accent); font-weight: 700; text-decoration: none; font-size: 14px; margin-top: auto; }

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}
.feature {
  background: var(--white);
  padding: 28px;
  border-radius: 6px;
  border-top: 4px solid var(--accent);
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
}
.feature h3 { font-size: 18px; margin-bottom: 8px; color: var(--primary); }
.feature p { font-size: 14px; color: var(--muted); }

/* ---------- Spec table ---------- */
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); }
.spec-table th, .spec-table td {
  border: 1px solid #dde3e8;
  padding: 12px 16px;
  text-align: left;
  font-size: 15px;
}
.spec-table th { background: var(--primary); color: #fff; font-weight: 600; }
.spec-table tr:nth-child(even) td { background: var(--bg-light); }

/* ---------- Breadcrumb & product detail ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); margin: 24px 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.product-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.product-detail .image-box {
  background: linear-gradient(135deg, #e6ecf3, #d5dfe9);
  border-radius: 6px;
  min-height: 380px;
  display: flex; align-items: center; justify-content: center;
  color: #7d8b9a; font-size: 15px; padding: 16px; text-align: center;
}
.product-detail .image-box img { border-radius: 6px; }
.product-detail h1 { font-size: 30px; color: var(--primary); margin-bottom: 14px; line-height: 1.3; }
.product-detail ul.points { margin: 16px 0 24px 18px; }
.product-detail ul.points li { margin-bottom: 8px; }

/* ---------- Contact ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.contact-form label { display: block; font-weight: 600; margin: 14px 0 6px; font-size: 14px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 12px; border: 1px solid #ccd4db; border-radius: 4px; font-size: 15px;
  font-family: inherit;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.form-note { margin-top: 14px; padding: 12px 14px; border-radius: 6px; font-size: 14px; }
.form-note.ok { background: #e8f6ec; color: #1a7f37; border: 1px solid #bfe3cb; }
.form-note.err { background: #fdecec; color: #b42318; border: 1px solid #f3c6c6; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 56px 0;
}
.cta-band h2 { font-size: 28px; margin-bottom: 10px; }
.cta-band p { color: #cfd8e3; margin-bottom: 24px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary-dark); color: #b9c4d1; padding: 48px 0 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; margin-bottom: 12px; font-size: 16px; }
.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: #b9c4d1; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 32px; padding-top: 18px; text-align: center; font-size: 13px; }

/* ---------- Blog / resources ---------- */
.post-list { display: grid; gap: 22px; }
.post-item { border: 1px solid #e2e6ea; border-radius: 6px; padding: 20px 22px; }
.post-item h3 { font-size: 19px; color: var(--primary); margin-bottom: 6px; }
.post-item h3 a { text-decoration: none; }
.post-item .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.entry-content { max-width: 860px; }
.entry-content h2, .entry-content h3 { color: var(--primary); margin: 26px 0 10px; }
.entry-content p, .entry-content ul, .entry-content ol { margin-bottom: 14px; }
.entry-content ul, .entry-content ol { padding-left: 22px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.entry-content th, .entry-content td { border: 1px solid #dde3e8; padding: 10px 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; padding: 10px 20px; }
  .main-nav { order: 3; width: 100%; display: none; }
  .main-nav.open { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-top: 1px solid rgba(255,255,255,.15); }
  .main-nav > ul > li > a { display: block; padding: 12px 0; }
  .mega-menu { position: static; width: 100%; max-width: none; border: none; box-shadow: none; border-radius: 0; padding: 0 0 8px 14px; grid-template-columns: 1fr 1fr; gap: 10px 18px; }
  .main-nav.open .mega-menu { display: grid; }
  .menu-toggle { display: block; margin-left: auto; }
  .header-inner > .btn { display: none; }
  .hero { padding: 64px 0; }
  .hero .btn { margin: 0 4px 10px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .section { padding: 48px 0; }
  .section-title h2 { font-size: 26px; }
  .product-detail, .contact-wrap { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-header .header-inner { padding-left: 0; }

/* ---------- Spotlight ---------- */
.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.spotlight-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid #e2e6ea;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: box-shadow .2s, transform .2s;
}
.spotlight-card:hover { box-shadow: 0 10px 28px rgba(11,61,111,.14); transform: translateY(-3px); }
.spotlight-img {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: #d5dfe9;
}
.spotlight-body { padding: 18px 20px 22px; }
.spotlight-body h3 { font-size: 17px; color: var(--primary); margin-bottom: 8px; line-height: 1.35; }
.spotlight-body p { font-size: 14px; color: var(--muted); }

/* ---------- Industry cards ---------- */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}
.industry-card {
  position: relative;
  display: block;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.industry-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: var(--primary-dark);
  transition: transform .3s;
}
.industry-card:hover .industry-img { transform: scale(1.04); }
.industry-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 14px 18px;
  background: linear-gradient(to top, rgba(7,42,77,.92), rgba(7,42,77,0));
}
.industry-body h3 { font-size: 17px; line-height: 1.3; }

/* ---------- Button row ---------- */
.button-row { text-align: center; margin-top: 34px; }
.button-row .btn { margin: 0 8px; }
.btn.btn-ghost { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn.btn-ghost:hover { background: var(--primary); color: #fff; }

/* ---------- Responsive additions ---------- */
@media (max-width: 860px) {
  .button-row .btn { display: inline-block; margin: 4px; }
}