/* ==========================================================================
   Xiaoai — reference-aligned theme
   Light ground, navy headings, single red action colour, bordered cards,
   persistent category tree, larger display headings.
   Class names are unchanged from the previous theme so components stay intact.
   ========================================================================== */

:root {
  --canvas: #ffffff;
  --surface: #f4f6f9;
  --surface-raised: #ffffff;
  --surface-spec: #f4f6f9;
  --surface-spec-alt: #eef2f7;

  --line: #e2e8f0;
  --line-strong: #cbd5e1;
  --line-spec: #e2e8f0;

  --fg: #0f172a;
  --fg-muted: #334155;
  --fg-subtle: #64748b;
  --fg-inverse: #0f172a;
  --fg-inverse-muted: #334155;

  --accent: #e60012;
  --accent-hover: #c30010;
  --accent-press: #a8000d;
  --accent-on-spec: #c30010;
  --accent-wash: #fdf1f2;
  --focus: #e60012;
  --navy: #0f172a;
  --navy-deep: #020617;

  --success: #1f9d55;
  --warn: #b7791f;
  --danger: #d92d20;
  --danger-wash: #fef3f2;
  --success-wash: #f0fdf4;

  --font-cond: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --font-arabic: "IBM Plex Sans Arabic", "Inter", system-ui, sans-serif;

  --s-half: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-2xl: 48px;
  --s-3xl: 64px;
  --s-4xl: 88px;
  --s-5xl: 112px;

  --gutter: 16px;
  --container: 100%;
  --container-max: 1280px;
  --container-narrow: 900px;

  --topbar-h: 38px;
  --header-h: 64px;
  --quote-h: 64px;
  --touch: 44px;

  --r-none: 0;
  --r-xs: 4px;
  --r-sm: 6px;

  --section-y: 40px;
  --shadow-card: 0 1px 2px rgba(19, 40, 67, 0.06);
  --shadow-float: 0 16px 40px -12px rgba(19, 40, 67, 0.22);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (min-width: 768px) {
  :root {
    --gutter: 20px;
    --header-h: 76px;
    --section-y: 56px;
  }
}

@media (min-width: 1024px) {
  :root {
    --gutter: 24px;
    --container: 1200px;
    --container-max: 1280px;
    --section-y: 68px;
  }
}

@media (min-width: 1440px) {
  :root {
    --gutter: 24px;
    --container-max: 1360px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- type ---------- */

.h-hero,
.h-section,
.h-lg,
.h-md,
.h-sm {
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
  text-wrap: balance;
}

.h-hero {
  font-size: 32px;
  line-height: 1.15;
}

.h-section {
  font-size: 28px;
  line-height: 1.2;
}

.h-lg {
  font-size: 23px;
  line-height: 1.28;
  font-weight: 700;
}

.h-md {
  font-size: 20px;
  line-height: 1.32;
  font-weight: 600;
}

.h-sm {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 600;
}

@media (min-width: 768px) {
  .h-hero {
    font-size: 42px;
  }
  .h-section {
    font-size: 34px;
  }
  .h-lg {
    font-size: 26px;
  }
  .h-md {
    font-size: 22px;
  }
  .h-sm {
    font-size: 18px;
  }
}

@media (min-width: 1024px) {
  .h-hero {
    font-size: 50px;
    line-height: 1.12;
    letter-spacing: -0.025em;
  }
  .h-section {
    font-size: 38px;
    line-height: 1.18;
    letter-spacing: -0.02em;
  }
  .h-lg {
    font-size: 28px;
    line-height: 1.25;
  }
  .h-md {
    font-size: 23px;
    line-height: 1.3;
  }
}

.eyebrow,
.label,
.mono {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.1em;
}

.eyebrow {
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 17px;
  line-height: 1.68;
  color: var(--fg-muted);
  max-width: 68ch;
}

@media (min-width: 1024px) {
  .lead {
    font-size: 18px;
    line-height: 1.65;
  }
}

.p {
  font-size: 16px;
  line-height: 1.72;
  color: var(--fg-muted);
  max-width: 72ch;
}

.p-sm {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 72ch;
}

.data {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
}

.muted {
  color: var(--fg-muted);
}

.subtle {
  color: var(--fg-subtle);
}

.accent {
  color: var(--accent);
}

.nowrap {
  white-space: nowrap;
}

/* ---------- layout ---------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.band {
  background: var(--canvas);
  padding-block: var(--section-y);
}

.band--surface {
  background: var(--surface);
}

.band--tight {
  padding-block: var(--s-lg);
}

.band--wide {
  padding-block: var(--section-y);
}

.band--spec {
  background: var(--surface);
  color: var(--fg);
  padding-block: var(--section-y);
}

.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.rule-block {
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  margin-bottom: var(--s-sm);
}

.rule-block .rule24 {
  width: 24px;
  border-top: 2px solid var(--accent);
}

.idx {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.grid {
  display: grid;
  gap: var(--s-md);
}

.grid--2,
.grid--3,
.grid--4,
.grid--6 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid {
    gap: var(--s-lg);
  }
  .grid--2,
  .grid--3,
  .grid--4,
  .grid--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .grid--6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .grid--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.split {
  display: grid;
  gap: var(--s-xl);
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: 7fr 5fr;
    gap: var(--s-3xl);
    align-items: start;
  }
  .split--even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--s-2xl);
  }
}

/* category page: persistent tree on the inline-start */
.with-side {
  display: grid;
  gap: var(--s-lg);
}

@media (min-width: 1024px) {
  .with-side {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: var(--s-xl);
    align-items: start;
  }
}

.stack {
  display: grid;
  gap: var(--s-md);
}

.stack--sm {
  gap: var(--s-xs);
}

.stack--lg {
  gap: var(--s-lg);
}

.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-sm);
}

.row--between {
  justify-content: space-between;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-xs);
  min-height: 46px;
  padding-inline: var(--s-lg);
  border-radius: var(--r-xs);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: background-color 160ms linear, border-color 160ms linear, color 160ms linear;
  text-align: center;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--primary:active {
  background: var(--accent-press);
}

.btn--primary:disabled,
.btn--primary[aria-disabled="true"] {
  background: var(--line-strong);
  color: #fff;
  cursor: not-allowed;
}

.btn--secondary {
  background: #fff;
  color: var(--navy);
  border-color: var(--line-strong);
}

.btn--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--ghost {
  min-height: var(--touch);
  padding-inline: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.btn--ghost:hover {
  color: var(--accent-hover);
}

.btn--block {
  width: 100%;
}

.btn--small {
  min-height: 40px;
  padding-inline: var(--s-md);
  font-size: 13px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
  transition: color 160ms linear;
}

.link-arrow:hover {
  color: var(--accent);
}

.link-arrow svg {
  flex: none;
}

/* ---------- chrome ---------- */

.topbar {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  min-height: var(--topbar-h);
}

.topbar__contacts {
  display: flex;
  align-items: center;
  gap: var(--s-lg);
  overflow: hidden;
}

.topbar__contacts a {
  display: none;
  color: rgba(255, 255, 255, 0.78);
  transition: color 160ms linear;
}

.topbar__contacts a:hover {
  color: #fff;
}

@media (min-width: 768px) {
  .topbar__contacts a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .topbar__contacts a:first-child {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .topbar__contacts a {
    display: inline-flex;
  }
}

.lang {
  display: flex;
  align-items: center;
  gap: 0;
}

.lang__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 30px;
  padding-inline: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.66);
  border-bottom: 2px solid transparent;
  transition: color 160ms linear, border-color 160ms linear;
}

.lang__item:hover {
  color: #fff;
}

.lang__item[aria-current="true"] {
  color: #fff;
  border-bottom-color: var(--accent);
}

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  flex: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-xs);
  background: var(--accent);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand__text {
  display: grid;
  line-height: 1.15;
}

