/* ===== PASARGAD MEDICAL CLOTHING — GLOBAL STYLES ===== */

/* ===== IRANSans (self-hosted) ===== */
@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('fonts/IRANSansWeb_UltraLight.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('fonts/IRANSansWeb_Light.woff2') format('woff2');
}
@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/IRANSansWeb.woff2') format('woff2'),
       url('fonts/IRANSansWeb.woff') format('woff');
}
@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/IRANSansWeb_Medium.woff2') format('woff2'),
       url('fonts/IRANSansWeb_Medium.woff') format('woff');
}
@font-face {
  font-family: 'IRANSans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/IRANSansWeb_Bold.woff2') format('woff2'),
       url('fonts/IRANSansWeb_Bold.woff') format('woff');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-900: #042C53;
  --blue-800: #0C447C;
  --blue-700: #0a4a8a;
  --blue-600: #185FA5;
  --blue-400: #378ADD;
  --blue-200: #85B7EB;
  --blue-100: #B5D4F4;
  --blue-50:  #E6F1FB;
  --white:    #ffffff;
  --gray-50:  #f8fbff;
  --gray-100: #f0f5fa;
  --gray-200: #e0eaf4;
  --gray-400: #8aa0b8;
  --gray-600: #4a6a8a;
  --gray-800: #1a2a3a;
  --accent:   #2196f3;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 4px rgba(0,60,140,0.07);
  --shadow-md: 0 4px 16px rgba(0,60,140,0.10);
  --shadow-lg: 0 8px 32px rgba(0,60,140,0.14);
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'IRANSans', Tahoma, system-ui, sans-serif;
  font-size: 15px;
  color: var(--gray-800);
  background: #fff;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 20px;
  color: var(--blue-700);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-logo span { color: var(--accent); }
.nav-logo-mark { width: 34px; height: 34px; flex-shrink: 0; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* On desktop the menu wrapper is transparent — its children (.nav-links,
   .nav-right) act as direct flex items of .nav-inner. On mobile it becomes
   a collapsible dropdown panel (see the responsive section). */
.nav-menu { display: contents; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 9px;
  background: none;
  border: none;
  cursor: pointer;
  margin-inline-start: auto;
}
.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--blue-700);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  position: relative;
}
.nav-link:hover { background: var(--blue-50); color: var(--blue-700); }
.nav-link.active { color: var(--blue-700); }
.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 14px; right: 14px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
  position: relative;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  background: var(--gray-50);
  transition: border-color var(--transition), background var(--transition);
  user-select: none;
}
.lang-btn:hover { border-color: var(--blue-200); background: var(--blue-50); }

.lang-flag { font-size: 18px; line-height: 1; }
.lang-chevron { font-size: 10px; margin-left: 2px; transition: transform var(--transition); }
.lang-selector.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  min-width: 160px;
  overflow: hidden;
  z-index: 200;
}
.lang-selector.open .lang-dropdown { display: block; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-800);
  cursor: pointer;
  transition: background var(--transition);
}
.lang-option:hover { background: var(--blue-50); }
.lang-option.selected { background: var(--blue-50); color: var(--blue-700); font-weight: 600; }
.lang-option-flag { font-size: 20px; line-height: 1; }

/* ===== MEGA MENU ===== */
.nav-products { position: static; }

.mega-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0; right: 0;
  background: #fff;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-lg);
  z-index: 999;
}
.mega-menu.open { display: flex; }

/* Desktop: open the mega menu on hover (CSS-driven — no JS close-timer races,
   so sub-category links stay reliably clickable). The ::before is an invisible
   bridge spanning the gap between the navbar trigger and the dropdown, keeping
   the menu open while the cursor travels down into it. */
@media (min-width: 901px) {
  .nav-products:hover .mega-menu { display: flex; }
  .mega-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -18px;
    height: 18px;
  }
}

.mega-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  align-items: start;
}

.mega-col {
  min-width: 0;
}

.mega-cat-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--blue-700);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
  overflow-wrap: break-word;
}

.mega-item {
  display: block;
  font-size: 13px;
  color: var(--gray-600);
  padding: 4px 0;
  cursor: pointer;
  transition: color var(--transition);
  overflow-wrap: break-word;
}
.mega-item:hover { color: var(--blue-700); padding-left: 4px; }

