.mx-page {
  --mx-red: #b61f24;
  --mx-ink: #1f2937;
  --mx-paper: #f4f5f7;
  --mx-surface: #ffffff;
  --mx-line: #e0e2e6;
  --mx-muted: #6b7280;
  color: var(--mx-ink);
  min-height: 100vh;
}

.mx-page * {
  box-sizing: border-box;
}

.mx-page .mx-mono {
  letter-spacing: 0.04em;
}

/* ---------- Page heading ---------- */

.mx-page .mx-page-heading {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 8px;
  text-align: center;
}

.mx-page .mx-page-heading h1 {
  text-transform: uppercase;
  font-size: 38px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.01em;
}

/* ---------- Certificates (quiet, low-emphasis) ---------- */

.mx-page .mx-certificates {
  border-top: 1px solid var(--mx-line);
  background: var(--mx-paper);
}

.mx-page .mx-certificates-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.mx-page .mx-cert-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mx-muted);
  flex-shrink: 0;
}

.mx-page .mx-cert-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

.mx-page .mx-cert-logo {
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mx-page .mx-cert-logo img {
  max-height: 160%;
  max-width: 80px;
  width: auto;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.5;
  transition:
    filter 0.18s ease,
    opacity 0.18s ease;
}

.mx-page .mx-cert-logo img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* ---------- Filter bar (nav-pills) ---------- */

.mx-page .mx-filterbar {
  background: var(--mx-surface);
  border-bottom: 1px solid var(--mx-line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.mx-page .mx-filterbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
}

.mx-page .mx-nav-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--mx-paper);
  padding: 4px;
  border: 1px solid var(--mx-line);
}

.mx-page .mx-nav-pills .nav-link {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mx-muted);
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.mx-page .mx-nav-pills .nav-link.active {
  background: var(--mx-ink);
  color: #fff;
}

.mx-page .mx-nav-pills .nav-link:not(.active):hover {
  color: var(--mx-ink);
}

/* ---------- Sub-category pills ---------- */

.mx-page .mx-sub-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 40px;
  padding: 0;
  list-style: none;
}

.mx-page .mx-sub-pills .nav-link {
  border: 1px solid var(--mx-line);
  background: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--mx-ink);
  border-radius: 0;
  cursor: pointer;
  white-space: nowrap;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.mx-page .mx-sub-pills .nav-link:not(.active):hover {
  border-color: var(--mx-red);
  color: var(--mx-red);
}

.mx-page .mx-sub-pills .nav-link.active {
  background: var(--mx-red);
  border-color: var(--mx-red);
  color: #fff;
}

/* ---------- New Launch grid ---------- */

.mx-page .mx-new-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

/* ---------- Product detail (single product view) ---------- */

.mx-page .mx-detail {
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mx-page .mx-detail-image {
  width: 100%;
  aspect-ratio: 1/1;
  background: var(--mx-paper);
  border: 1px solid var(--mx-line);
  overflow: hidden;
  margin-bottom: 20px;
}

.mx-page .mx-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mx-page .mx-detail-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.mx-page .mx-detail-body h3 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}

/* ---------- Product detail section wrapper ---------- */

.mx-page .mx-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

.mx-page .mx-card-code {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--mx-red);
}

.mx-page .mx-card-division {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--mx-muted);
  border: 1px solid var(--mx-line);
  padding: 3px 8px;
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .mx-page .mx-page-heading h1 {
    font-size: 30px;
  }
  .mx-page .mx-new-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .mx-page .mx-nav-pills,
  .mx-page .mx-sub-pills {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }
  .mx-page .mx-nav-pills .nav-link,
  .mx-page .mx-sub-pills .nav-link {
    white-space: nowrap;
  }
  .mx-page .mx-new-grid {
    grid-template-columns: 1fr;
  }
}

.mx-page button:focus-visible,
.mx-page a:focus-visible,
.mx-page input:focus-visible {
  outline: 2px solid var(--mx-red);
  outline-offset: 2px;
}

/* ---------- Download catalogue CTA ---------- */

.mx-page .mx-download-cta {
  max-width: 1200px;
  margin: 56px auto 0;
  padding: 40px 24px;
  border-top: 1px solid var(--mx-line);
  text-align: center;
}

.mx-page .mx-download-cta p {
  font-size: 15px;
  color: var(--mx-muted);
  margin: 0 0 18px;
}

.mx-page .mx-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--mx-red);
  color: #fff;
  text-decoration: none;
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: background 0.18s ease;
}

.mx-page .mx-download-btn:hover {
  background: var(--mx-ink);
  color: #fff;
}
