/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:   #1a3a5c;
  --accent:    #c8902a;
  --light-bg:  #f5f6f8;
  --text:      #2c2c2c;
  --muted:     #6b7280;
  --border:    #e2e5ea;
  --white:     #ffffff;
  --radius:    10px;
  --shadow:    0 4px 20px rgba(0,0,0,.09);
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.25rem; }
.section    { padding: 5rem 0; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2rem; color: var(--primary); margin-bottom: .6rem; }
.section-header p  { color: var(--muted); font-size: 1rem; }
.text-center { text-align: center; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: .75rem 1.9rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}
.btn-primary  { background: var(--accent); color: #fff; }
.btn-primary:hover  { background: #a97520; }
.btn-outline  { border-color: #fff; color: #fff; }
.btn-outline:hover  { background: #fff; color: var(--primary); }
.btn-white    { background: #fff; color: var(--primary); }
.btn-white:hover    { background: var(--accent); color: #fff; }
.btn-ghost    { border-color: var(--accent); color: var(--accent); }
.btn-ghost:hover    { background: var(--accent); color: #fff; }

/* ===== HEADER ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
}
.logo-icon { font-size: 1.6rem; color: var(--accent); }
.logo-main { font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; color: #fff; display: block; }
.logo-sub  { font-size: .7rem; letter-spacing: 1.5px; color: #afc8e4; text-transform: uppercase; display: block; line-height: 1; }

.nav-links { display: flex; gap: 2rem; }
.nav-links a {
  color: #cde;
  font-size: .9rem;
  font-weight: 500;
  padding: .3rem 0;
  border-bottom: 2px solid transparent;
  transition: var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: #fff; border-bottom-color: var(--accent); }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 560px;
  background: linear-gradient(135deg, #0d2137 0%, #1a4a75 55%, #24638f 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  right: -80px;
  bottom: -80px;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.hero-overlay {
  position: absolute; inset: 0;
  background: url('../images/hero-pattern.svg') right center / 480px no-repeat;
  opacity: .12;
}
.hero-content { position: relative; z-index: 2; max-width: 660px; padding: 5rem 1.25rem; }
.hero-tag {
  display: inline-block;
  background: rgba(200,144,42,.25);
  color: var(--accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 50px;
  margin-bottom: 1.2rem;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #fff;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}
.hero-desc { color: #b8d0e8; font-size: 1.05rem; margin-bottom: 2rem; max-width: 540px; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===== HIGHLIGHTS ===== */
.highlights-sec { background: var(--light-bg); }
.highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.highlight-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.highlight-card:hover { transform: translateY(-4px); box-shadow: 0 8px 28px rgba(0,0,0,.12); }
.highlight-card i { font-size: 2rem; color: var(--accent); margin-bottom: 1rem; }
.highlight-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: .5rem; }
.highlight-card p  { font-size: .88rem; color: var(--muted); }

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
  border: 1px solid var(--border);
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,.13); }

.product-card .img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f8f9fb;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease;
}
.product-card:hover .img-wrap img { transform: scale(1.04); }

.product-card .card-body { padding: 1.2rem 1.3rem 1.4rem; }
.product-card .model-tag {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .8px;
  padding: .2rem .65rem;
  border-radius: 4px;
  margin-bottom: .55rem;
}
.product-card h3 { font-size: 1rem; color: var(--text); margin-bottom: .35rem; line-height: 1.4; }
.product-card .material-tag {
  font-size: .82rem;
  color: var(--muted);
}
.product-card .material-tag i { color: var(--accent); margin-right: .3rem; }

/* ===== FEATURED ===== */
.featured-sec { background: var(--white); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, #0d2137, #1a4a75);
  padding: 4.5rem 0;
  text-align: center;
}
.cta-content h2 { color: #fff; font-size: 1.9rem; margin-bottom: .8rem; }
.cta-content p  { color: #b8d0e8; margin-bottom: 1.8rem; font-size: 1rem; }

/* ===== ABOUT PAGE ===== */
.page-hero {
  background: linear-gradient(135deg, #0d2137 0%, #1a4a75 100%);
  padding: 4rem 0;
  text-align: center;
  color: #fff;
}
.page-hero h1 { font-size: 2.4rem; margin-bottom: .5rem; }
.page-hero p  { color: #b8d0e8; font-size: 1rem; }

.about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-intro h2 { font-size: 1.8rem; color: var(--primary); margin-bottom: 1rem; }
.about-intro p  { color: var(--muted); margin-bottom: 1rem; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2rem; }
.stat-item { text-align: center; }
.stat-num { font-size: 2.2rem; font-weight: 800; color: var(--accent); display: block; }
.stat-lbl { font-size: .82rem; color: var(--muted); }

.equipment-sec { background: var(--light-bg); }
.equipment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.equip-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.equip-card i { font-size: 2rem; color: var(--primary); margin-bottom: .8rem; }
.equip-card h4 { color: var(--primary); margin-bottom: .4rem; font-size: 1rem; }
.equip-card p  { font-size: .85rem; color: var(--muted); }

/* ===== PRODUCTS PAGE ===== */
.products-layout .container {
  display: flex;
  align-items: flex-start;
  gap: 2.5rem;
}

.filter-sidebar {
  width: 200px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
}
.filter-sidebar .sidebar-title {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
  padding-left: .25rem;
}
.filter-btn {
  display: block;
  width: 100%;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  font-size: .88rem;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  margin-bottom: .4rem;
}
.filter-btn:hover {
  background: var(--light-bg);
  color: var(--primary);
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

#productsGrid {
  flex: 1;
  min-width: 0;
}

/* ===== PRODUCT DETAIL ===== */
.detail-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }

.detail-img-main {
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: #eef0f4;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-img-main img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }

.detail-info .model-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .78rem;
  font-weight: 700;
  padding: .25rem .8rem;
  border-radius: 4px;
  margin-bottom: .5rem;
}
.detail-info h1 { font-size: 1.8rem; color: var(--primary); margin-bottom: .5rem; line-height: 1.3; }
.detail-info .detail-category {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.spec-table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
.spec-table td {
  padding: .65rem .9rem;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
}
.spec-table td:first-child { color: var(--muted); width: 38%; font-weight: 500; }
.spec-table td:last-child  { color: var(--text); font-weight: 500; }
.spec-table tr:last-child td { border-bottom: none; }

.detail-actions { display: flex; gap: 1rem; margin-top: 1.5rem; flex-wrap: wrap; }

/* ===== TOP NAV BAR (Back + Prev/Next on same line) ===== */
.top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}
.back-link { display: inline-flex; align-items: center; gap: .5rem; color: var(--primary); font-size: .9rem; font-weight: 500; }
.back-link:hover { color: var(--accent); }

/* ===== PREV / NEXT NAVIGATION ===== */
.prev-next-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.prev-btn, .next-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 500;
  color: var(--primary);
  background: var(--light);
  transition: all .2s;
  text-decoration: none;
}
.prev-btn:hover, .next-btn:hover {
  background: var(--primary);
  color: #fff;
}
.prev-btn.disabled, .next-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}
.nav-indicator {
  font-size: .8rem;
  color: var(--muted);
  white-space: nowrap;
  padding: 0 .5rem;
}

/* ===== OEM PAGE ===== */
.oem-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.oem-step {
  text-align: center;
  padding: 2rem 1.2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.oem-step .step-num {
  width: 48px; height: 48px;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.oem-step h4 { color: var(--primary); margin-bottom: .4rem; }
.oem-step p  { color: var(--muted); font-size: .85rem; }

.oem-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.oem-option-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--accent);
}
.oem-option-card h4 { color: var(--primary); margin-bottom: .5rem; font-size: 1rem; }
.oem-option-card p  { color: var(--muted); font-size: .87rem; }

/* ===== CONTACT PAGE ===== */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 4rem; }
.contact-info-card {
  background: var(--primary);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  color: #fff;
}
.contact-info-card h3 { font-size: 1.3rem; margin-bottom: 1.5rem; }
.contact-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.4rem; }
.contact-row i { color: var(--accent); font-size: 1.1rem; margin-top: .15rem; }
.contact-row .ci-label { font-size: .8rem; color: #afc8e4; text-transform: uppercase; letter-spacing: .8px; }
.contact-row .ci-val   { color: #fff; font-size: .95rem; }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow);
}
.form-card h3 { font-size: 1.3rem; color: var(--primary); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .4rem; font-weight: 500; }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--text);
  transition: var(--transition);
  background: #fafbfc;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
}
.form-group textarea { resize: vertical; min-height: 110px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-success { display: none; background: #d1fae5; border-radius: 8px; padding: 1rem; color: #065f46; font-size: .9rem; margin-top: 1rem; }

/* ===== FOOTER ===== */
footer {
  background: #0d1f31;
  padding-top: 3.5rem;
}
.footer-wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-links h4,
.footer-contact h4 { color: #fff; font-size: .9rem; margin-bottom: 1rem; letter-spacing: .5px; }
.footer-links ul li { margin-bottom: .55rem; }
.footer-links ul li a { color: #8a9ab0; font-size: .85rem; transition: var(--transition); }
.footer-links ul li a:hover { color: var(--accent); }
.footer-contact p { color: #8a9ab0; font-size: .85rem; margin-bottom: .6rem; display: flex; align-items: center; gap: .5rem; }
.footer-contact p i { color: var(--accent); width: 14px; }
.footer-bottom { padding: 1.2rem 0; text-align: center; }
.footer-bottom p { color: #4a6070; font-size: .8rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: #eef1f6;
  padding: .65rem 0;
  font-size: .82rem;
  color: var(--muted);
}
.breadcrumb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.breadcrumb-links {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.breadcrumb input[type="search"] {
  padding: .38rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: .82rem;
  outline: none;
  width: 230px;
  background: var(--white);
  transition: border-color .2s;
  color: var(--text);
}
.breadcrumb input[type="search"]:focus { border-color: var(--primary); }
.breadcrumb input[type="search"]::placeholder { color: var(--muted); }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 .4rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .highlights-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid     { grid-template-columns: repeat(2, 1fr); }
  .oem-steps        { grid-template-columns: repeat(2, 1fr); }
  .about-intro      { grid-template-columns: 1fr; }
  .stats-row        { grid-template-columns: repeat(2, 1fr); }
  .equipment-grid   { grid-template-columns: repeat(2, 1fr); }
  .contact-wrap     { grid-template-columns: 1fr; }
  .footer-wrap      { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; gap: 0; position: absolute; top: 68px; left: 0; right: 0; background: var(--primary); padding: 1rem 0; }
  .nav-links.open { display: flex; }
  .nav-links li { border-bottom: 1px solid rgba(255,255,255,.08); }
  .nav-links a  { display: block; padding: .75rem 1.5rem; }
  .nav-toggle   { display: block; }
  header        { position: relative; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .detail-wrap  { grid-template-columns: 1fr; }
  .oem-steps    { grid-template-columns: 1fr; }
  .oem-options  { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .footer-wrap  { grid-template-columns: 1fr; }

  /* Products page – sidebar to horizontal top bar on mobile */
  .products-layout .container {
    flex-direction: column;
    gap: 1rem;
  }
  .filter-sidebar {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
  }
  .filter-sidebar .sidebar-title { display: none; }
  .filter-btn {
    display: inline-block;
    width: auto;
    margin-bottom: 0;
    padding: .4rem 1rem;
    border-radius: 50px;
  }
  /* Force square images on mobile (fallback if aspect-ratio unsupported) */
  .product-card .img-wrap {
    height: 0;
    padding-bottom: 100%;
    position: relative;
  }
  .product-card .img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
  }
  /* Mobile search box */
  .breadcrumb input[type="search"] { width: 100%; }
}

@media (max-width: 480px) {
  .product-grid     { grid-template-columns: 1fr; }
  .highlights-grid  { grid-template-columns: 1fr; }
}