/* ===== HERO ===== */
.hero {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1584 / 672;
  max-height: 600px;
  background: var(--blue-800);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero-slide.active { opacity: 1; }

.hero-slide picture {
  display: block;
  width: 100%;
  height: 100%;
}
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 clamp(24px, 6vw, 96px);
  /* dark scrim heaviest on the text (start) side — RTL default */
  background: linear-gradient(to left, rgba(4,44,83,0.9) 0%, rgba(4,44,83,0.55) 45%, rgba(4,44,83,0.05) 100%);
}
html[dir="ltr"] .hero-overlay {
  background: linear-gradient(to right, rgba(4,44,83,0.9) 0%, rgba(4,44,83,0.55) 45%, rgba(4,44,83,0.05) 100%);
}
.hero-overlay-title {
  margin: 0;
  max-width: 620px;
  text-align: start;
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
  font-size: clamp(26px, 4.6vw, 52px);
  text-shadow: 0 2px 14px rgba(0,0,0,0.4);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.04;
  background-image: radial-gradient(circle, #fff 1px, transparent 1px);
  background-size: 32px 32px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.hero-text { max-width: 540px; }

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  color: var(--blue-100);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
  letter-spacing: 0.4px;
}

.hero h1 {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 46px;
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  font-size: 16px;
  color: var(--blue-100);
  margin-bottom: 28px;
  line-height: 1.6;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blue-700);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0,0,0,0.25); }

.hero-visual {
  width: 280px;
  height: 280px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all var(--transition);
}
.hero-dot.active { background: #fff; width: 24px; border-radius: 4px; }

/* ===== SECTIONS ===== */
.section {
  padding: 72px 24px;
}
.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.section-title {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 36px;
  font-weight: 400;
  color: var(--blue-800);
  margin-bottom: 10px;
  line-height: 1.2;
}
.section-sub {
  font-size: 16px;
  color: var(--gray-400);
  margin-bottom: 40px;
  max-width: 560px;
}

.section-alt { background: var(--gray-50); }

/* ===== VISION ===== */
.vision-headline {
  text-align: center;
  margin-bottom: 48px;
}
.vision-headline .section-label { display: block; }
.vision-kw {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 42px;
  color: var(--blue-800);
  margin-bottom: 10px;
}
.vision-sub {
  font-size: 16px;
  color: var(--gray-400);
}

.vision-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.vision-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: box-shadow var(--transition), transform var(--transition);
}
.vision-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.vision-icon {
  width: 52px; height: 52px;
  background: var(--blue-700);
  border-radius: 12px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.vision-icon svg { color: #fff; }

.vision-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 8px;
}
.vision-card p { font-size: 14px; color: var(--gray-400); line-height: 1.6; }

/* ===== SERVICES ===== */
.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  border-top: 3px solid var(--accent);
  transition: box-shadow var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-md); }

.service-icon {
  font-size: 32px;
  margin-bottom: 14px;
}
.service-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 8px;
}
.service-card p { font-size: 14px; color: var(--gray-400); line-height: 1.6; }

/* ===== PRODUCT CARDS ===== */
.product-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.product-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  display: block;
  color: inherit;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.product-card-img {
  height: 160px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card-img svg { opacity: 0.5; }
.product-card img { width: 100%; height: 100%; object-fit: cover; }

.product-card-body { padding: 18px 20px; }
.product-card h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 6px;
}
.product-card p { font-size: 13px; color: var(--gray-400); margin-bottom: 12px; line-height: 1.5; }
.product-card-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

.view-all-wrap { text-align: center; }
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--accent);
  color: var(--accent);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue-700);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background var(--transition), transform var(--transition);
}
.btn-primary:hover { background: var(--blue-800); transform: translateY(-1px); }
.btn-primary:disabled, .btn-primary.is-loading {
  cursor: wait;
  opacity: 0.85;
  transform: none;
}
.btn-spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* ===== CONTACT FORM ===== */
.contact-form-wrap {
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }

.form-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.form-field input,
.form-field textarea {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-800);
  background: #fff;
  transition: border-color var(--transition);
  outline: none;
}
.form-field input:focus,
.form-field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(33,150,243,0.1); }
.form-field textarea { resize: vertical; min-height: 100px; }

.form-interest-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--gray-600);
}
.checkbox-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

