:root {
  --navy: #092c45;
  --teal: #05889a;
  --orange: #f28b18;
  --magenta: #ce176c;
  --purple: #522878;
  --ink: #132333;
  --muted: #617180;
  --line: #dbe4ea;
  --paper: #ffffff;
  --page: #f4f7f9;
  --shadow: 0 12px 32px rgba(9, 44, 69, 0.11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }

.brand-header {
  position: relative;
  overflow: hidden;
  min-height: 330px;
  color: white;
  background: linear-gradient(135deg, var(--navy), #124f62 68%, #0a6e78);
}
.brand-header::after {
  content: "";
  position: absolute;
  right: -7%;
  bottom: -62%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 65%);
}
.brand-shape { position: absolute; transform: skewX(-24deg); opacity: .95; }
.shape-one {
  width: 390px; height: 150px; right: 60px; top: -45px;
  background: linear-gradient(90deg, var(--orange), var(--magenta), var(--purple));
}
.shape-two {
  width: 300px; height: 105px; right: -40px; top: 100px;
  background: linear-gradient(90deg, #20a4aa, var(--teal), var(--orange));
}
.header-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 45px 0 58px;
}
.brand-name { font-size: clamp(28px, 5vw, 48px); font-weight: 800; letter-spacing: -.04em; }
.brand-name span, .compact-brand span { color: #ffb31a; }
.tagline {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  border-left: 5px solid var(--orange);
  background: rgba(255,255,255,.12);
  font-weight: 700;
}
.brand-header h1 { margin: 42px 0 8px; font-size: clamp(34px, 6vw, 62px); line-height: 1; }
.brand-header p { max-width: 720px; margin: 0; color: #d7e6ec; font-size: 18px; line-height: 1.6; }

.compact-header {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 82px; padding: 18px max(22px, calc((100% - 1180px)/2));
  color: white; background: linear-gradient(100deg, var(--navy), var(--teal));
  border-bottom: 5px solid var(--orange);
}
.compact-brand { font-size: 28px; font-weight: 800; }
.back-link { text-decoration: none; font-weight: 700; padding: 10px 14px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; }

.page-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 60px; }
.catalog-tools {
  margin-top: -78px; position: relative; z-index: 3;
  padding: 22px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper); box-shadow: var(--shadow);
}
.search-box { display: grid; gap: 8px; font-weight: 800; }
.search-box input {
  width: 100%; padding: 15px 17px; border: 1px solid #cbd8df; border-radius: 12px;
  font: inherit; outline: none;
}
.search-box input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(5,136,154,.12); }
.category-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.filter-button {
  border: 1px solid #cddbe2; background: white; padding: 10px 14px; border-radius: 999px;
  cursor: pointer; font-weight: 750; color: #294455;
}
.filter-button:hover, .filter-button.active { color: white; border-color: var(--teal); background: var(--teal); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 42px 0 22px; }
.section-heading h2 { margin: 0; font-size: clamp(30px, 5vw, 44px); }
.eyebrow { margin: 0 0 6px; color: var(--magenta); font-weight: 900; letter-spacing: .12em; font-size: 12px; }
.product-count { color: var(--muted); font-weight: 700; }