.brand__name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--navy);
}

.brand__sub {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--fg-subtle);
}

.nav {
  display: none;
}

@media (min-width: 1024px) {
  .nav {
    display: flex;
    align-items: center;
    gap: 2px;
  }
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: var(--header-h);
  padding-inline: 11px;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 2px solid transparent;
  transition: color 160ms linear, border-color 160ms linear;
}

.nav__link:hover,
.nav__link[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav__link svg {
  color: currentColor;
  opacity: 0.6;
}

.nav__cta {
  display: none;
}

@media (min-width: 1024px) {
  .nav__cta {
    display: inline-flex;
  }
}

.mega {
  position: absolute;
  inset-inline-start: 0;
  top: 100%;
  width: min(900px, calc(100vw - 64px));
  background: #fff;
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: 0 0 var(--r-xs) var(--r-xs);
  padding: var(--s-lg);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-lg);
  box-shadow: var(--shadow-float);
  z-index: 50;
}

.mega__group-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  padding-block-end: var(--s-xs);
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}

.mega__group-title:hover {
  color: var(--accent);
}

.mega__link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding-inline: 6px;
  border-radius: var(--r-xs);
  font-size: 14px;
  color: var(--fg-muted);
  transition: background-color 160ms linear, color 160ms linear;
}

