/* ============================================================
   鑫元钢管 Xinyuan Steel Pipe — 工业稳重风 1:1 还原
   配色：深海军蓝 #163850 / 橙色 #FF7A00 / 卡片灰蓝 #1A2B3C
   ============================================================ */

:root {
  --navy:       #163850;
  --navy-dark:  #0D1B2A;
  --navy-footer:#0A1520;
  --card-bg:    #1A2B3C;
  --orange:     #FF7A00;
  --orange-dark:#E06900;
  --white:      #FFFFFF;
  --gray-light: rgba(255,255,255,0.6);
  --gray-mid:   rgba(255,255,255,0.35);
  --font-heading: 'Montserrat', 'Arial Black', sans-serif;
  --font-body:    'Roboto', 'Open Sans', sans-serif;
  --radius: 4px;
}

*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }

body {
  font-family: var(--font-body);
  font-size: 15px; line-height: 1.6;
  color: var(--white);
  background: var(--navy-dark);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration:none; color:inherit; }
img { max-width:100%; height:auto; display:block; }
.container { max-width:1240px; margin:0 auto; padding:0 24px; }

/* ── TOP BAR ─────────────────────────── */
.top-bar {
  background: #0D1B2A;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  height: 40px;
}
.top-bar-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  height: 100%; padding: 0 24px;
}
.top-bar-left, .top-bar-right { display: flex; gap: 24px; align-items: center; }
.top-bar-item { display: flex; align-items: center; gap: 6px; color: var(--gray-light); }
.top-bar-item svg { flex-shrink: 0; }
.callout-text { color: var(--orange); font-weight: 600; }

/* ── HEADER ──────────────────────────── */
.site-header {
  background: var(--navy);
  height: 64px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.header-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center;
  height: 100%; padding: 0 24px;
}
.header-logo {
  display: flex; align-items: center; gap: 10px;
  margin-right: 40px; flex-shrink: 0;
}
.logo-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
}
.logo-icon img { width: 40px; height: 40px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-main { font-family: var(--font-heading); font-weight: 800; font-size: 16px; color: var(--white); }
.logo-sub { font-family: var(--font-heading); font-weight: 500; font-size: 10px; color: var(--gray-light); letter-spacing: 1px; }

/* Nav */
.nav-menu { display: flex; gap: 28px; flex: 1; }
.nav-menu a {
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 500; color: var(--gray-light);
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: color 0.2s;
}
.nav-menu a:hover, .nav-menu a.active { color: var(--orange); }
.nav-search { margin-left: auto; }

.lang-switch {
  margin-left: 20px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--white); font-family: var(--font-heading);
  font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius);
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  transition: background 0.2s;
}
.lang-switch:hover { background: rgba(255,255,255,0.15); }

