:root {
  --primary: #0B1F3A;
  --secondary: #00A8A8;
  --secondary-dark: #008C8C;
  --accent: #FF8A00;
  --background: #F5F7FA;
  --text: #1F2933;
  --muted: #667085;
  --border: #D9E2EC;
  --success: #16A34A;
  --error: #DC2626;
  --white: #FFFFFF;
  --shadow: 0 18px 45px rgba(11, 31, 58, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: var(--background);
  color: var(--text);
  line-height: 1.8;
}

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

button,
input,
select {
  font: inherit;
}

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

.top-bar {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.top-bar__inner,
.top-bar__right,
.top-bar__left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-bar__inner {
  justify-content: space-between;
  padding: 7px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(11, 31, 58, 0.05);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 16px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.logo__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  color: var(--white);
  font-size: 22px;
}

.logo strong {
  display: block;
  color: var(--primary);
  font-size: 18px;
}

.logo small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: -3px;
}

.search-box {
  display: grid;
  grid-template-columns: 150px 1fr 100px;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.search-box input,
.search-box select {
  border: 0;
  outline: 0;
  padding: 12px 14px;
  background: transparent;
  color: var(--text);
}

.search-box select {
  border-left: 1px solid var(--border);
}

.search-box button,
.finder-form button,
.newsletter button,
.product-actions button {
  border: 0;
  background: var(--secondary);
  color: var(--white);
  cursor: pointer;
  transition: 0.2s ease;
  font-weight: 700;
}

.search-box button:hover,
.finder-form button:hover,
.newsletter button:hover,
.product-actions button:hover {
  background: var(--secondary-dark);
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.icon-action {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--primary);
  font-size: 17px;
}

.icon-action span {
  font-size: 11px;
}

.cart-action b {
  position: absolute;
  top: -7px;
  left: 4px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 12px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary);
}

.main-nav {
  border-top: 1px solid var(--border);
}

.main-nav__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 10px 0;
  font-weight: 600;
  font-size: 14px;
}

.category-toggle {
  background: var(--primary);
  color: var(--white);
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 700;
}

.category-panel {
  display: none;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.category-panel.is-open {
  display: block;
}

.category-panel__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 16px 0;
}

.category-panel__grid a {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--background);
}

.hero {
  padding: 58px 0;
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 168, 168, 0.16), transparent 26%),
    linear-gradient(135deg, #ffffff 0%, #eef5f7 100%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 42px;
}

.eyebrow,
.section-heading span,
.discount-banner span {
  color: var(--secondary);
  font-weight: 800;
  font-size: 14px;
}

.hero h1 {
  margin: 10px 0 18px;
  color: var(--primary);
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.25;
}

.hero p {
  color: var(--muted);
  font-size: 18px;
  max-width: 650px;
}

.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-dark {
  background: var(--primary);
  color: var(--white);
}

.hero__badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero__badges span {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 13px;
  font-weight: 700;
  color: var(--primary);
}

.hero__visual {
  display: grid;
  place-items: center;
}

.circuit-card {
  position: relative;
  width: min(100%, 460px);
  aspect-ratio: 1 / 0.86;
  border-radius: 34px;
  background: linear-gradient(135deg, var(--primary), #102d54);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.14);
}

.chip {
  position: absolute;
  top: 35%;
  right: 36%;
  width: 120px;
  height: 92px;
  border: 2px solid rgba(0, 168, 168, 0.9);
  background: #061427;
  color: var(--white);
  display: grid;
  place-items: center;
  border-radius: 16px;
  letter-spacing: 2px;
  font-weight: 800;
}

.circuit-line {
  position: absolute;
  height: 3px;
  background: var(--secondary);
  box-shadow: 0 0 16px rgba(0,168,168,0.85);
}

.line-1 { width: 310px; top: 47%; right: 32px; }
.line-2 { width: 210px; top: 28%; right: 85px; transform: rotate(-22deg); }
.line-3 { width: 270px; top: 70%; right: 105px; transform: rotate(14deg); }

.node {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 20px rgba(255,138,0,0.9);
}

.node-1 { top: 45%; right: 28px; }
.node-2 { top: 20%; left: 95px; }
.node-3 { bottom: 20%; left: 65px; }

.mini-board {
  position: absolute;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  font-weight: 800;
}

.board-a { top: 42px; right: 44px; }
.board-b { bottom: 44px; left: 42px; }

.section {
  padding: 64px 0;
}

.section-soft {
  background: #eef3f6;
}

.section-heading {
  margin-bottom: 28px;
}

.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.section-heading h2 {
  margin: 4px 0 0;
  color: var(--primary);
  font-size: clamp(24px, 3vw, 36px);
}

.text-link {
  color: var(--secondary);
  font-weight: 800;
}

.category-grid,
.product-grid,
.benefit-grid,
.project-grid,
.blog-grid {
  display: grid;
  gap: 18px;
}

.category-grid {
  grid-template-columns: repeat(4, 1fr);
}

.category-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: 0.2s ease;
}