.mega__link:hover {
  background: var(--accent-wash);
  color: var(--accent);
}

.mega__index {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-subtle);
}

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--navy);
}

@media (min-width: 1024px) {
  .menu-btn {
    display: none;
  }
}

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(11, 27, 48, 0.55);
  border: 0;
}

.drawer {
  position: fixed;
  inset-block: 0;
  inset-inline-end: 0;
  z-index: 90;
  width: min(88vw, 400px);
  background: #fff;
  border-inline-start: 1px solid var(--line);
  overflow-y: auto;
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
}

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  padding: var(--s-md);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
}

.drawer__group {
  border-bottom: 1px solid var(--line);
}

.drawer__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  width: 100%;
  min-height: 52px;
  padding-inline: var(--s-md);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
  text-align: start;
}

.drawer__children {
  padding-block-end: var(--s-xs);
  background: var(--surface);
}

.drawer__child {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding-inline-start: calc(var(--s-md) + 10px);
  border-inline-start: 2px solid var(--line-strong);
  margin-inline-start: var(--s-md);
  font-size: 14px;
  color: var(--fg-muted);
}

.drawer__child:hover {
  color: var(--accent);
  border-inline-start-color: var(--accent);
}

.drawer__flat {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-inline: var(--s-md);
  border-bottom: 1px solid var(--line);
  font-size: 16px;
  font-weight: 600;
  color: var(--navy);
}

.drawer__foot {
  margin-top: auto;
  padding: var(--s-md);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--s-sm);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: #fff;
}

.hero__media {
  position: relative;
  height: 56vh;
  min-height: 300px;
  max-height: 460px;
  overflow: hidden;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__plate {
  background: #fff;
  padding-block: var(--s-xl);
}

.hero__scrim {
  display: none;
}

.hero__copy {
  display: grid;
  gap: var(--s-md);
  max-width: 720px;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-xs);
  margin-top: var(--s-xs);
}

.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding-inline: var(--s-sm);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (min-width: 1024px) {
  .hero__media {
    height: 66vh;
    min-height: 520px;
    max-height: 680px;
  }
  .hero__scrim {
    display: block;
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to var(--scrim-dir, right),
      rgba(11, 27, 48, 0.82) 0%,
      rgba(11, 27, 48, 0.58) 42%,
      rgba(11, 27, 48, 0.05) 78%
    );
  }
  .hero__plate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background: transparent;
    padding-block: 0;
  }
  .hero__plate .h-hero,
  .hero__plate .idx {
    color: #fff;
  }
  .hero__plate .idx {
    color: #ffb4b9;
  }
  .hero__plate .eyebrow {
    color: rgba(255, 255, 255, 0.86);
  }
  .hero__plate .lead {
    color: rgba(255, 255, 255, 0.92);
  }
  .hero__plate .rule24 {
    border-top-color: var(--accent);
  }
  .hero__plate .btn--secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
  }
  .hero__plate .btn--secondary:hover {
    background: #fff;
    color: var(--navy);
    border-color: #fff;
  }
  .hero__plate .chip {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
  }
  .hero__copy {
    max-width: 620px;
  }
}

/* ---------- tiles & cards ---------- */

.tile,
.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
  transition: border-color 180ms linear, box-shadow 180ms linear, transform 180ms var(--ease);
  height: 100%;
  box-shadow: var(--shadow-card);
}

.tile:hover,
.card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px -8px rgba(19, 40, 67, 0.18);
  transform: translateY(-2px);
}

.tile__media,
.card__media {
  position: relative;
  overflow: hidden;
  background: var(--surface);
}

.tile__media {
  aspect-ratio: 4 / 3;
}

.card__media {
  aspect-ratio: 1 / 1;
}

.tile__media img,
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 620ms var(--ease);
}

.tile:hover img,
.card:hover img {
  transform: scale(1.04);
}

