:root {
  --navy: #0B192C;
  --navy-mid: #132844;
  --sky: #0284C7;
  --sky-dark: #0369A1;
  --sky-soft: #E0F2FE;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --text: #0F172A;
  --muted: #64748B;
  --wa: #16A34A;
  --wa-dark: #15803D;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 24px -8px rgba(15, 23, 42, 0.12);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Utility Bar */
.topbar {
  background: var(--navy);
  color: #CBD5E1;
  font-size: 12.5px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.topbar-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 18px;
}
.topbar-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}
.topbar a:hover { color: #FFFFFF; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 10px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand img {
  height: 44px;
  width: auto;
  max-width: 210px;
  object-fit: contain;
  display: block;
}
.search-form {
  flex: 1;
  max-width: 460px;
  display: flex;
  align-items: center;
  background: #F1F5F9;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px 4px 16px;
  transition: border-color .15s, background .15s;
}
.search-form:focus-within {
  background: #fff;
  border-color: var(--sky);
}
.search-form input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.search-form button {
  background: var(--navy);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.search-form button:hover { background: var(--sky-dark); }

.btn-wa-header {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .15s, transform .1s;
}
.btn-wa-header:hover { background: var(--wa-dark); transform: translateY(-1px); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 65%, #163A5F 100%);
  color: #fff;
  padding: 36px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.hero-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.hero-copy { max-width: 720px; }
.hero-eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7DD3FC;
  background: rgba(2, 132, 199, 0.22);
  border: 1px solid rgba(125, 211, 252, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}
.hero p {
  font-size: 14.5px;
  color: #CBD5E1;
  max-width: 640px;
}
.hero-stats {
  display: flex;
  gap: 14px;
}
.stat-pill {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: center;
  min-width: 112px;
}
.stat-pill strong {
  display: block;
  font-size: 22px;
  color: #fff;
  line-height: 1.1;
}
.stat-pill span {
  font-size: 12px;
  color: #94A3B8;
}

/* Catalog Layout */
.catalog-wrap {
  padding: 28px 0 56px;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 26px;
  align-items: start;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 94px;
}
.sidebar-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
  padding: 0 6px;
}
.cat-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.cat-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  transition: background .12s, color .12s;
}
.cat-link:hover { background: #F1F5F9; color: var(--sky-dark); }
.cat-link.active {
  background: var(--sky-soft);
  color: var(--sky-dark);
  font-weight: 700;
}
.cat-link.sub {
  padding-left: 24px;
  font-size: 13px;
  color: #475569;
}
.cat-link.sub.active { color: var(--sky-dark); }
.cat-count {
  font-size: 11.5px;
  background: #F1F5F9;
  color: var(--muted);
  padding: 2px 7px;
  border-radius: 999px;
  font-weight: 600;
}
.cat-link.active .cat-count {
  background: rgba(2,132,199,0.16);
  color: var(--sky-dark);
}

/* Mobile category bar */
.mobile-cats {
  display: none;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.mobile-cat-pill {
  white-space: nowrap;
  padding: 7px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}
.mobile-cat-pill.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* Toolbar & Grid */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.catalog-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.catalog-meta {
  font-size: 13.5px;
  color: var(--muted);
}
.reset-link {
  color: var(--sky);
  font-weight: 600;
  margin-left: 8px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.card-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: #FFFFFF;
  border-bottom: 1px solid #F1F5F9;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.card-placeholder {
  color: #94A3B8;
  font-size: 12.5px;
  font-weight: 600;
}

.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.card-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.badge-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sky-dark);
  background: var(--sky-soft);
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-sku {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #F1F5F9;
  padding: 3px 8px;
  border-radius: 6px;
}
.card-title {
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 8px;
  color: var(--text);
}
.card-title a:hover { color: var(--sky-dark); }
.card-excerpt {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
  flex: 1;
}
.card-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #F1F5F9;
}
.btn-detail {
  flex: 1;
  text-align: center;
  background: #F8FAFC;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background .12s, border-color .12s;
}
.btn-detail:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.btn-wa-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ECFDF5;
  border: 1px solid #BBF7D0;
  color: var(--wa-dark);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
}
.btn-wa-sm:hover {
  background: var(--wa);
  border-color: var(--wa);
  color: #fff;
}

.empty-state {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }

/* Product Detail Page */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a:hover { color: var(--sky-dark); }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: minmax(0, 440px) 1fr;
  gap: 32px;
  margin-bottom: 36px;
}

.gallery-main {
  aspect-ratio: 4 / 3;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.thumb-btn {
  width: 72px;
  height: 72px;
  padding: 5px;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.thumb-btn.active { border-color: var(--sky); }
.thumb-btn img { max-width: 100%; max-height: 100%; object-fit: contain; }

.detail-title {
  font-size: clamp(22px, 2.5vw, 28px);
  font-weight: 700;
  line-height: 1.25;
  margin: 10px 0 14px;
  color: var(--text);
}
.detail-summary {
  background: #F8FAFC;
  border-left: 3px solid var(--sky);
  padding: 14px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 14px;
  color: #334155;
  margin-bottom: 20px;
}
.detail-summary ul { padding-left: 18px; margin: 6px 0; }

.detail-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}
.btn-primary-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wa);
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
}
.btn-primary-wa:hover { background: var(--wa-dark); }
.btn-secondary-mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
}
.btn-secondary-mail:hover { border-color: var(--navy); background: #F8FAFC; }

.spec-section h2 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.spec-body {
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
}
.spec-body p { margin-bottom: 10px; }
.spec-body ul, .spec-body ol { padding-left: 20px; margin-bottom: 12px; }
.spec-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.spec-body th, .spec-body td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }

.related-heading {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 16px;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 25, 44, 0.86);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: #CBD5E1;
  padding: 36px 0 24px;
  font-size: 13.5px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.footer-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.footer-bottom {
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  color: #94A3B8;
}

@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .sidebar-card { display: none; }
  .mobile-cats { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .search-form { order: 3; max-width: 100%; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .product-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .btn-wa-header span.label-text { display: none; }
}