/* ===== FOOTER ===== */
footer {
  background: var(--blue-900);
  padding: 56px 24px 24px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand { }
.footer-logo {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 22px;
  color: #fff;
  margin-bottom: 12px;
}
.footer-logo span { color: var(--blue-200); }
.footer-tagline { font-size: 13px; color: var(--blue-200); margin-bottom: 20px; line-height: 1.6; }

.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}
.social-btn:hover { background: rgba(255,255,255,0.15); }
.social-btn svg { color: var(--blue-100); }

.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--blue-200);
  margin-bottom: 8px;
  transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }

.footer-lang { }
.footer-lang-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--blue-200);
  margin-bottom: 8px;
  cursor: pointer;
  transition: color var(--transition);
}
.footer-lang-item:hover { color: #fff; }
.footer-lang-item .flag { font-size: 18px; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--blue-200);
}

/* ===== PRODUCTS PAGE ===== */
.page-hero {
  background: linear-gradient(120deg, var(--blue-900), var(--blue-700));
  padding: 56px 24px;
  color: #fff;
}
/* Products page hero — photo background with a dark scrim for text contrast.
   Scoped to #page-content so contact.html's .page-hero is unaffected. */
#page-content .page-hero {
  background-color: var(--blue-900);
  background-image: linear-gradient(rgba(4, 44, 83, 0.82), rgba(10, 68, 124, 0.72)), url('images/products-hero-1600.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  /* Match the index page hero's dimensions */
  width: 100%;
  aspect-ratio: 1584 / 672;
  max-height: 600px;
  padding: 0 24px;
  display: flex;
  align-items: center;
}
#page-content .page-hero-inner { width: 100%; }
.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.page-hero-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-100);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}
.page-hero h1 {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 42px;
  font-weight: 400;
  margin-bottom: 10px;
}
.page-hero p { font-size: 16px; color: var(--blue-100); }

/* Category list on products page */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.cat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  gap: 20px;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  color: inherit;
}
.cat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.cat-thumb {
  width: 80px;
  height: 80px;
  background: var(--blue-50);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-thumb svg { opacity: 0.5; }

.cat-body { flex: 1; min-width: 0; }
.cat-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 6px;
}
.cat-body p { font-size: 13px; color: var(--gray-400); margin-bottom: 10px; line-height: 1.5; }
.cat-badge {
  display: inline-block;
  background: var(--blue-50);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--blue-100);
}

/* Subcategory / Product list */
.breadcrumb {
  font-size: 13px;
  color: var(--gray-400);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}
.breadcrumb a { color: var(--accent); cursor: pointer; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: var(--gray-400); }

.subcat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.subcat-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  color: inherit;
  display: block;
}
.subcat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.subcat-imgs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  height: 100px;
  gap: 2px;
  background: var(--gray-200);
}
.subcat-img-slot {
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gray-400);
  font-style: italic;
}

.subcat-body { padding: 16px 18px; }
.subcat-body h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 6px;
}
.subcat-lead {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--gray-400);
}
.subcat-lead-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* Product list in subcat */
.prod-list-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.prod-item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
  color: inherit;
  display: block;
}
.prod-item:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.prod-item-img {
  height: 120px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--gray-400);
  font-style: italic;
}

.prod-item-body { padding: 12px 14px; }
.prod-item-body h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 4px;
}
.prod-item-body p { font-size: 12px; color: var(--gray-400); }

/* Product detail */
.prod-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}

.prod-gallery {}
.prod-main-img {
  height: 340px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--gray-400);
  font-style: italic;
}
.prod-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.prod-thumb {
  height: 80px;
  background: linear-gradient(135deg, var(--blue-50), var(--blue-100));
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-200);
  cursor: pointer;
}
.prod-thumb:hover { border-color: var(--accent); }

.prod-info {}
.prod-info h1 {
  font-family: 'IRANSans', Tahoma, sans-serif;
  font-size: 32px;
  font-weight: 400;
  color: var(--blue-800);
  margin-bottom: 8px;
  line-height: 1.2;
}
.prod-category-tag {
  display: inline-block;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 24px;
  border: 1px solid var(--blue-100);
}
.prod-attrs {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.prod-attr-row {
  display: flex;
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-200);
}
.prod-attr-row:last-child { border-bottom: none; }
.prod-attr-key { color: var(--gray-400); font-weight: 600; min-width: 140px; }
.prod-attr-val { color: var(--gray-800); font-weight: 500; }

.prod-desc {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 24px;
}

/* Related products */
.related-section {
  border-top: 1px solid var(--gray-200);
  padding-top: 48px;
  margin-bottom: 48px;
}
.related-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 20px;
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}

