:root {
  --bg: #f4efe6;
  --surface: #fff9f1;
  --surface-strong: #fff;
  --ink: #162126;
  --muted: #5d696d;
  --line: rgba(22, 33, 38, 0.12);
  --brand: #da5f1f;
  --brand-deep: #ab4310;
  --steel: #24343d;
  --accent: #f2c97d;
  --shadow: 0 22px 60px rgba(19, 26, 30, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(242, 201, 125, 0.4), transparent 28%),
    linear-gradient(180deg, #f0eadf 0%, #f9f6f0 50%, #efe8dc 100%);
}

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

a:hover {
  text-decoration: none;
}

p,
li {
  color: var(--muted);
  line-height: 1.65;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 18px auto 40px;
}

.topbar,
.header,
.hero,
.metrics,
.section,
.cta-band,
.footer,
.category-hero {
  border: 1px solid var(--line);
  background: rgba(255, 249, 241, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 22px;
  border-radius: 18px;
  margin-bottom: 16px;
  font-size: 14px;
}

.topbar a {
  color: var(--brand-deep);
  font-weight: 700;
}

.topbar .email-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(171, 67, 16, 0.24);
  border-radius: 999px;
  background: rgba(218, 95, 31, 0.1);
  white-space: nowrap;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.topbar .email-link:hover,
.topbar .email-link:focus-visible {
  color: #fff;
  background: var(--brand-deep);
  transform: translateY(-1px);
}

.topbar .email-link:focus-visible {
  outline: 3px solid rgba(242, 201, 125, 0.8);
  outline-offset: 2px;
}

.topbar a[href="./zh-cn.html"],
.footer-links a[href="./zh-cn.html"],
.topbar a[href="./ru.html"],
.footer-links a[href="./ru.html"],
.topbar a[href="./es.html"],
.footer-links a[href="./es.html"],
.topbar a[href="./fr.html"],
.footer-links a[href="./fr.html"],
.topbar a[href="./ar.html"],
.footer-links a[href="./ar.html"] {
  font-size: 0;
}

.topbar a[href="./zh-cn.html"]::after,
.footer-links a[href="./zh-cn.html"]::after {
  content: "Chinese";
  font-size: 14px;
}

.topbar a[href="./ru.html"]::after,
.footer-links a[href="./ru.html"]::after {
  content: "Russian";
  font-size: 14px;
}

.topbar a[href="./es.html"]::after,
.footer-links a[href="./es.html"]::after {
  content: "Spanish";
  font-size: 14px;
}

.topbar a[href="./fr.html"]::after,
.footer-links a[href="./fr.html"]::after {
  content: "French";
  font-size: 14px;
}

.topbar a[href="./ar.html"]::after,
.footer-links a[href="./ar.html"]::after {
  content: "Arabic";
  font-size: 14px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-radius: 24px;
  position: sticky;
  top: 16px;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: block;
  overflow: hidden;
  font-size: 0;
  background: url("./images/branding/top-excavator-parts-logo.png") center / contain no-repeat;
}

.brand strong,
.section h2,
.hero h1,
.category-hero h1,
.panel-card h2,
.cta-band h2 {
  color: var(--ink);
}

.brand small {
  display: block;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 24px;
  font-weight: 600;
}

.hero,
.split-layout,
.split-section {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 32px;
}

.hero {
  padding: 40px;
  border-radius: 34px;
  margin-top: 18px;
  overflow: hidden;
  position: relative;
}

.hero::after,
.category-hero::after {
  content: "";
  position: absolute;
  inset: auto -20% -35% auto;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(218, 95, 31, 0.22), transparent 62%);
  pointer-events: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 12px;
  font-weight: 800;
  color: var(--brand-deep);
  margin-bottom: 12px;
}

.hero h1,
.category-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.02;
  max-width: 10ch;
}

.lead {
  font-size: 1.1rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 24px 0 28px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
}

.button.primary {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
}

.button.secondary {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.64);
}

.button.wide {
  width: 100%;
}

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .nav,
[dir="rtl"] .topbar,
[dir="rtl"] .footer-links,
[dir="rtl"] .brand-cloud,
[dir="rtl"] .hero-actions,
[dir="rtl"] .button-row {
  direction: rtl;
}

