/*
Theme Name: SGW Bearings
Theme URI: https://sgw-intl.com/
Author: SGW
Description: Lightweight B2B bearing catalogue theme for SGW International.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Text Domain: sgw-bearings
*/

:root {
  --ink: #17212b;
  --muted: #627181;
  --line: #d9e1e8;
  --soft: #f4f7f9;
  --panel: #ffffff;
  --brand: #0e5f8a;
  --brand-2: #b72f2f;
  --steel: #33485b;
  --focus: #f3b544;
  --shadow: 0 18px 45px rgba(23, 33, 43, 0.1);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ink);
  background: #fff;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.sgw-shell { min-height: 100vh; background: #fff; }
.sgw-container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.sgw-topbar {
  background: var(--ink);
  color: #eef4f8;
  font-size: 13px;
}
.sgw-topbar .sgw-container {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.sgw-topbar span { color: #c7d6e1; }
.sgw-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}
.sgw-header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.sgw-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 184px;
}
.sgw-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--steel));
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0;
}
.sgw-logo strong { display: block; font-size: 21px; letter-spacing: 0; }
.sgw-logo small { display: block; color: var(--muted); margin-top: -3px; }
.sgw-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--steel);
  font-weight: 700;
  font-size: 14px;
}
.sgw-nav a { padding: 10px 0; border-bottom: 2px solid transparent; }
.sgw-nav a:hover { color: var(--brand); border-color: var(--brand); }
.sgw-menu-toggle { display: none; }

.sgw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.sgw-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(14, 95, 138, .22); }
.sgw-btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.sgw-btn.alert { background: var(--brand-2); }
.sgw-kicker {
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sgw-section { padding: 74px 0; }
.sgw-section.alt { background: var(--soft); }
.sgw-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 28px;
}
.sgw-section-head h2,
.sgw-split h2 {
  margin: 8px 0 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.08;
  letter-spacing: 0;
}
.sgw-section-head p { max-width: 590px; margin: 0; color: var(--muted); }

.sgw-hero {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  color: #fff;
  background: #0f1f2b;
}
.sgw-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 18, 28, .92) 0%, rgba(8, 18, 28, .70) 48%, rgba(8, 18, 28, .18) 100%),
    var(--hero-image) center / cover no-repeat;
}
.sgw-hero .sgw-container {
  position: relative;
  display: grid;
  align-items: center;
  padding: 86px 0 112px;
}
.sgw-hero-content { max-width: 760px; }
.sgw-hero h1 {
  margin: 16px 0 20px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: .98;
  letter-spacing: 0;
}
.sgw-hero p {
  max-width: 660px;
  color: #dce7ef;
  font-size: 18px;
  margin: 0 0 30px;
}
.sgw-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sgw-hero-metrics {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-top: 1px solid rgba(255,255,255,.36);
}
.sgw-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
}
.sgw-metric {
  background: #fff;
  padding: 22px 24px;
}
.sgw-metric strong { display: block; font-size: 27px; line-height: 1; }
.sgw-metric span { color: var(--muted); font-size: 13px; }