.contact-info-card {
  background: var(--blue-50);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--blue-100);
}
.contact-info-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--blue-800);
  margin-bottom: 20px;
}
.contact-info-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--gray-600);
}
.contact-info-icon {
  width: 36px; height: 36px;
  background: var(--blue-700);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-info-icon svg { color: #fff; }
.contact-info-text strong { display: block; color: var(--gray-800); font-size: 13px; margin-bottom: 2px; }

.map-embed {
  margin-top: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  line-height: 0;
}
.map-embed iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}
.map-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-400);
  text-decoration: none;
}
.map-link:hover { text-decoration: underline; }

/* ===== CERTIFICATES ===== */
.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 24px;
}
.cert-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-align: start;
  transition: box-shadow var(--transition), transform var(--transition);
}
.cert-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.cert-thumb {
  height: 240px;
  background: var(--gray-100);
  overflow: hidden;
}
.cert-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.cert-name {
  padding: 14px 16px 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue-800);
}
.cert-view-hint {
  padding: 0 16px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.cert-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(4, 28, 53, 0.85);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cert-lightbox.open { display: flex; }
.cert-lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 92vw;
  max-height: 92vh;
}
.cert-lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.cert-lightbox-caption {
  margin-top: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.cert-lightbox-close {
  position: absolute;
  top: -16px;
  inset-inline-end: -16px;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #fff;
  color: var(--blue-800);
  font-size: 26px;
  line-height: 40px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .vision-cards, .service-cards, .product-cards { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .subcat-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-list-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }

  /* ===== MOBILE NAV ===== */
  .nav-inner { padding: 0 16px; gap: 12px; }
  .nav-logo { font-size: 17px; gap: 8px; }
  .nav-logo-mark { width: 30px; height: 30px; }
  .nav-toggle { display: flex; }

  .nav-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    padding: 8px 16px 16px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
  .nav-menu.open { display: flex; }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    flex: none;
    width: 100%;
    gap: 2px;
  }
  .nav-right {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
  }
  .nav-link { padding: 12px 8px; }
  .nav-link.active::after { display: none; }

  /* Mega menu becomes an inline, stacked accordion: categories first,
     sub-categories shown only for the one expanded category. */
  .mega-menu {
    position: static;
    display: none;
    border: none;
    box-shadow: none;
  }
  .mega-menu.open { display: block; }
  .mega-inner {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 0;
    max-width: none;
  }
  .mega-col { border-bottom: 1px solid var(--gray-200); }
  .mega-col:last-child { border-bottom: none; }
  .mega-cat-title {
    margin: 0;
    padding: 13px 8px;
    border-bottom: none;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }
  .mega-cat-title::after {
    content: '▾';
    font-size: 10px;
    color: var(--gray-400);
    flex-shrink: 0;
    transition: transform var(--transition);
  }
  .mega-col.expanded .mega-cat-title::after { transform: rotate(180deg); }
  .mega-col .mega-item {
    display: none;
    padding: 10px 8px;
    padding-inline-start: 24px;
  }
  .mega-col.expanded .mega-item { display: block; }

  .lang-selector { width: 100%; }
  .lang-dropdown { left: 0; right: auto; width: 100%; }

  /* ===== HERO ===== */
  .hero { aspect-ratio: auto; height: 340px; max-height: none; }
  .hero-overlay { padding: 0 20px; }
  .hero-overlay-title { font-size: clamp(20px, 6vw, 32px); max-width: 90%; }

  /* ===== SECTIONS / TYPOGRAPHY ===== */
  .section { padding: 48px 18px; }
  .section-title { font-size: 26px; }
  .vision-kw { font-size: 28px; }
  .page-hero { padding: 40px 18px; }
  .page-hero h1 { font-size: 28px; }
  #page-content .page-hero {
    background-image: linear-gradient(rgba(4, 44, 83, 0.82), rgba(10, 68, 124, 0.72)), url('images/products-hero-1000.webp');
    aspect-ratio: auto;
    height: 340px;
    max-height: none;
    padding: 0 18px;
  }
}

@media (max-width: 560px) {
  #page-content .page-hero { height: 290px; }
}

@media (max-width: 560px) {
  .subcat-grid, .prod-list-grid { grid-template-columns: 1fr; }
  .checkbox-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { height: 290px; }
}
