:root {
  --ink: #163035;
  --ink-2: #21464b;
  --muted: #5f7477;
  --paper: #fbfdfc;
  --line: #d7e5e4;
  --teal: #0f766e;
  --teal-2: #0b5f67;
  --mint: #dff3ec;
  --steel: #e9f0f3;
  --blue: #1f6f8b;
  --amber: #d59b31;
  --white: #ffffff;
  --shadow: 0 18px 42px rgba(16, 48, 53, .12);
  --radius: 8px;
  --s1: .5rem;
  --s2: .75rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2rem;
  --s6: 3rem;
  --s7: 4.5rem;
  --s8: 6rem;
  --font: Tahoma, "Vazirmatn", "Noto Sans Arabic", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.85;
  font-size: 16px;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
section { scroll-margin-top: 86px; }

.container {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 92%, white);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: var(--s4);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-width: max-content;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--teal);
  border-radius: var(--radius);
}

.brand strong, .brand small { display: block; line-height: 1.35; }
.brand strong { font-size: 1rem; }
.brand small { color: var(--muted); font-size: .78rem; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-inline-start: auto;
}

.site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: .58rem .95rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 700;
}

.site-nav a:hover, .site-nav a.active { color: var(--teal-2); background: var(--mint); }

.nav-cta, .btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .78rem 1.05rem;
  font-weight: 800;
  white-space: nowrap;
}

.nav-cta { color: var(--white); background: var(--ink); }
.btn.primary { color: var(--white); background: var(--amber); box-shadow: 0 10px 24px rgba(213, 155, 49, .22); }
.btn.ghost { color: var(--ink); background: transparent; border-color: var(--line); }
.btn.small { min-height: 42px; padding: .55rem .85rem; font-size: .9rem; }
.menu-toggle { display: none; }

.hero-band {
  padding: var(--s6) 0 var(--s5);
  background:
    linear-gradient(90deg, rgba(15,118,110,.08) 1px, transparent 1px) 0 0 / 34px 34px,
    radial-gradient(circle at 8% 18%, rgba(213,155,49,.12), transparent 28%),
    linear-gradient(180deg, var(--paper), #eef7f4);
}

.hero-grid, .detail-grid, .about-grid, .contact-grid, .map-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .95fr);
  gap: var(--s6);
  align-items: center;
}

.band-grid {
  display: grid;
  grid-template-columns: minmax(82px, .28fr) minmax(0, 1fr) minmax(280px, .86fr);
  gap: var(--s5);
  align-items: center;
}

.hero-copy { padding-block: var(--s4); }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s3);
  color: var(--teal-2);
  font-size: .86rem;
  font-weight: 900;
  letter-spacing: 0;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 2px;
  background: var(--amber);
}

h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  line-height: 1.18;
  letter-spacing: 0;
  max-width: 780px;
}
.hero-copy h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.55rem, 3vw, 2.6rem); line-height: 1.28; }
h3 { font-size: 1.18rem; line-height: 1.45; }
p { color: var(--muted); }
.hero-copy p, .page-hero p, .product-detail-hero p { margin-top: var(--s4); font-size: 1.05rem; max-width: 680px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s4);
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 40px;
  padding: .45rem .75rem;
  color: var(--ink-2);
  background: rgba(255,255,255,.78);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: .9rem;
}

.hero-visual, .detail-image {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s3);
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-visual::before, .detail-image::before {
  content: "";
  position: absolute;
  inset-inline-start: -16px;
  inset-block: 24px;
  width: 6px;
  border-radius: 99px;
  background: repeating-linear-gradient(to bottom, var(--amber) 0 12px, transparent 12px 20px);
}

.machine-ruler {
  position: absolute;
  inset-inline-start: var(--s3);
  inset-block-start: var(--s3);
  display: flex;
  gap: .35rem;
  padding: .45rem;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(215,229,228,.88);
  border-radius: var(--radius);
}