[dir="rtl"] .hero-points li,
[dir="rtl"] .bullet-list li {
  padding-left: 0;
  padding-right: 22px;
}

.hero-points,
.bullet-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-points li,
.bullet-list li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 10px;
}

.hero-points li::before,
.bullet-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  position: absolute;
  left: 0;
  top: 9px;
}

[dir="rtl"] .hero-points li,
[dir="rtl"] .bullet-list li {
  padding-left: 0;
  padding-right: 22px;
}

[dir="rtl"] .hero-points li::before,
[dir="rtl"] .bullet-list li::before {
  left: auto;
  right: 0;
}

.hero-panel {
  display: flex;
  align-items: stretch;
}

.panel-card,
.copy-card {
  width: 100%;
  border-radius: 28px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(36, 52, 61, 0.98), rgba(25, 37, 43, 0.98)),
    var(--steel);
  color: #f7efe0;
}

.panel-card h2,
.panel-card label,
.copy-card h3 {
  color: #fff3de;
}

.panel-label {
  color: #f2c97d;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-hero .hero-points li::before {
  background: #e4a72c;
  box-shadow: 0 0 0 4px rgba(228, 167, 44, 0.16);
}

.contact-card {
  color: var(--ink);
  border: 1px solid rgba(171, 67, 16, 0.16);
  background:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.38), transparent 34%),
    linear-gradient(145deg, #f4cf7e, #e7ab37);
  box-shadow: 0 22px 52px rgba(126, 82, 18, 0.22);
}

.contact-card h2,
.contact-card .panel-label,
.contact-card p,
.contact-card a {
  color: var(--ink);
}

.contact-card .panel-label {
  color: #71330f;
}

.contact-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 136px;
  gap: 18px;
  align-items: start;
}

.contact-details {
  margin-top: 6px;
}

.contact-details p {
  margin: 12px 0;
}

.contact-details a:not(.button) {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-card .button.secondary {
  color: #fff9f1;
  border-color: var(--steel);
  background: var(--steel);
}

.whatsapp-qr {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 249, 241, 0.9);
  box-shadow: 0 12px 28px rgba(83, 55, 15, 0.16);
}

.whatsapp-qr img {
  display: block;
  width: 116px;
  height: 116px;
  border-radius: 8px;
}

.whatsapp-qr span {
  color: var(--steel);
  font-size: 12px;
  font-weight: 800;
}

.quote-form {
  display: grid;
  gap: 16px;
}

.quote-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.quote-form input,
.quote-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: white;
  background: rgba(255, 255, 255, 0.06);
}

.quote-form input::placeholder,
.quote-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.58);
}

.form-note {
  margin: 0;
  font-size: 14px;
  color: rgba(247, 239, 224, 0.72);
}

.contact-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: -2px;
  font-size: 13px;
  color: rgba(247, 239, 224, 0.78);
}

.contact-fallback a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: #fff3de;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.contact-fallback.is-visible {
  padding-top: 2px;
}

.metrics {
  margin-top: 18px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  border-radius: 24px;
}

.metric-card {
  position: relative;
  display: block;
  padding: 14px 18px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.56);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
}

.metric-card:hover,
.metric-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(218, 95, 31, 0.34);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 14px 30px rgba(19, 26, 30, 0.1);
}

.metric-card:focus-visible {
  outline: 3px solid rgba(242, 201, 125, 0.82);
  outline-offset: 2px;
}

.metric-card span {
  display: block;
  padding-right: 24px;
  color: var(--ink);
  line-height: 1.35;
}

.metric-card small {
  display: inline-block;
  margin-top: 10px;
  color: var(--brand-deep);
  font-weight: 800;
}

.metric-card small::after {
  content: " \2192";
}

.metrics strong {
  display: block;
  font-size: 2rem;
  color: var(--steel);
}

.section,
.cta-band,
.category-hero {
  margin-top: 18px;
  padding: 34px;
  border-radius: 30px;
}

