/*
Theme Name: GSS Engineering Excellence
Description: Shared stylesheet for all GSS product pages
Version: 2.0
*/

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Helvetica Neue', 'Arial', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: #222; line-height: 1.6; background: #fff;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
.site-header {
  background: #0f1c60; display: flex; align-items: center;
  justify-content: space-between; padding: 0 40px; height: 90px;
  position: relative; z-index: 100;
}
.header-logo { width: 140px; height: 100%; display: flex; align-items: center; overflow: hidden; }
.header-logo a { display: block; width: 100%; height: 100%; }
.header-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a {
  color: #fff; text-decoration: none; font-size: 0.8rem; font-weight: bold;
  letter-spacing: 0.5px; text-transform: capitalize; transition: color 0.3s;
}
.main-nav a:hover { color: #00B0F0; }
.main-nav .nav-item { position: relative; }
.main-nav .dropdown {
  display: none; position: absolute; top: 100%; left: 0; background: #fff;
  min-width: 200px; border-radius: 4px; box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 200; padding: 8px 0;
}
.main-nav .nav-item:hover .dropdown { display: block; }
.main-nav .dropdown a {
  display: block; padding: 10px 20px; color: #333 !important;
  font-size: 0.82rem; font-weight: 500; white-space: nowrap;
}
.main-nav .dropdown a:hover { background: #f0f7fb; color: #00B0F0 !important; }

.btn-get-in-touch {
  background: transparent; color: #fff; border: 1.5px solid #a0d8ef;
  padding: 8px 22px; font-size: 0.8rem; font-weight: bold;
  cursor: pointer; text-decoration: none; letter-spacing: 0.5px; transition: all 0.3s;
}
.btn-get-in-touch:hover { background: #a0d8ef; color: #0f1c60; }

.mobile-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 5px; }
.mobile-toggle span { display: block; width: 26px; height: 2px; background: #fff; transition: all 0.3s; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: #f5f0e8; padding: 12px 40px; font-size: 0.75rem; color: #999; letter-spacing: 0.5px;
}
.breadcrumb a { color: #0f1c60; text-decoration: none; font-weight: 600; }
.breadcrumb a:hover { color: #00B0F0; }
.breadcrumb span { margin: 0 4px; color: #ccc; }

/* ===== PRODUCT DETAIL HERO ===== */
.detail-hero { display: flex; min-height: 480px; }
.detail-hero-img { width: 50%; overflow: hidden; padding-left: 50px; }
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-hero-text {
  width: 50%; display: flex; flex-direction: column; justify-content: center;
  padding: 50px 50px; background: #fff;
}
.detail-hero-text .label {
  font-size: 0.7rem; letter-spacing: 3px; text-transform: uppercase;
  color: #00B0F0; margin-bottom: 10px; font-weight: bold;
}
.detail-hero-text h1 {
  font-size: 2rem; font-weight: bold; color: #0b144b; line-height: 1.2; margin-bottom: 16px;
}
.detail-hero-text p { font-size: 0.9rem; color: #666; line-height: 1.7; }

/* ===== TECH TABLE ===== */
.tech-table { width: 100%; border-collapse: collapse; }
.tech-table th, .tech-table td { padding: 14px 20px; text-align: left; font-size: 0.85rem; }
.tech-table th {
  background: #0f1c60; color: #fff; font-weight: bold;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.tech-table td { border-bottom: 1px solid #e8e8e8; color: #555; }
.tech-table tr:nth-child(even) td { background: #fafbfc; }
.tech-table tr:hover td { background: #f0f7fb; }

/* ===== CTA BAR ===== */
.cta-bar { background: #0f1c60; padding: 50px 40px; text-align: center; color: #fff; }
.cta-bar h2 { font-size: 1.6rem; margin-bottom: 10px; }
.cta-bar p { font-size: 0.9rem; color: #c0d8f0; margin-bottom: 24px; }
.cta-bar .btns { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.cta-bar .btn-primary {
  display: inline-block; padding: 13px 30px; background: #00B0F0; color: #fff;
  text-decoration: none; font-weight: bold; font-size: 0.85rem; letter-spacing: 0.5px;
  border-radius: 4px; transition: background 0.3s;
}
.cta-bar .btn-primary:hover { background: #0099d6; }
.cta-bar .btn-outline {
  display: inline-block; padding: 13px 30px; background: transparent; color: #fff;
  text-decoration: none; font-weight: bold; font-size: 0.85rem; letter-spacing: 0.5px;
  border: 2px solid #fff; border-radius: 4px; transition: all 0.3s;
}
.cta-bar .btn-outline:hover { background: #fff; color: #0f1c60; }
.back-link {
  display: inline-block; margin-top: 20px; color: #a0d8ef;
  text-decoration: none; font-size: 0.8rem; transition: color 0.3s;
}
.back-link:hover { color: #fff; }

/* ===== RELATED PRODUCTS ===== */
.related-wrap {
  display: flex; gap: 40px; max-width: 1200px; margin: 0 auto;
  padding: 50px 40px; background: #f9fafb;
}
.related-left { width: 260px; flex-shrink: 0; }
.related-left h3 { font-size: 1.4rem; font-weight: bold; color: #0b144b; margin-bottom: 10px; }
.related-left .desc { font-size: 0.82rem; color: #777; line-height: 1.6; margin-bottom: 20px; }
.related-left .btn-all {
  display: inline-block; padding: 10px 22px; background: #0f1c60; color: #fff;
  text-decoration: none; font-weight: bold; font-size: 0.8rem; letter-spacing: 0.5px;
  border-radius: 4px; transition: background 0.3s; margin-bottom: 18px;
}
.related-left .btn-all:hover { background: #00B0F0; }
.related-arrows { display: flex; gap: 10px; }
.related-arrows span {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 1.5px solid #0f1c60; color: #0f1c60;
  font-size: 1.2rem; cursor: pointer; user-select: none; border-radius: 4px; transition: all 0.3s;
}
.related-arrows span:hover { background: #0f1c60; color: #fff; }
.related-right { flex: 1; overflow: hidden; position: relative; }
.related-right::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0;
  width: 60px; background: linear-gradient(to right, transparent, #f9fafb);
  z-index: 2; pointer-events: none;
}
.related-cards {
  display: flex; gap: 16px; overflow-x: auto; scroll-behavior: smooth;
  padding: 4px 10px 10px 4px; cursor: grab;
  -ms-overflow-style: none; scrollbar-width: none;
}
.related-cards::-webkit-scrollbar { display: none; }
.related-cards.dragging { cursor: grabbing; scroll-behavior: auto; }
.related-card {
  flex: 0 0 230px; background: #fff; border-radius: 6px; overflow: hidden;
  text-decoration: none; border: 1px solid #e8e8e8;
  transition: box-shadow 0.3s, transform 0.3s;
}
.related-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.1); transform: translateY(-2px); }
.related-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.related-card-body {
  padding: 12px 14px 10px; display: flex; align-items: center; justify-content: space-between;
}
.related-card-body .pname { font-size: 0.78rem; font-weight: 600; color: #222; line-height: 1.3; flex: 1; }
.related-card-body .pname sup { font-size: 0.55rem; color: #999; }
.related-card-body .arrow {
  color: #0f1c60; font-size: 0.9rem; flex-shrink: 0;
  margin-left: 8px; transition: color 0.3s;
}
.related-card:hover .arrow { color: #00B0F0; }

/* ===== FOOTER ===== */
.site-footer { background: #f3f4f6; padding: 50px 40px 30px; }
.footer-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px;
  max-width: 1200px; margin: 0 auto;
}
.footer-col { text-align: left; }
.footer-col h4 {
  font-size: 0.85rem; font-weight: bold; color: #222;
  margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px;
}
.footer-col p, .footer-col a {
  display: block; font-size: 0.82rem; color: #555;
  text-decoration: none; line-height: 2; transition: color 0.3s;
}
.footer-col a:hover { color: #00B0F0; }
.subscribe-row { display: flex; gap: 0; margin-top: 4px; }
.subscribe-row input[type="email"] {
  flex: 1; padding: 10px 14px; border: 1px solid #ddd;
  font-size: 0.85rem; outline: none; background: #fff;
}
.subscribe-row input[type="email"]:focus { border-color: #00B0F0; }
.subscribe-row .btn-subscribe {
  padding: 10px 20px; background: #80d4f5; color: #fff; font-size: 0.85rem;
  font-weight: bold; border: none; cursor: pointer; text-decoration: none;
  white-space: nowrap; transition: background 0.3s;
}
.subscribe-row .btn-subscribe:hover { background: #00B0F0; }
.footer-bottom { background: #e8eaed; padding: 18px 40px; border-top: 2px solid #ddd; }
.footer-bottom-inner {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; flex-wrap: wrap; gap: 14px;
}
.footer-bottom-text { display: flex; gap: 32px; font-size: 0.78rem; color: #777; }
.footer-bottom-text a { color: #777; text-decoration: none; transition: color 0.3s; }
.footer-bottom-text a:hover { color: #00B0F0; }
.footer-social { display: flex; gap: 14px; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; background: #555; color: #fff;
  text-decoration: none; font-size: 0.95rem; font-weight: bold; transition: background 0.3s;
}
.footer-social a:hover { background: #00B0F0; }

/* ===== PRODUCT GRID (分类页) ===== */
.product-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; padding: 20px 40px 30px; max-width: 1200px; margin: 0 auto;
}
.product-card {
  background: #fff; border: 1px solid #e8e8e8; border-radius: 6px;
  overflow: hidden; transition: box-shadow 0.3s, transform 0.3s;
}
.product-card:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.12); transform: translateY(-3px); }
.product-card-img { width: 100%; height: 220px; overflow: hidden; }
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-body { padding: 20px 22px 24px; }
.product-card-body h3 {
  font-size: 1rem; font-weight: bold; color: #0b144b; margin-bottom: 6px; line-height: 1.3;
}
.product-card-body .model-code {
  display: inline-block; background: #eef5fb; color: #0f1c60;
  padding: 3px 10px; font-size: 0.72rem; font-weight: bold; letter-spacing: 1px; margin-bottom: 10px;
}
.product-card-body .spec { font-size: 0.82rem; color: #777; line-height: 1.7; margin-bottom: 8px; }
.product-card-body .spec strong { color: #444; }
.product-card-body .btn-detail {
  display: inline-block; margin-top: 10px; padding: 8px 18px;
  border: 1.5px solid #0f1c60; color: #0f1c60; text-decoration: none;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s;
}
.product-card-body .btn-detail:hover { background: #0f1c60; color: #fff; }

/* 产品分类 Hero 标题 */
.product-hero {
  position: relative; min-height: 620px; display: flex;
  align-items: center; justify-content: flex-start; background: #0a1628; overflow: hidden;
}
.product-hero-bg { position: absolute; inset: 0; z-index: 0; }
.product-hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.product-hero-bg::after {
  content: ''; position: absolute; inset: 0; background: rgba(10,22,40,0.72); z-index: 1;
}
.product-hero-content {
  position: relative; z-index: 2; text-align: left; color: #fff;
  padding: 0; max-width: 600px; margin-left: 12%; opacity: 0; transition: opacity 0.4s ease;
}
.product-hero:hover .product-hero-content { opacity: 1; }
.product-hero-title { font-size: 2.8rem; font-weight: bold; line-height: 1.15; }

/* ===== CATEGORY CAROUSEL (分类页 7 图轮播导航) ===== */
.carousel-wrapper {
  position: relative; max-width: 1200px; margin: 0 auto;
  padding: 10px 50px 30px;
}
.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-size: 2.5rem; color: #0f1c60; cursor: pointer; z-index: 3;
  user-select: none; transition: color 0.3s; line-height: 1;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.carousel-arrow:hover { color: #00B0F0; }
.carousel-arrow.left { left: 2px; }
.carousel-arrow.right { right: 2px; }
.carousel-viewport { overflow: hidden; }
.carousel-track {
  display: flex; gap: 14px; overflow-x: auto; scroll-behavior: smooth;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-item {
  flex: 0 0 calc(14.28% - 12px); min-width: 130px;
  position: relative; overflow: hidden; border-radius: 4px;
  aspect-ratio: 4 / 3;
}
.carousel-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.4s;
}
.carousel-item:hover img { transform: scale(1.08); }
.carousel-item .overlay {
  position: absolute; inset: 0;
  background: rgba(10,22,40,0.45); transition: background 0.3s;
}
.carousel-item:hover .overlay { background: rgba(10,22,40,0.7); }
.carousel-link {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; font-weight: bold; font-size: 0.95rem;
  letter-spacing: 0.5px; z-index: 2; text-align: center; padding: 8px;
  transition: transform 0.3s;
}
.carousel-item:hover .carousel-link { transform: scale(1.05); }

/* ===== INDEX-V2 HOMEPAGE ===== */
/* Hero Slider */
.hero {
  position: relative; min-height: 520px; display: flex;
  align-items: center; background: #0a1628; padding: 80px 60px; overflow: hidden;
}
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease-in-out; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(10,22,40,0.78); z-index: 1; transition: background 0.4s ease;
}
.hero:hover .hero-slider::after { background: rgba(10,22,40,0.4); }
.hero-slider-dots {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px; z-index: 3;
}
.hero-slider-dots .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.4); cursor: pointer; transition: background 0.3s;
}
.hero-slider-dots .dot.active { background: #00B0F0; }
.hero-content {
  max-width: 700px; position: relative; z-index: 2;
  opacity: 0; transition: opacity 0.4s ease;
}
.hero:hover .hero-content { opacity: 1; }
.hero-title { font-size: 2.8rem; font-weight: bold; line-height: 1.15; letter-spacing: -0.5px; }
.hero-title .blue { color: #00B0F0; }
.hero-title .white { color: #fff; }

/* Expertise Row */
.expertise-row { display: flex; gap: 12px; padding: 0; }
.expertise-left {
  flex: 1; display: flex; align-items: center; padding: 40px; background: #fff;
}
.expertise-left h2 { font-size: 1.4rem; font-weight: bold; color: #222; line-height: 1.4; text-align: left; }
.exp-small { font-size: 0.7rem; font-weight: 700; color: #222; }
.exp-bold { font-size: 1.4rem; font-weight: 900; color: #111; }
.exp-dark { font-weight: 700; color: #222; }
.expertise-right {
  flex: 1; padding: 40px; background: #fff;
  display: flex; flex-direction: column; justify-content: center;
}
.expertise-right p { font-size: 0.88rem; color: #555; line-height: 1.7; text-align: left; margin-bottom: 20px; }

/* Learn More button */
.btn-learn-more-svc {
  display: inline-block; margin-top: 16px; align-self: flex-start;
  padding: 6px 6px; border: 1.5px solid #a0d8ef; color: #a0d8ef;
  text-decoration: none; font-size: 0.78rem; width: 100px; text-align: center;
  font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s;
}
.btn-learn-more-svc:hover { background: #a0d8ef; color: #fff; }

/* Service Images Row */
.services-img-row { display: flex; gap: 6px; }
.service-img-item { flex: 1; overflow: hidden; position: relative; }
.service-img-item img { width: 100%; height: 280px; object-fit: cover; display: block; }

/* Service Labels Row */
.services-row { display: flex; align-items: stretch; gap: 6px; }
.service-label-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 28px 20px 20px; color: #222; background: #fff;
}
.svc-text {
  font-size: 1.1rem; font-weight: 900; color: #111;
  text-align: left; width: 100%; margin-bottom: 12px; letter-spacing: 0.5px;
}

/* Projects Heading */
.projects-heading { padding: 50px 40px; text-align: center; background: #fff; }
.projects-label {
  font-size: 0.75rem; letter-spacing: 3px; text-transform: uppercase;
  color: #999; margin-bottom: 10px;
}
.projects-title { font-size: 2.4rem; font-weight: bold; color: #0b144b; margin-bottom: 14px; letter-spacing: -0.5px; }
.projects-desc { font-size: 0.95rem; color: #777; max-width: 640px; }

/* Projects Grid */
.projects-section { padding: 0 40px 30px; background: #fff; }
.projects-grid { display: flex; gap: 6px; }
.project-card { flex: 1; overflow: hidden; position: relative; }
.project-card img { width: 100%; height: 300px; object-fit: cover; display: block; }

/* CTA Buttons */
.cta-row { display: flex; margin: 0; }
.cta-btn {
  flex: 1; padding: 28px 20px; text-align: center;
  font-size: 1.8rem; font-weight: bold; color: #fff;
  text-decoration: none; letter-spacing: 1px; transition: all 0.3s; cursor: pointer;
}
.cta-btn.quote { background: #00B0F0; }
.cta-btn.quote:hover { background: #0099d6; }
.cta-btn.survey { background: #0070C0; }
.cta-btn.survey:hover { background: #005a9e; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-hero-title { font-size: 2rem; }
}
@media (max-width: 768px) {
  .related-wrap { flex-direction: column; padding: 30px 16px; }
  .related-left { width: 100%; }
  .main-nav { display: none; } .mobile-toggle { display: flex; }
  .main-nav.open {
    display: flex; flex-direction: column; position: absolute;
    top: 90px; left: 0; right: 0; background: #0f1c60; padding: 20px; gap: 14px; z-index: 100;
  }
  .main-nav .dropdown { position: static; box-shadow: none; background: rgba(255,255,255,0.1); border-radius: 0; }
  .main-nav .dropdown a { color: rgba(255,255,255,0.85) !important; }
  .detail-hero { flex-direction: column; min-height: auto; }
  .detail-hero-img { width: 100%; height: 250px; padding-left: 0; }
  .detail-hero-text { width: 100%; padding: 30px 24px; }
  .detail-hero-text h1 { font-size: 1.5rem; }
  .product-grid { grid-template-columns: 1fr; padding: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom-inner { flex-direction: column; text-align: center; }
  .footer-bottom-text { flex-direction: column; gap: 6px; }
  .carousel-item { flex: 0 0 calc(50% - 8px); min-height: 160px; }
  .carousel-wrapper { padding: 0 30px 20px; }
  .carousel-arrow { font-size: 2rem; }
  .carousel-link { font-size: 0.8rem; }
  /* index-v2 responsive */
  .hero { padding: 50px 24px; min-height: 350px; }
  .hero-title { font-size: 1.5rem; }
  .expertise-row { flex-direction: column; }
  .expertise-left, .expertise-right { padding: 24px; }
  .services-row, .services-img-row { flex-direction: column; }
  .service-img-item { min-height: 150px; }
  .projects-heading { padding: 40px 24px 24px; }
  .projects-title { font-size: 1.5rem; }
  .projects-section { padding: 0 16px 16px; }
  .projects-grid { flex-direction: column; }
  .project-card { min-height: 200px; }
  .cta-row { flex-direction: column; }
  .cta-btn { font-size: 1.2rem; padding: 20px 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}