.tile__body,
.card__body {
  display: grid;
  gap: 6px;
  padding: var(--s-md);
  align-content: start;
}

.tile__code,
.card__code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.tile__title,
.card__title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--navy);
}

.card__title {
  font-size: 15px;
}

.tile__specs,
.card__specs {
  display: none;
}

.spec-line {
  display: flex;
  justify-content: space-between;
  gap: var(--s-sm);
  font-size: 12px;
  padding-block: 3px;
  border-top: 1px solid var(--line);
  color: var(--fg-subtle);
}

.spec-line b {
  font-weight: 600;
  color: var(--fg-muted);
  text-align: end;
}

.tile__foot,
.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xs);
  min-height: 40px;
  margin-top: auto;
  padding-inline: var(--s-md);
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

.tile:hover .tile__foot,
.card:hover .card__foot {
  color: var(--accent);
}

[dir="rtl"] .tile__foot svg,
[dir="rtl"] .card__foot svg,
[dir="rtl"] .link-arrow svg,
[dir="rtl"] .crumb svg {
  transform: scaleX(-1);
}

/* ---------- data band ---------- */

.data-band {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
  background: #fff;
}

.band--stats {
  padding-block: 14px;
}

.data-cell {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  border-inline-end: 1px solid var(--line);
}

.data-cell:nth-child(2n) {
  border-inline-end: 0;
}

.data-cell:nth-child(n + 3) {
  border-bottom: 0;
}

.data-figure {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.data-num {
  font-family: var(--font-sans);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

.data-unit {
  display: inline-block;
  margin-top: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.data-label {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--fg-subtle);
}

@media (min-width: 480px) {
  .data-cell {
    padding: 14px 16px;
  }
  .data-num {
    font-size: 26px;
  }
  .data-label {
    font-size: 12px;
  }
}

@media (min-width: 1024px) {
  .band--stats {
    padding-block: 18px;
  }
  .data-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .data-cell {
    border-bottom: 0;
    border-inline-end: 1px solid var(--line);
    padding: 16px 20px;
  }
  .data-cell:nth-child(2n) {
    border-inline-end: 1px solid var(--line);
  }
  .data-cell:last-child {
    border-inline-end: 0;
  }
  .data-num {
    font-size: 30px;
  }
  .data-label {
    font-size: 12.5px;
  }
}

/* ---------- process steps ---------- */

.steps {
  display: grid;
  gap: var(--s-md);
}

.step {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: #fff;
  padding: var(--s-md);
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--s-sm);
  }
}

/* ---------- quality list ---------- */

.qlist {
  display: grid;
  gap: var(--s-sm);
  border-top: 0;
}

@media (min-width: 768px) {
  .qlist {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.qitem {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-sm);
  padding: var(--s-md);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: #fff;
}

@media (min-width: 768px) {
  .qitem:nth-child(odd),
  .qitem:nth-child(even) {
    padding: var(--s-md);
    border-inline-end: 1px solid var(--line);
  }
}

/* ---------- spec sheet ---------- */

.spec {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: #fff;
  color: var(--fg);
  overflow: hidden;
}

.spec__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-sm);
  padding: 12px var(--s-md);
  background: var(--navy);
  border-bottom: 1px solid var(--navy);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.spec__row {
  display: grid;
  gap: 2px;
  padding: 11px var(--s-md);
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec__row:nth-child(even) {
  background: var(--surface);
}

.spec__row:last-child {
  border-bottom: 0;
}

.spec__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--fg-subtle);
}

.spec__value {
  font-size: 14px;
  color: var(--fg);
}

.spec__value--hi {
  color: var(--accent);
  font-weight: 700;
}

@media (min-width: 768px) {
  .spec__row {
    grid-template-columns: 34% 1fr;
    align-items: baseline;
    min-height: 40px;
    padding-block: 10px;
  }
}

.spec-note {
  margin-top: var(--s-sm);
  font-size: 12px;
  color: var(--fg-subtle);
}

/* ---------- key/value ---------- */

.kv {
  border-top: 1px solid var(--line);
}

.kv__row {
  display: grid;
  grid-template-columns: 40% 1fr;
  gap: var(--s-sm);
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}

.kv__label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-subtle);
}

.kv__value {
  font-size: 14px;
  color: var(--navy);
  font-weight: 500;
}