.category-card:hover,
.product-card:hover,
.blog-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.category-card b {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  background: rgba(0, 168, 168, 0.10);
  border-radius: 16px;
  font-size: 24px;
  margin-bottom: 12px;
}

.category-card strong,
.category-card small {
  display: block;
}

.category-card small {
  color: var(--muted);
}

.product-grid {
  grid-template-columns: repeat(4, 1fr);
}

.product-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: 0.2s ease;
}

.discount-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--accent);
  color: var(--white);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.product-image {
  height: 155px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(11,31,58,0.95), rgba(0,168,168,0.7)),
    repeating-linear-gradient(45deg, rgba(255,255,255,0.12) 0 2px, transparent 2px 14px);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.product-card h3 {
  margin: 0;
  font-size: 16px;
  color: var(--primary);
}

.product-card p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 13px;
}

.product-meta,
.product-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.in-stock {
  color: var(--success);
  font-weight: 800;
}

.out-stock {
  color: var(--error);
  font-weight: 800;
}

.price {
  margin-top: 14px;
  color: var(--primary);
  font-weight: 900;
  font-size: 18px;
}

.product-actions button {
  border-radius: 12px;
  padding: 9px 12px;
}

.product-actions a {
  color: var(--secondary);
  font-weight: 700;
  font-size: 13px;
}

.quick-finder {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 28px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px;
  overflow: hidden;
  position: relative;
}

.quick-finder::after {
  content: "";
  position: absolute;
  inset-inline-start: -80px;
  top: -80px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(0,168,168,0.18);
}

.quick-finder h2 {
  margin: 6px 0;
  font-size: 30px;
}

.quick-finder p {
  color: rgba(255,255,255,0.72);
}

.finder-form {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr auto;
  gap: 10px;
}

.finder-form input,
.finder-form select {
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 12px;
  outline: 0;
}

.finder-form button {
  border-radius: 12px;
  padding: 0 18px;
}

.mini-products {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.mini-products article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}

.mini-products b {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--primary);
  color: var(--white);
  margin-bottom: 10px;
}

.mini-products span,
.mini-products strong {
  display: block;
}

.mini-products strong {
  color: var(--secondary);
  margin-top: 6px;
}

.benefit-grid {
  grid-template-columns: repeat(4, 1fr);
}

.benefit-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.benefit-grid b {
  font-size: 28px;
}

.benefit-grid h3,
.project-grid h3 {
  color: var(--primary);
  margin-bottom: 4px;
}

.benefit-grid p,
.project-grid p {
  color: var(--muted);
  margin: 0;
}

.project-section {
  background:
    linear-gradient(rgba(11,31,58,0.92), rgba(11,31,58,0.92)),
    radial-gradient(circle at 15% 20%, var(--secondary), transparent 24%);
  color: var(--white);
}

.project-section h2 {
  color: var(--white);
}

.project-grid {
  grid-template-columns: repeat(4, 1fr);
}