/* ── HERO ────────────────────────────── */
.hero-section {
  position: relative;
  min-height: 520px;
  background: url('../images/hero-bg.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
}
.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(22,56,80,0.55);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 700px; padding: 0 24px;
}
.hero-subtitle {
  font-family: 'Great Vibes', cursive;
  font-size: 24px; color: var(--white); opacity: 0.85;
  margin-bottom: 8px;
}
.hero-title {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 48px; line-height: 1.15;
  color: var(--white); margin-bottom: 16px;
}
.hero-desc {
  font-family: var(--font-body); font-size: 14px;
  color: rgba(255,255,255,0.65); margin-bottom: 32px;
}
.hero-cta-group { display: flex; gap: 0; justify-content: center; align-items: stretch; }
.btn-cta-orange {
  display: inline-flex; align-items: center;
  padding: 14px 40px;
  background: var(--orange); color: var(--white);
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-cta-orange:hover { background: var(--orange-dark); }
.btn-search-dark {
  display: flex; align-items: center; justify-content: center;
  width: 48px;
  background: rgba(0,0,0,0.4); border: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background 0.2s;
}
.btn-search-dark:hover { background: rgba(0,0,0,0.6); }

/* ── FEATURE CARDS ───────────────────── */
.feature-cards-section {
  background: var(--navy-dark);
  padding: 64px 0;
}
.feature-cards-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; padding: 0 24px;
}
.feature-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 36px 28px;
  display: flex; flex-direction: column;
  border-top: 3px solid var(--orange);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.feature-card-icon {
  width: 56px; height: 56px;
  background: rgba(255,122,0,0.1);
  border: 1px solid rgba(255,122,0,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.feature-card-icon svg { stroke: var(--orange); }
.feature-card-title {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 16px; color: var(--white);
  margin-bottom: 12px; line-height: 1.4;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.feature-card-body {
  font-family: var(--font-body); font-size: 13px;
  color: rgba(255,255,255,0.5); line-height: 1.7;
  margin-bottom: 24px; flex: 1;
}
.btn-card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-heading); font-weight: 600; font-size: 12px;
  border-radius: var(--radius);
  text-transform: uppercase; letter-spacing: 0.5px;
  align-self: flex-start;
  transition: background 0.2s, color 0.2s;
}
.btn-card-cta:hover { background: var(--orange); color: var(--white); }
.feature-card-icons {
  display: flex; gap: 10px; margin-top: 16px;
  opacity: 0.5;
}

/* ── CTA STRIP ───────────────────────── */
.cta-strip {
  background: var(--orange);
  padding: 32px 0;
  text-align: center;
}
.cta-strip-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
}
.cta-strip-text {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 20px; color: var(--white); text-transform: uppercase;
}
.cta-strip-desc {
  font-family: var(--font-body); font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.btn-cta-inverse {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 32px;
  background: var(--white); color: var(--orange);
  font-family: var(--font-heading); font-weight: 700; font-size: 14px;
  border-radius: var(--radius);
  text-transform: uppercase;
  transition: background 0.2s;
}
.btn-cta-inverse:hover { background: #f2f2f2; }

/* ── FOOTER ──────────────────────────── */
.site-footer {
  background: var(--navy-footer);
  padding: 56px 0 0 0;
}
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px; padding: 0 24px 40px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.footer-col h4 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 14px; color: var(--white); margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.footer-col p, .footer-col a {
  font-family: var(--font-body); font-size: 13px;
  color: rgba(255,255,255,0.45); line-height: 1.8;
  display: block;
}
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  max-width: 1240px; margin: 0 auto;
  padding: 16px 24px;
  text-align: center;
  font-size: 12px; color: rgba(255,255,255,0.25);
}

/* ── PAGE HERO ───────────────────────── */
.page-hero {
  background: var(--navy);
  padding: 72px 0; text-align: center;
}
.page-hero h1 {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 40px; color: var(--white); margin-bottom: 12px;
}
.page-hero p {
  font-family: var(--font-body); font-size: 15px;
  color: var(--gray-light); max-width: 600px; margin: 0 auto;
}

/* ── PRODUCTS GRID ───────────────────── */
.products-section {
  background: var(--navy-dark);
  padding: 64px 0;
}
.products-sidebar {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 24px; position: sticky; top: 80px;
}
.products-sidebar h3 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 16px; color: var(--orange); margin-bottom: 16px;
  text-transform: uppercase;
}
.products-sidebar a {
  display: block; padding: 10px 12px;
  font-family: var(--font-heading); font-size: 12px;
  color: var(--gray-light); text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.products-sidebar a:hover, .products-sidebar a.active {
  color: var(--white); border-left-color: var(--orange);
}
.product-card {
  background: var(--card-bg); border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.product-card-img {
  height: 200px; background: #111D2A;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img svg { opacity: 0.3; }
.product-card-info {
  padding: 20px;
}
.product-card-info h3 {
  font-family: var(--font-heading); font-weight: 700;
  font-size: 16px; color: var(--white); margin-bottom: 8px;
}
.product-card-info .specs {
  font-family: var(--font-body); font-size: 12px;
  color: var(--gray-light); line-height: 1.6;
}
.product-card-info .rating {
  display: flex; align-items: center; gap: 4px; margin-top: 10px;
}
.product-card-info .rating span { color: var(--orange); font-size: 14px; }
.product-card-info .rating .count {
  font-family: var(--font-heading); font-size: 18px; font-weight: 700;
  color: var(--white); margin-left: auto;
}

/* ── ABOUT ───────────────────────────── */
.about-section { background: #fff; color: #333; padding: 72px 0; }
.about-section h2 {
  font-family: var(--font-heading); font-weight: 700; font-size: 32px; color: #222;
}
.about-section .accent-line { width: 60px; height: 3px; background: var(--orange); margin: 16px 0 24px 0; }
.about-section p {
  font-family: var(--font-body); font-size: 15px; color: #555; line-height: 1.8;
}
.stat-box { border-left: 3px solid var(--orange); padding-left: 16px; }
.stat-num { font-family: var(--font-heading); font-weight: 800; font-size: 28px; color: var(--navy); }
.stat-label { font-family: var(--font-body); font-size: 13px; color: #888; }
.cert-card {
  border: 1px solid #E0E0E0; border-radius: var(--radius);
  padding: 28px 16px; text-align: center;
}
.cert-card .cert-name {
  font-family: var(--font-heading); font-weight: 700; font-size: 16px; color: var(--navy);
}
.cert-card .cert-sub { font-family: var(--font-body); font-size: 12px; color: #999; margin-top: 6px; }

/* ── CONTACT ─────────────────────────── */
.contact-section { background: #fff; color: #333; padding: 72px 0; }
.contact-section h2 {
  font-family: var(--font-heading); font-weight: 700; font-size: 28px; color: #222;
}
.contact-section .accent-line { width: 60px; height: 3px; background: var(--orange); margin: 12px 0 28px 0; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px;
  border: 1px solid #D0D0D0; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 14px; color: #333;
  outline: none; transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  border-color: var(--orange);
}
.contact-form label {
  display: block; font-family: var(--font-heading); font-size: 12px;
  font-weight: 600; color: #444; margin-bottom: 6px; text-transform: uppercase;
}
.btn-submit {
  padding: 13px 40px;
  background: var(--orange); color: var(--white);
  font-family: var(--font-heading); font-weight: 700; font-size: 15px;
  border: none; border-radius: var(--radius); cursor: pointer;
  transition: background 0.2s; align-self: flex-start;
}
.btn-submit:hover { background: var(--orange-dark); }

.contact-info-item {
  display: flex; gap: 16px; align-items: flex-start;
}
.contact-info-icon {
  width: 44px; height: 44px;
  background: #F5F7FA; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.contact-info-icon svg { stroke: var(--orange); }
.contact-info-text h4 {
  font-family: var(--font-heading); font-weight: 600;
  font-size: 15px; color: #222; margin-bottom: 4px;
}
.contact-info-text p {
  font-family: var(--font-body); font-size: 13px; color: #666; line-height: 1.6;
}

/* ── RESPONSIVE ──────────────────────── */
@media (max-width: 900px) {
  .feature-cards-inner { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-menu { display: none; }
  .hero-title { font-size: 32px; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .top-bar-inner { flex-direction: column; gap: 4px; padding: 8px 16px; }
  .cta-strip-inner { flex-direction: column; gap: 16px; text-align: center; }
}

/* ── Lang Dropdown ────────────────────── */
.lang-switch {
  position: relative; cursor: pointer;
  padding: 6px 12px; border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px; background: transparent; color: var(--white);
  font-family: var(--font-heading); font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: border-color 0.2s;
}
.lang-switch:hover { border-color: var(--orange); }
.lang-dropdown {
  display: none; position: absolute; top: 100%; right: 0;
  margin-top: 6px; background: var(--white); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12); min-width: 140px;
  z-index: 999; overflow: hidden;
}
.lang-dropdown.open { display: block; }
.lang-option {
  padding: 10px 16px; font-family: var(--font-heading); font-size: 13px;
  color: #333; cursor: pointer; transition: background 0.15s;
}
.lang-option:hover { background: #F5F7FA; color: var(--orange); }

/* ── WhatsApp Float ───────────────────── */
.wa-float {
  position: fixed; bottom: 28px; right: 28px; width: 56px; height: 56px;
  border-radius: 50%; background: #25D366; display: flex;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.4); z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.wa-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37,211,102,0.55);
}

/* ── Form Toast ───────────────────────── */
#form-toast {
  position: fixed; top: 20px; right: 20px; padding: 16px 24px;
  border-radius: 4px; color: #fff; font-size: 14px; z-index: 9999;
  opacity: 0; transform: translateY(-10px);
  transition: all 0.3s ease; pointer-events: none;
  max-width: 360px; line-height: 1.6;
}

/* ── RTL (Arabic) ────────────────────── */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[dir="rtl"] .top-bar-left { flex-direction: row-reverse; }
html[dir="rtl"] .header-inner { flex-direction: row-reverse; }
html[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
html[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
html[dir="rtl"] .hero-cta-group { justify-content: flex-end; }
html[dir="rtl"] .footer-inner { direction: rtl; }
html[dir="rtl"] .btn-cta-inverse svg { transform: rotate(180deg); }
html[dir="rtl"] .wa-float { right: auto; left: 28px; }

/* ── Extra Responsive ─────────────────── */
@media (max-width: 900px) {
  .container[style*="grid-template-columns: 240px 1fr"],
  .contact-section .container[style*="1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ============================================================
   NEW PRODUCT CATALOG PAGE STYLES (v2)
   ============================================================ */

/* ── Product Catalog Layout ──────────── */
.product-catalog { display: flex; flex-direction: column; gap: 56px; }

/* ── Category Section ───────────────── */
.product-category { scroll-margin-top: 80px; }
.cat-header { margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid rgba(255,122,0,0.25); }
.cat-title {
  font-family: var(--font-heading); font-weight: 800; font-size: 22px;
  color: var(--white); text-transform: uppercase; letter-spacing: 0.5px;
}
.cat-subtitle {
  font-family: var(--font-body); font-size: 13px; color: var(--gray-light);
  margin-top: 6px; line-height: 1.6;
}

/* ── Head Images Grid ───────────────── */
.head-images-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px; margin-bottom: 24px;
}
.head-img-item {
  aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius);
  background: #111D2A; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.head-img-item:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.head-img-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Specs Panel ────────────────────── */
.specs-panel {
  background: var(--card-bg); border-radius: var(--radius);
  padding: 24px; margin-bottom: 24px;
}
.specs-panel h4 {
  font-family: var(--font-heading); font-weight: 700; font-size: 14px;
  color: var(--orange); text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.specs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.spec-item {
  display: flex; flex-direction: column; gap: 4px;
}
.spec-label {
  font-family: var(--font-heading); font-size: 10px; font-weight: 600;
  color: var(--gray-mid); text-transform: uppercase; letter-spacing: 0.5px;
}
.spec-value {
  font-family: var(--font-heading); font-size: 13px; font-weight: 600;
  color: var(--white); line-height: 1.4;
}

/* ── Detail Images Grid ─────────────── */
.detail-images-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}
.detail-img-item {
  aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius);
  background: #111D2A; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.detail-img-item:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.detail-img-item img { width: 100%; height: 100%; object-fit: cover; }

/* ── Lightbox ────────────────────────── */
.img-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s;
}
.img-lightbox.open { opacity: 1; pointer-events: auto; }
.img-lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 2px; }
.lightbox-close {
  position: absolute; top: 20px; right: 28px;
  font-size: 36px; color: rgba(255,255,255,0.7); cursor: pointer;
  line-height: 1; transition: color 0.2s;
}
.lightbox-close:hover { color: var(--white); }

/* ── Responsive Product Catalog ──────── */
@media (max-width: 900px) {
  .specs-grid { grid-template-columns: repeat(2, 1fr); }
  .head-images-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .detail-images-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cat-title { font-size: 18px; }
}
@media (max-width: 600px) {
  .specs-grid { grid-template-columns: 1fr; }
  .products-sidebar { position: static; margin-bottom: 24px; }
}