.kv__value--hi {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- gallery ---------- */

.gallery {
  display: grid;
  gap: var(--s-xs);
}

.gallery__main {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  overflow: hidden;
}

.gallery__main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-xs);
}

.gallery__thumb {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--surface);
  padding: 0;
  overflow: hidden;
}

.gallery__thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery__thumb[aria-pressed="true"] {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

/* ---------- tabs ---------- */

.tabs {
  display: flex;
  gap: var(--s-xs);
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 44px;
  padding-inline: var(--s-md);
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted);
  white-space: nowrap;
  transition: color 160ms linear, border-color 160ms linear, background-color 160ms linear;
}

.tab:hover {
  color: var(--navy);
  background: var(--surface);
}

.tab[aria-selected="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--accent-wash);
}

/* ---------- accordion ---------- */

.acc {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
  background: #fff;
}

.acc__row {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.acc__row:last-child {
  border-bottom: 0;
}

.acc__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-md);
  width: 100%;
  min-height: 56px;
  padding: var(--s-md);
  text-align: start;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--navy);
}

.acc__row[data-open="true"] .acc__q {
  color: var(--accent);
}

.acc__icon {
  flex: none;
  color: var(--fg-subtle);
  transition: transform 220ms var(--ease);
}

.acc__row[data-open="true"] .acc__icon {
  transform: rotate(45deg);
  color: var(--accent);
}

.acc__a {
  padding: 0 var(--s-md) var(--s-md);
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-muted);
  max-width: 76ch;
}

/* ---------- breadcrumb ---------- */

.crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  font-size: 13.5px;
  color: var(--fg-muted);
}

.crumb a:hover {
  color: var(--accent);
}

.crumb__sep {
  color: var(--line-strong);
  font-size: 12px;
}

.crumb__now {
  font-weight: 600;
  color: var(--navy);
}

/* ---------- forms ---------- */

.form {
  display: grid;
  gap: var(--s-md);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: var(--s-lg);
  box-shadow: var(--shadow-card);
}

@media (min-width: 768px) {
  .form {
    padding: var(--s-xl);
  }
}

.form__grid {
  display: grid;
  gap: var(--s-md);
}

@media (min-width: 768px) {
  .form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field--full {
  grid-column: 1 / -1;
}

.label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fg-muted);
}

.label span {
  color: var(--accent);
}

.input,
.textarea,
.select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 160ms linear, box-shadow 160ms linear;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--fg-subtle);
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(230, 0, 18, 0.18);
  outline-offset: 0;
}

.textarea {
  min-height: 118px;
  resize: vertical;
}

.field[data-invalid="true"] .input,
.field[data-invalid="true"] .textarea {
  border-color: var(--danger);
  background: var(--danger-wash);
}

.err {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--danger);
}

.banner {
  display: flex;
  align-items: flex-start;
  gap: var(--s-xs);
  padding: var(--s-sm) var(--s-md);
  border: 1px solid var(--danger);
  border-radius: var(--r-xs);
  background: var(--danger-wash);
  font-size: 14px;
  color: var(--fg);
}

.form__done {
  display: grid;
  gap: var(--s-sm);
  padding: var(--s-lg);
  background: var(--success-wash);
  border: 1px solid #b7ebc9;
  border-radius: var(--r-xs);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.form__helper {
  font-size: 12px;
  color: var(--fg-subtle);
  line-height: 1.6;
}

/* ---------- quote bar ---------- */

.quotebar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: var(--s-xs);
  min-height: var(--quote-h);
  padding: var(--s-xs) var(--s-md);
  padding-bottom: calc(var(--s-xs) + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(19, 40, 67, 0.08);
}

.quotebar .btn--primary {
  flex: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  color: var(--navy);
  background: #fff;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (min-width: 1024px) {
  .quotebar {
    display: none;
  }
}

/* ---------- footer ---------- */

.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--s-2xl);
}

.footer .p-sm,
.footer .p,
.footer .footer__link {
  color: rgba(255, 255, 255, 0.72);
}

.footer .brand__name,
.footer .brand__sub {
  color: #fff;
}

.footer__grid {
  display: grid;
  gap: var(--s-xl);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .footer__grid {
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--s-3xl);
  }
}

.footer__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--s-sm);
}

.footer__link {
  display: flex;
  align-items: center;
  min-height: 38px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms linear;
}

.footer__link:hover {
  color: #fff;
}

.footer .data {
  color: rgba(255, 255, 255, 0.9);
}