.project-grid article {
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.project-grid h3 {
  color: var(--white);
}

.project-grid p {
  color: rgba(255,255,255,0.72);
}

.discount-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: linear-gradient(135deg, var(--accent), #ffad42);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 34px;
}

.discount-banner span,
.discount-banner h2 {
  color: var(--white);
}

.discount-banner h2 {
  margin: 4px 0;
  font-size: 34px;
}

.discount-banner p {
  margin: 0;
}

.blog-grid {
  grid-template-columns: repeat(4, 1fr);
}

.blog-grid article {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: 0.2s ease;
}

.blog-grid small {
  color: var(--accent);
  font-weight: 800;
}

.blog-grid h3 {
  color: var(--primary);
  min-height: 70px;
}

.blog-grid a {
  color: var(--secondary);
  font-weight: 800;
}

.newsletter-section {
  padding: 48px 0;
  background: var(--white);
}

.newsletter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--background);
}

.newsletter h2 {
  margin: 0;
  color: var(--primary);
}

.newsletter p {
  margin: 4px 0 0;
  color: var(--muted);
}

.newsletter form {
  display: flex;
  min-width: 420px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.newsletter input {
  flex: 1;
  border: 0;
  outline: 0;
  padding: 13px 18px;
  background: transparent;
}

.newsletter button {
  padding: 0 24px;
}

.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.78);
  padding-top: 52px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 1fr;
  gap: 32px;
}

.footer-logo strong {
  color: var(--white);
}

.footer h3 {
  color: var(--white);
  margin: 0 0 12px;
}

.footer a,
.footer p {
  display: block;
  margin: 8px 0;
  color: rgba(255,255,255,0.76);
}

.trust-box {
  width: 130px;
  height: 78px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  color: var(--white);
  margin-top: 12px;
}

.copyright {
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 34px;
  padding: 18px 0;
  font-size: 13px;
}

/* Tablet */
@media (max-width: 1199px) {
  .header-main {
    grid-template-columns: auto 1fr auto;
  }

  .search-box {
    grid-column: 1 / -1;
    order: 3;
  }

  .hero__grid,
  .quick-finder {
    grid-template-columns: 1fr;
  }

  .category-grid,
  .product-grid,
  .benefit-grid,
  .project-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .mini-products {
    grid-template-columns: repeat(3, 1fr);
  }

  .finder-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .finder-form button {
    min-height: 48px;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 767px) {
  .container {
    width: min(100% - 24px, 1180px);
  }

  .top-bar__inner,
  .top-bar__right,
  .top-bar__left,
  .newsletter,
  .discount-banner,
  .copyright,
  .heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-bar__left {
    display: none;
  }

  .header-main {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    padding: 12px 0;
  }

  .hamburger {
    display: block;
  }

  .logo small {
    display: none;
  }

  .header-actions .icon-action:not(.cart-action) {
    display: none;
  }

  .search-box {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: 18px;
  }

  .search-box select {
    border-left: 0;
    border-bottom: 1px solid var(--border);
  }

  .search-box button {
    padding: 11px;
  }

  .main-nav {
    display: none;
  }

  .main-nav.is-open {
    display: block;
  }

  .main-nav__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
  }

  .main-nav__inner a,
  .category-toggle {
    width: 100%;
    text-align: right;
    border-radius: 12px;
    padding: 12px;
  }

  .category-panel__grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 38px 0;
  }

  .hero__grid {
    gap: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .circuit-card {
    border-radius: 24px;
  }

  .section {
    padding: 44px 0;
  }

  .category-grid,
  .product-grid,
  .benefit-grid,
  .project-grid,
  .blog-grid,
  .mini-products,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-finder,
  .discount-banner,
  .newsletter {
    padding: 22px;
    border-radius: 20px;
  }

  .quick-finder h2,
  .discount-banner h2 {
    font-size: 24px;
  }

  .finder-form,
  .newsletter form {
    grid-template-columns: 1fr;
    display: grid;
    min-width: 0;
    width: 100%;
    border-radius: 18px;
  }

  .newsletter button {
    padding: 12px;
  }

  .product-image {
    height: 185px;
  }
}
