:root {
  --navy: #0b1530;
  --navy-2: #13224a;
  --accent: #e0352b;
  --blue: #2f6fe0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --text: #1c2333;
  --muted: #5d6679;
  --line: #dfe4ee;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 2;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }

.container { width: min(1140px, 100% - 32px); margin-inline: auto; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand img {
  height: 48px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 3px 6px;
}
.brand span { font-weight: 700; font-size: 1.05rem; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: #cdd6ea;
  padding: 6px 13px;
  border-radius: 6px;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; }

.nav { align-items: center; }
.dropdown { position: relative; }
.dropdown > a { display: block; }
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 190px;
  background: var(--navy-2);
  border-radius: 8px;
  padding: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
.submenu a { display: block; white-space: nowrap; }
.dropdown:hover .submenu,
.dropdown:focus-within .submenu { display: block; }

/* ---------- hero (collage) ---------- */
.hero {
  background: var(--navy) url("../images/header-collage.jpg") center / cover no-repeat;
  aspect-ratio: 3 / 1;
  max-height: 520px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: flex-end;
}
.hero.small { aspect-ratio: 5 / 1; min-height: 150px; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11, 21, 48, .92), rgba(11, 21, 48, 0) 55%);
}
.hero .container { position: relative; z-index: 1; padding-block: 22px; color: #fff; }
.hero h1 { margin: 0; font-size: clamp(1.3rem, 3.2vw, 2.4rem); line-height: 1.5; }
.hero p { margin: 4px 0 0; color: #c9d3ea; font-size: clamp(.85rem, 1.6vw, 1.1rem); }

/* ---------- content ---------- */
main { padding-block: 44px 64px; }

h2.section {
  font-size: 1.5rem;
  margin: 0 0 20px;
  padding-inline-start: 14px;
  border-inline-start: 5px solid var(--accent);
  line-height: 1.6;
}
h2.section + p.lead { margin-top: -8px; color: var(--muted); }
section + section { margin-top: 52px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  box-shadow: 0 2px 10px rgba(20, 30, 60, .05);
}
.card p { margin: 0; text-align: justify; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  margin: 0;
  transition: transform .15s, box-shadow .15s;
}
.product:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(20, 30, 60, .12); }
.product img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; padding: 10px; }
.product.tall img { aspect-ratio: 4 / 5; object-fit: cover; padding: 0; }
.product figcaption {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}
.product figcaption small { color: var(--muted); font-weight: 400; direction: ltr; }

a.product { display: block; color: inherit; }
.categories { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.categories .product img { aspect-ratio: 16 / 9; object-fit: cover; padding: 0; }
.categories .product figcaption { font-size: 1.15rem; }
.categories .product figcaption small { color: var(--accent); font-size: 1.4rem; font-weight: 700; }

section[id] { scroll-margin-top: 90px; }

.pending { text-align: center; padding: 60px 28px; }
.pending p { text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--muted); }

.prose p + p { margin-top: 16px; }
.prose .note {
  background: #fff7e6;
  border-inline-start: 4px solid #e6a117;
  border-radius: 8px;
  padding: 12px 16px;
}
.btn {
  display: inline-block;
  margin-top: 24px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  padding: 8px 40px;
}
.btn:hover { filter: brightness(1.1); }

.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 20px; }
.stat { background: var(--navy-2); color: #fff; border-radius: 12px; padding: 18px 22px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.5; }
.stat span { color: #c9d3ea; font-size: .95rem; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 12px; overflow: hidden; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); text-align: start; }
thead th { background: var(--navy-2); color: #fff; font-weight: 500; }
tbody tr:last-child td { border-bottom: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- contact ---------- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { padding: 10px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 12px; }
.contact-list li:last-child { border-bottom: 0; }
.contact-list b { min-width: 76px; color: var(--muted); font-weight: 500; }

form label { display: block; font-weight: 500; margin-bottom: 12px; }
input, textarea {
  width: 100%;
  font: inherit;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  margin-top: 4px;
}
input:focus, textarea:focus { outline: 2px solid var(--blue); border-color: transparent; }
button {
  font: inherit;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 10px 28px;
  cursor: pointer;
}
button:hover { filter: brightness(1.1); }

/* ---------- footer ---------- */
footer { background: var(--navy); color: #aab4cc; padding: 22px 0; font-size: .9rem; }
footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer a { color: #fff; }

@media (max-width: 640px) {
  .topbar .container { flex-direction: column; padding-block: 10px; gap: 8px; }
  .nav a { padding: 4px 10px; font-size: .92rem; }
  .hero, .hero.small { aspect-ratio: 2 / 1; }
  .card { padding: 20px; }
}