.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  margin-top: var(--s-xl);
  padding-top: var(--s-md);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- sidebar tree ---------- */

.side-tree {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: #fff;
  overflow: hidden;
}

.side-tree__head {
  padding: 13px var(--s-md);
  background: var(--navy);
  border-bottom: 1px solid var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.side-tree__group {
  border-bottom: 1px solid var(--line);
}

.side-tree__group:last-child {
  border-bottom: 0;
}

.side-tree__parent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xs);
  min-height: 44px;
  padding-inline: var(--s-md);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
}

.side-tree__parent:hover {
  color: var(--accent);
}

.side-tree__parent[aria-current="true"] {
  background: var(--accent-wash);
  color: var(--accent);
  border-inline-start: 3px solid var(--accent);
}

.side-tree__child {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding-inline: var(--s-lg) var(--s-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--fg-muted);
  border-inline-start: 3px solid transparent;
}

.side-tree__child:hover {
  color: var(--accent);
  background: var(--surface);
}

.side-tree__child[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
  border-inline-start-color: var(--accent);
}

/* ---------- product family strip (narrow screens) ---------- */

.fam-strip {
  display: none;
}

@media (max-width: 1023px) {
  .with-side {
    display: block;
  }
  .side-tree {
    display: none !important;
  }
  .fam-strip {
    display: block;
    position: sticky;
    top: var(--header-h);
    z-index: 30;
    margin-inline: calc(var(--gutter) * -1);
    margin-bottom: var(--s-md);
    padding: 8px var(--gutter);
    background: #fff;
    border-block: 1px solid var(--line);
  }
  .fam-strip__row {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block: 2px;
  }
  .fam-strip__row::-webkit-scrollbar {
    display: none;
  }
  .fam-strip__row--sub {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
  }
  .fam-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding-inline: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy);
    white-space: nowrap;
  }
  .fam-chip.is-current {
    background: var(--navy);
    border-color: var(--navy);
    color: #fff;
  }
  .fam-chip--sub {
    min-height: 32px;
    padding-inline: 11px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--fg-muted);
    background: var(--surface);
    border-color: var(--line);
  }
  .fam-chip--sub.is-current {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-weight: 600;
  }
}

/* ---------- door-style gallery ---------- */

.door-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 768px) {
  .door-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 1200px) {
  .door-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.door-grid__item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  cursor: zoom-in;
  -webkit-appearance: none;
  appearance: none;
}

.door-grid__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 320ms var(--ease);
}

.door-grid__item:hover img {
  transform: scale(1.03);
}

.door-grid__item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.xa-lightbox {
  position: fixed;
  inset: 0;
  /* Above the WordPress admin bar (z-index 99999) so its close button is never
     covered while an administrator is logged in. */
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 27, 48, 0.94);
}

.xa-lightbox[hidden] {
  display: none;
}

.xa-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 86vh;
  width: auto;
  height: auto;
  background: #fff;
  box-shadow: var(--shadow-float);
}

body.xa-layout .xa-lightbox .xa-lightbox__close {
  background-color: rgba(11, 27, 48, 0.6) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  color: #fff !important;
}

.xa-lightbox .xa-lightbox__close {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: rgba(11, 27, 48, 0.6);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

/* ---------- misc ---------- */

.media-frame {
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--surface);
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption-plate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-xs);
  padding: 8px var(--s-sm);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--r-xs) var(--r-xs);
  font-size: 11px;
  color: var(--fg-subtle);
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-sm);
}

@media (min-width: 768px) {
  .mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.notfound {
  display: grid;
  place-content: center;
  gap: var(--s-md);
  min-height: 54vh;
  text-align: center;
  padding-block: var(--s-3xl);
}

.notfound .rule-block {
  justify-content: center;
}

.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 400ms var(--ease), transform 400ms var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  padding: var(--s-xs) var(--s-md);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
}

.skip:focus {
  inset-inline-start: 0;
}

/* ---------- RTL / multilingual ---------- */

[dir="rtl"] body,
[lang="ar"] body {
  font-family: var(--font-arabic);
  line-height: 1.85;
}

