:root {
  --nw-red: #c92f35;
  --nw-red-strong: #9f1f25;
  --nw-red-soft: #fff1f2;
  --nw-gold: #efc54a;
  --nw-ink: #17202d;
  --nw-text: #384253;
  --nw-muted: #687384;
  --nw-line: #e4e8ee;
  --nw-soft: #f5f7fa;
  --nw-surface: #ffffff;
  --nw-dark: #182231;
  --nw-radius-sm: 12px;
  --nw-radius-md: 18px;
  --nw-radius-lg: 28px;
  --nw-shadow-sm: 0 8px 24px rgba(23, 32, 45, .07);
  --nw-shadow-md: 0 20px 54px rgba(23, 32, 45, .11);
  --nw-container: min(1240px, calc(100% - 40px));
  --nw-font: "Vazirmatn", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
html, body { max-width: 100%; overflow-x: clip; }
body {
  min-height: 100dvh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--nw-surface);
  color: var(--nw-ink);
  font-family: var(--nw-font);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body > main,
body > .site-main,
body > section:first-of-type { flex: 0 0 auto; }
.site-main,
body > main { width: 100%; min-height: 50vh; }
.site-footer { margin-top: auto; }
img, svg, video { max-width: 100%; }
img { display: block; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }
button, [role="button"], a { touch-action: manipulation; }
button { cursor: pointer; }
a { text-underline-offset: .18em; }

::selection { background: rgba(201, 47, 53, .18); color: var(--nw-ink); }
:focus-visible {
  outline: 3px solid rgba(201, 47, 53, .35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 9999;
  transform: translateY(-140%);
  padding: 11px 16px;
  border-radius: 10px;
  background: var(--nw-dark);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: transform .2s ease;
}
.skip-link:focus { transform: translateY(0); }

.nw-container { width: var(--nw-container); margin-inline: auto; }
.nw-section { padding: clamp(58px, 7vw, 96px) 0; }
.nw-section-heading { max-width: 760px; margin-bottom: 28px; }
.nw-section-heading--center { margin-inline: auto; text-align: center; }
.nw-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--nw-red);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nw-eyebrow::before { content: ""; width: 34px; height: 3px; border-radius: 99px; background: linear-gradient(90deg, var(--nw-red), var(--nw-gold)); }
.nw-title { margin: 10px 0 12px; font-size: clamp(2rem, 4.4vw, 4rem); line-height: 1.18; letter-spacing: -.035em; }
.nw-lead { margin: 0; color: var(--nw-muted); font-size: clamp(.98rem, 1.4vw, 1.12rem); line-height: 2; }

.nw-button,
.product-primary-button,
.product-secondary-button,
.product-pdf-button,
.catalog-download-button,
.catalog-primary-action,
.shop-search button,
.home-primary-action,
.home-secondary-action {
  min-height: 52px;
  min-width: 52px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 850;
  font-size: .95rem;
  text-decoration: none;
  line-height: 1.25;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}
.nw-button:hover,
.product-primary-button:hover,
.product-secondary-button:hover,
.product-pdf-button:hover,
.catalog-download-button:hover,
.catalog-primary-action:hover,
.shop-search button:hover,
.home-primary-action:hover,
.home-secondary-action:hover { transform: translateY(-2px); }

/* Shared catalogue-style technical tables */
.catalog-spec-section,
.product-spec-group,
.product-legacy-table-card {
  margin: 24px 0;
  padding: clamp(16px, 2.5vw, 26px);
  border: 1px solid var(--nw-line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--nw-shadow-sm);
}
.catalog-spec-heading,
.product-spec-group-title { margin-bottom: 14px; }
.catalog-spec-heading h3,
.product-spec-group-title h3 { margin: 0; color: var(--nw-ink); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.catalog-spec-heading p,
.product-spec-group-title p { margin: 5px 0 0; color: var(--nw-muted); font-size: .82rem; }
.catalog-table-wrap,
.product-table-scroll {
  width: 100%;
  overflow: auto;
  margin-top: 14px;
  border: 1px solid var(--nw-line);
  border-radius: 15px;
  background: #fff;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}
.catalog-spec-table,
.catalog-model-table,
.product-spec-table,
.product-legacy-spec-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  color: var(--nw-text);
  font-size: .82rem;
}
.catalog-spec-table th,
.catalog-spec-table td,
.catalog-model-table th,
.catalog-model-table td,
.product-spec-table th,
.product-spec-table td,
.product-legacy-spec-table th,
.product-legacy-spec-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--nw-line);
  border-inline-end: 1px solid var(--nw-line);
  text-align: start;
  vertical-align: middle;
}
.catalog-spec-table thead th,
.catalog-model-table thead th,
.product-spec-table thead th,
.product-legacy-spec-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #232e3e;
  color: #fff;
  font-weight: 900;
  white-space: nowrap;
}
.catalog-spec-table thead th:first-child,
.product-spec-table thead th:first-child,
.product-legacy-spec-table thead th:first-child { min-width: 210px; background: var(--nw-red-strong); }
.catalog-spec-table tbody td:first-child,
.product-spec-table tbody td:first-child,
.product-legacy-spec-table tbody th {
  min-width: 210px;
  background: #f7f8fa;
  color: var(--nw-ink);
  font-weight: 850;
}
.product-legacy-spec-table { min-width: 0; }
.product-legacy-spec-table tbody th { width: 34%; }
.catalog-spec-table tr:last-child td,
.catalog-model-table tr:last-child td,
.product-spec-table tr:last-child td,
.product-legacy-spec-table tr:last-child td,
.product-legacy-spec-table tr:last-child th { border-bottom: 0; }
.catalog-spec-table th:last-child,
.catalog-spec-table td:last-child,
.catalog-model-table th:last-child,
.catalog-model-table td:last-child,
.product-spec-table th:last-child,
.product-spec-table td:last-child,
.product-legacy-spec-table th:last-child,
.product-legacy-spec-table td:last-child { border-inline-end: 0; }
.catalog-spec-table tbody tr:hover td,
.product-spec-table tbody tr:hover td,
.product-legacy-spec-table tbody tr:hover td,
.product-legacy-spec-table tbody tr:hover th { background: #fff9f9; }
.catalog-same-value,
.same-value { text-align: center !important; background: #f3f5f8 !important; color: var(--nw-ink); font-weight: 800; }

@media (max-width: 760px) {
  :root { --nw-container: min(100% - 24px, 1240px); }
  body { font-size: 15px; }
  .nw-section { padding: 52px 0; }
  .nw-title { letter-spacing: -.02em; }
  .nw-button,
  .product-primary-button,
  .product-secondary-button,
  .product-pdf-button,
  .catalog-download-button,
  .catalog-primary-action,
  .shop-search button,
  .home-primary-action,
  .home-secondary-action { min-height: 54px; font-size: 1rem; }
  .catalog-spec-section,
  .product-spec-group,
  .product-legacy-table-card { padding: 14px; border-radius: 16px; }
  .catalog-spec-table,
  .catalog-model-table,
  .product-spec-table { min-width: 620px; font-size: .76rem; }
  .catalog-spec-table th,
  .catalog-spec-table td,
  .product-spec-table th,
  .product-spec-table td { padding: 13px 12px; }
  .product-legacy-spec-table { min-width: 100%; }
  .product-legacy-spec-table tr { display: grid; grid-template-columns: 1fr; }
  .product-legacy-spec-table tbody th,
  .product-legacy-spec-table tbody td { width: 100%; min-width: 0; border-inline-end: 0; }
  .product-legacy-spec-table tbody td { padding-top: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.table-scroll-hint { display: none; margin: 0 0 10px; color: var(--nw-muted); font-size: .78rem; font-weight: 700; }
@media (max-width: 760px) {
  .table-scroll-hint { display: flex; align-items: center; gap: 7px; }
  .table-scroll-hint::before { content: "↔"; color: var(--nw-red); font-size: 1rem; }
}