.sgw-family-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.sgw-family {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  min-height: 176px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sgw-family h3 { margin: 0 0 8px; font-size: 20px; }
.sgw-family p { margin: 0; color: var(--muted); font-size: 14px; }
.sgw-family .series { margin-top: 18px; font-size: 13px; color: var(--brand); font-weight: 800; }

.sgw-filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.sgw-filterbar button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 9px 14px;
  color: var(--steel);
  font-weight: 800;
  cursor: pointer;
}
.sgw-filterbar button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.sgw-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.sgw-product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.sgw-product figure {
  margin: 0;
  aspect-ratio: 1.35 / 1;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #f7fafc, #edf2f6);
  padding: 20px;
}
.sgw-product figure img {
  width: min(78%, 320px);
  max-height: 245px;
  object-fit: contain;
}
.sgw-product-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.sgw-product h3 { margin: 0; font-size: 20px; line-height: 1.18; }
.sgw-product p { margin: 0; color: var(--muted); font-size: 14px; }
.sgw-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sgw-tags span {
  background: #eef4f8;
  color: var(--steel);
  border: 1px solid #dfe8ef;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
}
.sgw-product-actions { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.sgw-link {
  color: var(--brand);
  font-weight: 800;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.sgw-split {
  display: grid;
  grid-template-columns: .95fr 1.05fr;
  gap: 46px;
  align-items: center;
}
.sgw-rich p { color: var(--muted); }
.sgw-checks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}
.sgw-checks li {
  border-left: 3px solid var(--brand);
  background: #fff;
  padding: 13px 14px;
  font-weight: 700;
  color: var(--steel);
}
.sgw-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.sgw-process div { background: #fff; padding: 22px; }
.sgw-process strong { color: var(--brand-2); font-size: 13px; }
.sgw-process h3 { margin: 8px 0; font-size: 19px; }
.sgw-process p { margin: 0; color: var(--muted); font-size: 14px; }

.sgw-app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sgw-app {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  min-height: 170px;
}
.sgw-app h3 { margin: 0 0 8px; font-size: 20px; }
.sgw-app p { color: var(--muted); margin: 0 0 14px; }
.sgw-app small { color: var(--brand); font-weight: 800; }

.sgw-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.sgw-model-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}
.sgw-model-table th,
.sgw-model-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.sgw-model-table th {
  background: #edf3f7;
  color: var(--steel);
  font-size: 13px;
  text-transform: uppercase;
}
.sgw-model-table tr:last-child td { border-bottom: 0; }
.sgw-model-table td:first-child { font-weight: 800; color: var(--brand); }

.sgw-contact-band {
  background: var(--ink);
  color: #fff;
  padding: 70px 0;
}
.sgw-contact {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 42px;
  align-items: start;
}
.sgw-contact h2 { margin: 8px 0 14px; font-size: clamp(30px, 4vw, 48px); line-height: 1.08; }
.sgw-contact p { color: #cbd8e2; }
.sgw-contact-list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.sgw-contact-list li { color: #edf4f8; }
.sgw-contact-list span { display: block; color: #91a8b9; font-size: 13px; }
.sgw-form {
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
}
.sgw-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.sgw-field.full { grid-column: 1 / -1; }
.sgw-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 800;
  color: var(--steel);
}
.sgw-field input,
.sgw-field textarea,
.sgw-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fff;
}
.sgw-field textarea { min-height: 130px; resize: vertical; }
.sgw-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.sgw-submit-row small { color: var(--muted); }

.sgw-footer {
  background: #0d151d;
  color: #b8c7d2;
  padding: 28px 0;
}
.sgw-footer .sgw-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.sgw-footer strong { color: #fff; }

.sgw-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(12, 19, 26, .72);
}
.sgw-modal.open { display: flex; }
.sgw-modal-panel {
  width: min(920px, 100%);
  max-height: min(86vh, 780px);
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.sgw-modal-head {
  position: sticky;
  top: 0;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.sgw-modal-head h3 { margin: 0; font-size: 24px; }
.sgw-close {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.sgw-modal-body { padding: 22px; }

.sgw-notice {
  padding: 12px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  background: #e9f6ee;
  color: #20643a;
  font-weight: 700;
}
.sgw-notice.error { background: #fdeeee; color: #8a2525; }

@media (max-width: 980px) {
  .sgw-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }
  .sgw-nav.open { display: flex; }
  .sgw-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .sgw-menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-weight: 900;
  }
  .sgw-header-cta { display: none; }
  .sgw-family-grid,
  .sgw-product-grid,
  .sgw-app-grid { grid-template-columns: repeat(2, 1fr); }
  .sgw-split,
  .sgw-contact { grid-template-columns: 1fr; }
  .sgw-process,
  .sgw-metrics { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .sgw-container { width: min(100% - 28px, var(--max)); }
  .sgw-topbar .sgw-container { justify-content: center; text-align: center; flex-wrap: wrap; padding: 8px 0; }
  .sgw-topbar span { display: none; }
  .sgw-logo small { display: none; }
  .sgw-hero { min-height: 690px; }
  .sgw-hero .sgw-container { padding: 58px 0 210px; }
  .sgw-hero p { font-size: 16px; }
  .sgw-section { padding: 54px 0; }
  .sgw-section-head { display: block; }
  .sgw-section-head p { margin-top: 14px; }
  .sgw-family-grid,
  .sgw-product-grid,
  .sgw-app-grid,
  .sgw-checks,
  .sgw-form-grid { grid-template-columns: 1fr; }
  .sgw-metrics { grid-template-columns: 1fr 1fr; }
  .sgw-metric { padding: 15px; }
  .sgw-metric strong { font-size: 22px; }
  .sgw-process { grid-template-columns: 1fr; }
  .sgw-field.full { grid-column: auto; }
  .sgw-submit-row { display: block; }
  .sgw-submit-row .sgw-btn { width: 100%; margin-bottom: 10px; }
  .sgw-footer .sgw-container { display: block; }
}