[lang="ar"] .eyebrow,
[lang="ar"] .label,
[lang="ar"] .btn,
[lang="ar"] .tab,
[lang="ar"] .brand__name,
[lang="ar"] .tile__title,
[lang="ar"] .card__title,
[lang="ar"] .acc__q,
[lang="ar"] .h-hero,
[lang="ar"] .h-section,
[lang="ar"] .h-lg,
[lang="ar"] .h-md,
[lang="ar"] .h-sm,
[lang="ar"] .nav__link {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  text-transform: none;
}

[lang="ar"] .mono,
[lang="ar"] .data-num,
[lang="ar"] .data,
[lang="ar"] .kv__value,
[lang="ar"] .spec__value {
  font-family: var(--font-mono);
}

main {
  display: block;
  padding-bottom: calc(var(--quote-h) + 8px);
}

@media (min-width: 1024px) {
  main {
    padding-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- navigation fit ---------- */

.nav {
  flex-wrap: nowrap;
}

.nav__link {
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 1439px) {
  .nav__link {
    font-size: 13.5px;
    padding-inline: 8px;
  }
  .brand__name {
    font-size: 17px;
  }
}

@media (max-width: 1199px) {
  .nav__link {
    font-size: 12.5px;
    padding-inline: 6px;
    gap: 3px;
  }
  .nav__cta {
    padding-inline: var(--s-sm);
  }
}

/* ---------- navigation fit (final) ---------- */

.header__inner {
  flex-wrap: nowrap;
  gap: var(--s-sm);
}

.nav {
  min-width: 0;
}

.nav__link {
  font-size: 12.5px;
  padding-inline: 6px;
  letter-spacing: 0;
}

.nav__item .nav__link svg {
  width: 12px;
  height: 12px;
}

@media (min-width: 1500px) {
  .nav__link {
    font-size: 13.5px;
    padding-inline: 9px;
  }
}

/* About Us and Contact Us move to the footer / drawer below this width */
@media (max-width: 1319px) {
  .nav .nav__item:nth-last-child(-n + 2) {
    display: none;
  }
}

@media (max-width: 1179px) {
  .nav .nav__item:nth-last-child(-n + 3) {
    display: none;
  }
}

/* ---------- mobile hero / header CTA / footer clearance ---------- */

.hero {
  position: relative;
}

.hero__media {
  height: 40vh;
  min-height: 220px;
  max-height: 340px;
}

.hero__plate {
  position: relative;
  z-index: 1;
}

/* keep a red action reachable in the mobile header */
.nav__cta {
  display: inline-flex;
  min-height: 36px;
  padding-inline: 10px;
  font-size: 12px;
  letter-spacing: 0;
}

@media (max-width: 479px) {
  .brand__sub {
    display: none;
  }
  .brand__name {
    font-size: 16px;
  }
  .brand__mark {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

@media (min-width: 1024px) {
  .hero__media {
    height: 66vh;
    min-height: 520px;
    max-height: 680px;
  }
  .hero__plate {
    position: absolute;
    inset: 0;
  }
  .nav__cta {
    min-height: 44px;
    padding-inline: var(--s-md);
    font-size: 13px;
  }
}

/* fixed quote bar must not cover the legal line */
@media (max-width: 1023px) {
  .footer {
    padding-bottom: calc(var(--quote-h) + var(--s-2xl));
  }
}

/* ---------- WordPress integration ---------- */

[hidden] {
  display: none !important;
}

.nav__item > .mega {
  display: none;
}

.nav__item:hover > .mega,
.nav__item:focus-within > .mega {
  display: grid;
}

/* ---------- WordPress admin bar offsets ---------- */

.admin-bar .header,
.admin-bar .drawer {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .header,
  .admin-bar .drawer {
    top: 46px;
  }
}

@media (max-width: 1023px) {
  .admin-bar .fam-strip {
    top: calc(var(--header-h) + 32px);
  }
}

@media (max-width: 782px) {
  .admin-bar .fam-strip {
    top: calc(var(--header-h) + 46px);
  }
}

.prose h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
  margin: 32px 0 12px;
}

.prose h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--navy);
  margin: 24px 0 8px;
}

.prose p {
  margin-bottom: 14px;
}

.prose ul {
  list-style: disc;
  padding-inline-start: 22px;
  margin-bottom: 16px;
  color: var(--fg-muted);
}

.prose li {
  margin-bottom: 6px;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r-xs);
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
}

/* mobile: nav is hidden, drawer takes over */
@media (max-width: 1023px) {
  .nav {
    display: none;
  }
}