.section-heading {
  max-width: 70ch;
  margin-bottom: 24px;
}

.card-grid,
.resource-list,
.three-up {
  display: grid;
  gap: 18px;
}

.card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.category-card,
.resource-card,
.faq-item,
.three-up article,
.copy-block,
.image-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.category-card h3,
.resource-card h3,
.faq-item h3,
.copy-block h2,
.three-up h3 {
  margin-top: 0;
}

.card-link {
  display: block;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.card-link:hover {
  transform: translateY(-4px);
  border-color: rgba(218, 95, 31, 0.35);
  box-shadow: 0 18px 40px rgba(19, 26, 30, 0.1);
}

.card-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}

.card-meta {
  display: inline-flex;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--steel);
  background: rgba(36, 52, 61, 0.08);
  font-size: 13px;
  font-weight: 700;
}

.tag {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(218, 95, 31, 0.1);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(160px, 0.8fr) minmax(160px, 0.8fr);
  gap: 14px;
  margin: 0 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 249, 241, 0.82)),
    var(--surface);
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--steel);
  font-weight: 800;
}

.filter-bar span {
  font-size: 13px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
}

.empty-state {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px;
  border: 1px dashed rgba(218, 95, 31, 0.42);
  border-radius: 20px;
  color: var(--brand-deep);
  background: rgba(218, 95, 31, 0.08);
  font-weight: 700;
}

.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.brand-chip {
  display: inline-flex;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(36, 52, 61, 0.08);
  border: 1px solid var(--line);
  font-weight: 700;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.brand-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(218, 95, 31, 0.35);
  background: rgba(218, 95, 31, 0.08);
}

.dark-panel {
  background:
    linear-gradient(135deg, rgba(28, 41, 47, 0.98), rgba(19, 27, 31, 0.98)),
    var(--steel);
}

.dark-panel .section-heading p,
.dark-panel .three-up p,
.dark-panel .three-up h3,
.section-heading.light h2 {
  color: #f6ede0;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.three-up article {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.resource-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.resource-card p:last-child {
  margin-bottom: 0;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item p {
  margin-bottom: 0;
}

.cta-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 26px 28px;
  border-radius: 28px;
  margin-top: 18px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.crumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 24px;
  color: var(--muted);
}

.split-layout {
  align-items: start;
}

.copy-block,
.copy-card {
  height: 100%;
}

.copy-block pre {
  overflow-x: auto;
  margin: 16px 0 0;
  padding: 18px;
  border-radius: 18px;
  color: #f7efe0;
  background: var(--steel);
  white-space: pre-wrap;
}

.copy-block code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
}

.image-section {
  overflow: hidden;
}

.image-card {
  padding: 12px;
}

.feature-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.image-split {
  align-items: center;
}

.detail-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 24px;
  align-items: start;
}

.detail-panel,
.spec-table {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.76);
  padding: 22px;
}

.spec-table table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table th,
.spec-table td {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.spec-table th {
  width: 36%;
  color: var(--ink);
}

.info-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

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

@media (max-width: 980px) {
  .header,
  .hero,
  .split-layout,
  .split-section,
  .detail-grid,
  .cta-band,
  .footer {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav,
  .topbar {
    flex-wrap: wrap;
  }

  .metrics,
  .card-grid,
  .card-grid.compact,
  .filter-bar,
  .mini-grid,
  .resource-list,
  .three-up {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .site-shell {
    width: min(100% - 18px, 100%);
    margin: 10px auto 24px;
  }

  .header,
  .hero,
  .section,
  .cta-band,
  .footer,
  .category-hero {
    padding: 22px;
  }

  .hero h1,
  .category-hero h1 {
    max-width: none;
    font-size: 2.3rem;
  }

  .metrics,
  .card-grid,
  .card-grid.compact,
  .filter-bar,
  .mini-grid,
  .resource-list,
  .three-up {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-mark {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .contact-card-head {
    grid-template-columns: 1fr;
  }

  .whatsapp-qr {
    width: min(100%, 180px);
  }

  .whatsapp-qr img {
    width: 146px;
    height: 146px;
  }
}