.machine-ruler span {
  width: 8px;
  height: 34px;
  border-inline-start: 2px solid var(--teal-2);
  border-block-end: 2px solid var(--amber);
}

.hero-visual img, .detail-image img, .image-frame img, .gallery-rail img, .gallery-grid img, .about-grid img, .band-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbe9e8, #cbdfe5);
}

.spec-plate {
  position: absolute;
  inset-inline-end: var(--s4);
  inset-block-end: var(--s5);
  display: grid;
  gap: .15rem;
  padding: var(--s3);
  color: var(--white);
  background: rgba(22, 48, 53, .93);
  border-radius: var(--radius);
}
.spec-plate span { font-size: .78rem; color: #bdd5d6; }

.metric-strip { background: var(--ink); color: var(--white); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.14);
}
.metrics-grid div {
  display: grid;
  gap: var(--s1);
  padding: var(--s4);
  background: var(--ink);
}
.metrics-grid strong { color: var(--amber); font-size: 1.55rem; line-height: 1; }
.metrics-grid span { color: #d7e5e4; font-weight: 700; }

.feature-band { padding: var(--s7) 0; }
.band-steel { background: var(--steel); }
.band-white { background: var(--white); }
.band-teal { color: var(--white); background: linear-gradient(135deg, var(--teal-2), #17444b); }
.band-teal p, .band-teal .eyebrow, .band-teal .check-list { color: #e1f2ef; }
.band-gallery { background: #edf8f7; }
.band-map { background: #eef3f6; }
.reverse { direction: ltr; }
.reverse > * { direction: rtl; }

.band-number {
  color: color-mix(in srgb, var(--teal) 34%, transparent);
  font-size: clamp(4.5rem, 12vw, 9rem);
  font-weight: 900;
  line-height: .8;
  font-family: Georgia, "Times New Roman", serif;
}

.band-grid p { margin-top: var(--s3); max-width: 620px; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-height: 38px;
  padding: .45rem .8rem;
  color: var(--teal-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
}

.section-head {
  display: grid;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.inline-head {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
}
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(22, 48, 53, .07);
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--teal) 38%, var(--line));
  box-shadow: 0 18px 34px rgba(22, 48, 53, .12);
}
.image-frame {
  display: block;
  padding: var(--s2);
  background: linear-gradient(135deg, #eff8f5, #d8e6e5);
}
.image-frame img { min-height: 210px; }
.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--s3);
  padding: var(--s4);
}
.card-body h2,
.card-body h3,
.service-grid article h2 {
  font-size: 1.12rem;
  line-height: 1.45;
}
.card-kicker { color: var(--teal); font-size: .82rem; font-weight: 900; }
.card-body p { flex: 1; font-size: .94rem; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s2);
  color: var(--teal-2);
  font-weight: 900;
}
.product-actions { display: flex; gap: var(--s2); margin-top: var(--s3); }
.product-actions .btn { flex: 1; }

.check-list {
  display: grid;
  gap: var(--s2);
  padding: 0;
  margin: var(--s4) 0 0;
  list-style: none;
}
.check-list li { display: flex; align-items: center; gap: var(--s2); font-weight: 800; }

.gallery-rail, .gallery-grid {
  display: grid;
  gap: var(--s4);
}
.gallery-rail { grid-template-columns: repeat(4, 1fr); }
.gallery-grid { grid-template-columns: repeat(3, 1fr); }
figure {
  display: flex;
  flex-direction: column;
  margin: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 100%;
}
figure img { flex: 0 0 auto; }
figcaption {
  display: grid;
  gap: .25rem;
  padding: var(--s3);
  font-weight: 900;
}
figcaption span { color: var(--muted); font-weight: 500; }

.contact-band { padding: var(--s6) 0; background: var(--ink); color: var(--white); }
.contact-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}
.contact-panel p, .contact-panel .eyebrow { color: #d7e5e4; }

.page-hero, .product-detail-hero { padding: var(--s6) 0; background: linear-gradient(180deg, #f6fbfa, var(--white)); }
.page-hero.compact { padding: var(--s5) 0; }
.page-hero .btn { margin-top: var(--s4); }
.about-grid img { box-shadow: var(--shadow); }

.specs-grid, .service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s4);
}
.specs-grid { grid-template-columns: 1.2fr .8fr; }
.spec-card, .service-grid article {
  padding: var(--s5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.spec-card.accent { background: var(--mint); }
dl { display: grid; gap: var(--s2); margin: var(--s4) 0 0; }
dl div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
}
dt { color: var(--muted); }
dd { margin: 0; font-weight: 900; }
.service-grid article { display: grid; gap: var(--s3); }
.service-grid svg { color: var(--teal); width: 2rem; height: 2rem; }

.contact-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
  margin-top: var(--s5);
}
.contact-cards div, .quote-form {
  display: grid;
  gap: var(--s2);
  padding: var(--s4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.contact-cards svg { color: var(--teal); }
.contact-cards span { color: var(--muted); }
.quote-form label, .admin-form label, .admin-login label {
  display: grid;
  gap: .35rem;
  color: var(--ink);
  font-weight: 800;
}
input, textarea {
  width: 100%;
  min-height: 46px;
  padding: .75rem .85rem;
  color: var(--ink);
  font: inherit;
  background: #f8fbfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
textarea { resize: vertical; }
input:focus, textarea:focus, a:focus-visible, button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--amber) 45%, transparent);
  outline-offset: 2px;
}
.form-note {
  padding: var(--s3);
  color: var(--teal-2);
  background: var(--mint);
  border-radius: var(--radius);
  font-weight: 800;
}
.form-note.error { color: #8c231d; background: #ffe8e4; }

.map-panel { grid-template-columns: 1fr 1fr; }
.map-placeholder {
  min-height: 260px;
  display: grid;
  place-items: center;
  gap: var(--s2);
  color: var(--teal-2);
  background: repeating-linear-gradient(45deg, #dfeaed 0 12px, #f8fbfb 12px 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 900;
}
.map-placeholder svg { width: 2.4rem; height: 2.4rem; }

.site-footer {
  padding: var(--s6) 0;
  color: #d7e5e4;
  background: #10282d;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr .8fr 1fr;
  gap: var(--s5);
}
.footer-brand { color: var(--white); font-size: 1.3rem; font-weight: 900; margin-bottom: var(--s2); }
.site-footer h2 { color: var(--white); font-size: 1rem; margin-bottom: var(--s3); }
.site-footer p { color: #bdd5d6; }
.footer-links { display: grid; gap: var(--s2); }
.site-footer section { display: grid; align-content: start; gap: var(--s2); }

.admin-body { background: #eef3f6; }
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: var(--s4);
}
.admin-login form, .admin-card {
  width: min(720px, 100%);
  display: grid;
  gap: var(--s4);
  padding: var(--s5);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s5);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.admin-panel {
  width: min(1120px, calc(100% - 32px));
  display: grid;
  gap: var(--s4);
  margin: var(--s5) auto;
}
.admin-form { display: grid; gap: var(--s3); }
.product-edit { padding: var(--s4); border: 1px solid var(--line); border-radius: var(--radius); }
.check-admin { display: flex !important; align-items: center; }
.check-admin input { width: auto; min-height: auto; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
}
.admin-table th, .admin-table td {
  padding: var(--s2);
  text-align: right;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.admin-table th {
  color: var(--teal-2);
  background: #f4faf9;
}
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
}
.admin-nav a {
  padding: .5rem .85rem;
  color: var(--teal-2);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
  text-decoration: none;
}
.admin-add { margin-bottom: var(--s3); }
.admin-add summary {
  cursor: pointer;
  color: var(--teal);
  font-weight: 800;
  padding: var(--s2) 0;
}
.admin-add[open] summary { margin-bottom: var(--s3); }
.admin-thumb {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.admin-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.btn.danger { color: var(--white); background: #c0392b; }

@media (max-width: 920px) {
  .nav-shell { min-height: 68px; }
  .menu-toggle {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    margin-inline-start: auto;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .site-nav {
    position: absolute;
    inset-block-start: 100%;
    inset-inline: 20px;
    display: none;
    visibility: hidden;
    flex-direction: column;
    align-items: stretch;
    gap: var(--s1);
    padding: var(--s3);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; visibility: visible; }
  .nav-cta { display: none; }
  .hero-grid, .band-grid, .detail-grid, .about-grid, .contact-grid, .map-panel, .specs-grid {
    grid-template-columns: 1fr;
    gap: var(--s4);
  }
  .band-number { order: -2; }
  .band-grid > div:not(.band-number) { order: -1; }
  .product-grid, .catalog-grid, .gallery-rail, .gallery-grid, .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { width: min(100% - 28px, 1120px); }
  .hero-band, .page-hero, .product-detail-hero { padding: var(--s5) 0; }
  .feature-band { padding: var(--s5) 0; }
  .hero-copy { padding-block: 0; }
  .hero-actions, .product-actions, .contact-panel {
    flex-direction: column;
    align-items: stretch;
  }
  .btn { width: 100%; }
  .nav-shell { min-height: 66px; }
  .site-nav a { width: 100%; justify-content: flex-start; }
  .hero-proof { display: grid; grid-template-columns: 1fr; }
  .inline-head { grid-template-columns: 1fr; align-items: start; }
  .product-grid, .catalog-grid, .gallery-rail, .gallery-grid, .service-grid, .contact-cards, .footer-grid {
    grid-template-columns: 1fr;
  }
  .product-card { min-height: auto; }
  .image-frame img { min-height: 190px; }
  .product-actions { flex-direction: column; }
  .product-actions .btn { width: 100%; white-space: nowrap; }
  .product-actions .btn { flex: none; }
  .card-body { padding: var(--s3); }
  .band-number { font-size: 4.5rem; }
  .spec-plate { position: static; margin-top: var(--s3); }
  .machine-ruler { inset-inline-start: var(--s2); inset-block-start: var(--s2); }
  dl div { grid-template-columns: 1fr; gap: .2rem; }
  .site-footer { padding: var(--s5) 0; }
  .admin-table-wrap { overflow: visible; }
  .admin-table, .admin-table thead, .admin-table tbody, .admin-table tr, .admin-table th, .admin-table td {
    display: block;
  }
  .admin-table thead { display: none; }
  .admin-table tr {
    padding: var(--s3);
    margin-bottom: var(--s3);
    background: #f8fbfb;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .admin-table td {
    display: grid;
    grid-template-columns: minmax(72px, .34fr) 1fr;
    gap: var(--s2);
    padding: .45rem 0;
    border-bottom: 0;
  }
  .admin-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }
}

@media (max-width: 430px) {
  body { font-size: 15.5px; }
  .container { width: min(100% - 24px, 1120px); }
  .nav-shell { gap: var(--s2); }
  .brand { min-width: 0; }
  .brand span:last-child { min-width: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: .92rem; }
  .brand small { font-size: .72rem; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.45rem; }
  .hero-band { padding-top: var(--s4); }
  .band-grid { gap: var(--s3); }
  .hero-actions { gap: var(--s2); margin-top: var(--s4); }
  .hero-copy p, .page-hero p, .product-detail-hero p { margin-top: var(--s3); font-size: 1rem; }
  .metrics-grid { grid-template-columns: 1fr; }
  .metrics-grid div { padding: var(--s3); }
  .hero-visual, .detail-image { padding: var(--s2); }
  .image-frame img { min-height: 178px; }
  .contact-cards div, .quote-form, .spec-card, .service-grid article { padding: var(--s3); }
  .admin-top { padding: var(--s3); }
}

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