/* GTranslate renders a plain select/link list; keep it inline with the top bar */
.lang .gtranslate_wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang .gtranslate_wrapper a,
.lang .gtranslate_wrapper select {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

/* ---------- product page: headline facts ---------- */

.factbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fact {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 96px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}

.fact__k {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.fact__v {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
}

/* ---------- product page: specification sheet ---------- */

.specsheet {
  background: #fff;
  border: 1px solid var(--line);
}

.specsheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-sm);
  padding: 11px 16px;
  background: var(--navy);
  color: #fff;
}

.specsheet__title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specsheet__meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.78);
}

.specgroup + .specgroup {
  border-top: 1px solid var(--line);
}

.specgroup__title {
  margin: 0;
  padding: 14px 18px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.specgroup__list {
  margin: 0;
}

.specrow {
  display: grid;
  grid-template-columns: minmax(130px, 36%) 1fr;
  gap: var(--s-md);
  padding: 10px 18px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.specrow:nth-child(even) {
  background: #fbfcfd;
}

.specrow__k {
  margin: 0;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.5;
  color: #475569;
}

.specrow__v {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.55;
  color: var(--navy);
}

.specrow__v--hi {
  color: var(--accent);
}

.specchip {
  display: inline-block;
  margin: 0 6px 4px 0;
  padding: 3px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
}

.specsheet__foot {
  margin: 0;
  padding: 13px 18px;
  font-size: 13px;
  line-height: 1.6;
  color: #475569;
  border-top: 1px solid var(--line);
}

@media (max-width: 620px) {
  .specrow {
    grid-template-columns: 1fr;
    gap: 2px;
    padding: 10px 14px;
  }
  .specrow__k {
    font-size: 11.5px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
  .specrow__v {
    font-size: 14px;
  }
}

@media print {
  .specsheet {
    break-inside: avoid;
  }
}

/* Group headings must stay small caps even though the parent theme styles h3. */

body.xa-layout .specsheet .specgroup__title {
  margin: 0 !important;
  padding: 14px 16px 6px 19px !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  color: var(--accent) !important;
  border-inline-start: 3px solid var(--accent);
}

body.xa-layout .specsheet .specgroup__title::before {
  content: none !important;
}

/* ---------- Door Customization Notice Box ---------- */
.custom-notice-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-inline-start: 4px solid var(--c-primary, #b91c1c);
  border-radius: 4px;
  margin-bottom: var(--s-md);
}

.custom-notice-box__badge {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-primary, #b91c1c);
  background: #fee2e2;
  padding: 3px 10px;
  border-radius: 3px;
}

.custom-notice-box__body {
  font-size: 14.5px;
  line-height: 1.65;
  color: #334155;
}

.custom-notice-box__body strong {
  font-size: 15px;
  color: var(--navy, #0f172a);
}

/* ---------- Redesigned All Doors Portfolio Grid ---------- */
.doors-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-md);
  margin-top: var(--s-md);
}

.door-series-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.door-series-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

.door-series-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #f1f5f9;
  overflow: hidden;
}

.door-series-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.door-series-card:hover .door-series-card__media img {
  transform: scale(1.03);
}

.door-series-card__count {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #fff;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}

.door-series-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
  gap: 8px;
}

.door-series-card__title {
  margin: 0;
  font-size: 17.5px;
  font-weight: 700;
  color: var(--navy, #0f172a);
}

.door-series-card__sub {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #64748b;
  flex: 1;
}

.door-series-card__features {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.door-series-card__feature {
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
}

.door-series-card__feature::before {
  content: "✓";
  color: var(--c-primary, #b91c1c);
  font-weight: bold;
}

.door-series-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  background: #f8fafc;
  border-top: 1px solid #f1f5f9;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-primary, #b91c1c);
}

@media (max-width: 960px) {
  .doors-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .doors-portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Category Overview Box (Relocated below Technical Specs) ---------- */
.category-overview-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 18px 22px;
  margin-top: var(--s-md);
  margin-bottom: var(--s-md);
}

.category-overview-box__title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy, #0f172a);
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;
}

.category-overview-box__desc {
  font-size: 14.5px;
  line-height: 1.68;
  color: #334155;
  margin: 0 0 12px 0;
}

.category-overview-box__chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.category-overview-box__chips .specchip {
  font-size: 12.5px;
  padding: 4px 12px;
  background: #ffffff;
  border-radius: 4px;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  font-weight: 500;
}