.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.product-card {
  overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: 0 8px 24px rgba(18,55,74,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-image-link { position: relative; display: block; background: #eef2f4; aspect-ratio: 1; overflow: hidden; }
.card-image-link img { width: 100%; height: 100%; object-fit: contain; display: block; }
.video-badge {
  position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-radius: 999px; color: white; background: rgba(9,44,69,.9);
  box-shadow: 0 5px 16px rgba(0,0,0,.22); font-size: 12px; font-weight: 900; letter-spacing: .03em;
}
.card-body { display: flex; flex-direction: column; flex: 1; padding: 18px; }
.card-category { color: var(--teal); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.card-body h3 { margin: 7px 0 8px; font-size: 22px; line-height: 1.25; }
.card-code { margin: 0 0 10px; color: var(--magenta); font-weight: 800; }
.card-description { margin: 0 0 18px; color: var(--muted); line-height: 1.55; }
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; align-self: flex-start;
  margin-top: auto; padding: 11px 16px; color: white; text-decoration: none; font-weight: 800;
  background: linear-gradient(90deg, var(--teal), #066b84); border-radius: 10px;
}
.primary-button:hover { filter: brightness(.94); }
.empty-state { padding: 60px 20px; text-align: center; border: 1px dashed #b8c8d0; border-radius: 18px; background: white; }

.product-page { padding-top: 46px; }
.product-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr); gap: 38px; align-items: start; }
.gallery-panel, .detail-panel, .content-panel { border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: var(--shadow); }
.gallery-panel { padding: 18px; }
.main-image-wrap { aspect-ratio: 1; border-radius: 15px; overflow: hidden; background: #eef2f4; }
.main-image-wrap img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thumbnail-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.thumb-button { aspect-ratio: 1; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #eef2f4; cursor: pointer; }
.thumb-button.active { border-color: var(--orange); }
.thumb-button img { width: 100%; height: 100%; object-fit: cover; }
.detail-panel { padding: 28px; position: sticky; top: 20px; }
.detail-category { color: var(--teal); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; }
.detail-panel h1 { margin: 9px 0 8px; font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
.detail-code { color: var(--magenta); font-weight: 900; font-size: 18px; }
.detail-description { margin: 22px 0; color: #526573; line-height: 1.75; font-size: 17px; white-space: pre-line; }
.feature-list { margin: 0; padding-left: 20px; line-height: 1.8; }
.product-sections { display: grid; gap: 22px; margin-top: 28px; }
.video-section { margin-top: 28px; }
.video-section > h2 { margin: 0 0 16px; font-size: 30px; }
.video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.video-card { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: var(--shadow); }
.video-frame { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #071c2b; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-open-link {
  display: inline-block;
  margin: 0 14px 14px;
  color: var(--teal);
  font-weight: 800;
  text-decoration: none;
}
.video-open-link:hover { text-decoration: underline; }
.video-title { margin: 0; padding: 15px 17px 17px; font-size: 18px; line-height: 1.35; }
.content-panel { padding: 27px; }
.content-panel h2 { margin: 0 0 13px; font-size: 27px; }
.back-button { display: inline-flex; margin-top: 28px; }

.site-footer {
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
  padding: 28px 18px; color: #dce8ed; background: var(--navy); border-top: 6px solid var(--orange);
}
.site-footer span { color: #9fb4bf; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product-hero { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .video-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .brand-header { min-height: 360px; }
  .shape-one { right: -150px; }
  .shape-two { right: -145px; top: 125px; }
  .catalog-tools { margin-top: -52px; }
  .product-grid { grid-template-columns: 1fr; }
  .section-heading { align-items: start; flex-direction: column; }
  .compact-header { align-items: flex-start; gap: 12px; flex-direction: column; }
  .thumbnail-strip { grid-template-columns: repeat(4, 1fr); }
}


/* ===== Category-first catalogue structure (v1.5) ===== */
.category-search-tools,
.category-product-tools {
  margin-bottom: 28px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.category-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(9, 44, 69, 0.10);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(9, 44, 69, 0.10);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 42px rgba(9, 44, 69, 0.16);
}

.category-image-link {
  display: block;
  aspect-ratio: 1 / 1;
  padding: 12px;
  background: #eef3f6;
  border-bottom: 1px solid rgba(9, 44, 69, 0.08);
}

.category-image-link img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 14px;
  background: #ffffff;
}

.category-card-body {
  padding: 20px;
}

.category-label {
  margin: 0 0 7px;
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.category-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.15;
}

.category-product-total {
  margin: 10px 0 18px;
  color: #60717e;
  font-weight: 700;
}

.category-page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 12px 0 24px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid rgba(9, 44, 69, 0.10);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(9, 44, 69, 0.08);
}

.category-page-heading h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.category-back-button {
  display: inline-flex;
  margin-top: 30px;
}

.secondary-button {
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border: 1px solid var(--teal);
  border-radius: 9px;
  color: var(--teal);
  background: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.secondary-button:hover {
  color: #ffffff;
  background: var(--teal);
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .category-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .category-page-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }
}
