/* ==========================================================
   PetroNet Iran — Design System
   سرمه‌ای صنعتی + قرمز + سفید (الهام از هویت بصری نفت ایران)
   ========================================================== */
@font-face { font-family: IRANYekan; font-weight: 300; font-display: swap; src: url('/fonts/iran-yekan-300.woff2') format('woff2'), url('/fonts/iran-yekan-300.woff') format('woff'); }
@font-face { font-family: IRANYekan; font-weight: 400; font-display: swap; src: url('/fonts/iran-yekan-400.woff2') format('woff2'), url('/fonts/iran-yekan-400.woff') format('woff'); }
@font-face { font-family: IRANYekan; font-weight: 500; font-display: swap; src: url('/fonts/iran-yekan-500.woff2') format('woff2'), url('/fonts/iran-yekan-500.woff') format('woff'); }
@font-face { font-family: IRANYekan; font-weight: 700; font-display: swap; src: url('/fonts/iran-yekan-700.woff2') format('woff2'), url('/fonts/iran-yekan-700.woff') format('woff'); }

:root {
  --navy: #0B1E4A;
  --navy-2: #12295F;
  --navy-3: #1D3B80;
  --navy-dark: #071434;
  --red: #D7141A;
  --red-d: #AE0F14;
  --red-l: #FDECEC;
  --white: #FFFFFF;
  --bg: #F3F5F9;
  --metal: #EEF1F5;
  --metal-2: #E2E7EF;
  --line: #DCE2EB;
  --text: #18213A;
  --muted: #5D677C;
  --green: #12663F;
  --green-l: #E5F4EC;
  --amber: #A9520A;
  --amber-l: #FDF1E3;
  --blue: #1D4ED8;
  --blue-l: #E8EEFC;
  --gold: #B8860B;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 10px rgba(11, 30, 74, .07);
  --shadow-lg: 0 14px 40px rgba(11, 30, 74, .16);
  --font: IRANYekan, Tahoma, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body {
  margin: 0;
  min-height: 100%;
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
}
body { font-family: var(--font); font-size: 14.5px; line-height: 1.85; color: var(--text); background: var(--bg); direction: rtl; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
/* اسکرول لمسی روان — pan-y هم مجاز است تا اسکرول عمودی صفحه قفل نشود */
.touch-x {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
}
.touch-y {
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
}
.touch-xy {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-x pan-y;
  scrollbar-width: thin;
}
a { color: var(--navy-3); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red); }
img { max-width: 100%; }
h1, h2, h3, h4, h5 { line-height: 1.5; margin: 0 0 .6em; color: var(--navy); font-weight: 700; }
h1 { font-size: 1.65rem; } h2 { font-size: 1.35rem; } h3 { font-size: 1.15rem; } h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
input, select, textarea, button { font-family: var(--font); font-size: 14px; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.en { font-family: Tahoma, Arial, sans-serif; direction: ltr; unicode-bidi: embed; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 28px; }
.hidden { display: none !important; }
.container { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 18px; }
.mobile-only { display: none !important; }
.flex { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(3, 1fr); } .g-4 { grid-template-columns: repeat(4, 1fr); } .g-5 { grid-template-columns: repeat(5, 1fr); } .g-6 { grid-template-columns: repeat(6, 1fr); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 18px; border-radius: 8px; border: 1.5px solid transparent; font-weight: 500; cursor: pointer; line-height: 1.6; transition: all .15s; white-space: nowrap; text-decoration: none; background: var(--metal); color: var(--navy); }
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff !important; border-color: var(--red); box-shadow: 0 4px 14px rgba(215, 20, 26, .25); }
.btn-red:hover { background: var(--red-d); border-color: var(--red-d); }
.btn-navy { background: var(--navy); color: #fff !important; border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-3); }
.btn-outline { background: #fff; color: var(--navy) !important; border-color: var(--line); }
.btn-outline:hover { border-color: var(--navy); }
.btn-outline-red { background: #fff; color: var(--red) !important; border-color: var(--red); }
.btn-outline-red:hover { background: var(--red-l); }
.btn-ghost { background: transparent; color: var(--navy) !important; border-color: transparent; }
.btn-green { background: var(--green); color: #fff !important; border-color: var(--green); }
.btn-sm { padding: 5px 12px; font-size: 13px; border-radius: 7px; }
.btn-xs { padding: 2px 9px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.icon-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; font-size: 17px; }
.icon-btn:hover { border-color: var(--navy); color: var(--red); }
.icon-btn .dot { position: absolute; top: -6px; left: -6px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; line-height: 19px; text-align: center; padding: 0 4px; }

/* ---------- Topbar & Header ---------- */
.topbar { background: var(--navy-dark); color: #C7D0E6; font-size: 12.5px; }
.topbar-in { display: flex; justify-content: space-between; align-items: center; min-height: 36px; gap: 10px; }
.topbar-contact span { margin-left: 18px; }
.topbar-links a { color: #C7D0E6; margin-right: 16px; }
.topbar-links a:hover { color: #fff; }
.topbar-cta { background: var(--red); color: #fff !important; padding: 3px 12px; border-radius: 20px; }
.site-header { background: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(11, 30, 74, .08); }
.header-in { display: flex; align-items: center; gap: 22px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--navy); flex-shrink: 0; }
.brand-logo { width: 48px; height: 48px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 22px; color: var(--navy); letter-spacing: -.3px; }
.brand-text small { font-family: Tahoma, Arial; font-size: 10.5px; color: var(--red); letter-spacing: 1.4px; direction: ltr; text-align: right; font-weight: 700; }
.search-box { position: relative; flex: 1; display: flex; border: 2px solid var(--navy); border-radius: 12px; background: #fff; max-width: 760px; }
.search-scope { border: 0; background: var(--metal); color: var(--navy); padding: 0 12px; border-radius: 0 10px 10px 0; font-weight: 500; outline: none; cursor: pointer; }
.search-input { flex: 1; border: 0; padding: 11px 14px; outline: none; background: transparent; min-width: 0; }
.search-btn { border: 0; background: var(--red); color: #fff; width: 56px; border-radius: 9px 0 0 9px; cursor: pointer; font-size: 17px; }
.search-btn:hover { background: var(--red-d); }
.suggest { display: none; position: absolute; top: calc(100% + 6px); right: 0; left: 0; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); z-index: 200; max-height: min(480px, 70vh); overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.suggest.open { display: block; }
.suggest h6 { margin: 0; padding: 9px 14px 4px; font-size: 12px; color: var(--muted); font-weight: 500; background: var(--metal); }
.suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--text); border-bottom: 1px solid #F1F3F7; }
.suggest a:hover, .suggest a.hl { background: var(--blue-l); }
.suggest a img { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; background: var(--metal); }
.suggest a small { color: var(--muted); margin-right: auto; font-size: 12px; }
.suggest .all { justify-content: center; color: var(--red); font-weight: 500; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.user-menu { position: relative; }
.user-drop { display: none; position: absolute; top: 100%; left: 0; background: #fff; min-width: 180px; border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 210; border: 1px solid var(--line); }
.user-menu:hover .user-drop { display: block; }
.user-drop a { display: block; padding: 7px 12px; border-radius: 6px; color: var(--text); }
.user-drop a:hover { background: var(--metal); }

/* ---------- Main nav & Mega menu (۳ سطحی) ---------- */
.main-nav { background: var(--navy); border-bottom: 3px solid var(--red); }
.nav-in { display: flex; align-items: stretch; gap: 6px; min-height: 48px; }
.mega-wrap { position: static; }
.mega-btn { height: 100%; border: 0; background: var(--red); color: #fff; padding: 0 18px; font-weight: 700; cursor: pointer; display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.mega-btn:hover, .mega-wrap.open .mega-btn { background: var(--red-d); }
.nav-links { display: flex; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { display: flex; align-items: center; height: 100%; padding: 0 14px; color: #E3E8F4; font-weight: 500; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -3px; }
.nav-links a:hover, .nav-links a.active { color: #fff; border-bottom-color: #fff; background: rgba(255, 255, 255, .06); }
.mega { display: none; position: absolute; right: 0; left: 0; top: 100%; z-index: 150; }
.mega-wrap.open .mega { display: block; }
.mega-in { max-width: 1284px; margin: 0 auto; background: #fff; display: flex; box-shadow: var(--shadow-lg); border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; min-height: 420px; }
.mega-l1 { list-style: none; margin: 0; padding: 10px 0; width: 270px; background: var(--metal); flex-shrink: 0; border-left: 1px solid var(--line); }
.mega-l1 a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; color: var(--navy); font-weight: 500; }
.mega-l1 a .fa:first-child { width: 22px; text-align: center; color: var(--navy-3); font-size: 16px; }
.mega-l1 .arr { margin-right: auto; opacity: .4; }
.mega-l1 li.active a { background: #fff; color: var(--red); box-shadow: inset -4px 0 0 var(--red); }
.mega-l1 li.active a .fa:first-child { color: var(--red); }
.mega-panels { flex: 1; padding: 18px 26px; }
.mega-panel { display: none; }
.mega-panel.active { display: block; }
.mega-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px; }
.mega-head b { color: var(--navy); font-size: 16px; }
.mega-head a { color: var(--red); font-size: 13px; }
.mega-cols { columns: 3; column-gap: 26px; }
.mega-col { break-inside: avoid; margin-bottom: 18px; }
.mega-col a { display: block; color: var(--text); padding: 3px 0; font-size: 13.5px; }
.mega-col a.l2 { font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--red-l); margin-bottom: 4px; padding-bottom: 5px; }
.mega-col a.l2 .fa { color: var(--red); }
.mega-col a.l3:hover { color: var(--red); padding-right: 5px; }

/* Mobile nav drawer */
.mobile-nav {
  position: fixed; top: 0; bottom: 0; right: 0; width: min(320px, 86vw); background: #fff; z-index: 400;
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  padding-bottom: env(safe-area-inset-bottom, 0); padding-top: env(safe-area-inset-top, 0);
  transform: translateX(105%); transition: transform .28s ease; visibility: hidden; pointer-events: none;
}
.mobile-nav.open { transform: translateX(0); visibility: visible; pointer-events: auto; }
.mobile-nav-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--navy); color: #fff; flex-shrink: 0; }
.mobile-nav-head .icon-btn { margin-right: auto; }
.mobile-nav-head .brand-logo { width: 36px; height: 36px; }
.mobile-nav-body { flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; padding: 8px 0 30px; }
.mobile-nav-body > a { display: block; padding: 11px 18px; color: var(--navy); border-bottom: 1px solid var(--metal); font-weight: 500; }
.mobile-nav-body > a .fa { width: 22px; color: var(--red); }
.m-cats { border-bottom: 6px solid var(--metal); margin-bottom: 6px; }
.m-cats-title { padding: 10px 18px; font-weight: 700; color: var(--red); }
.m-cats details > summary { padding: 10px 18px; cursor: pointer; font-weight: 500; color: var(--navy); list-style: none; border-top: 1px solid var(--metal); }
.m-cats details > summary::after { content: "\f107"; font-family: FontAwesome; float: left; }
.m-cats details[open] > summary::after { content: "\f106"; }
.m-cats details.lv2 > summary { padding-right: 34px; font-weight: 400; }
.m-cats details a { display: block; padding: 7px 46px 7px 18px; color: var(--text); font-size: 13.5px; }
.m-cats a.m-all { color: var(--red); padding-right: 34px; }
.overlay { display: none; position: fixed; inset: 0; background: rgba(7, 20, 52, .55); z-index: 350; }
.overlay.open { display: block; }

/* ---------- Ads ---------- */
.hdr-ad {
  position: relative; display: block; margin: 14px 0 18px; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); min-height: 78px; background: linear-gradient(90deg, var(--navy-dark), var(--navy), var(--navy-3));
  color: #fff; text-decoration: none !important; direction: rtl; text-align: right;
}
.hdr-ad-bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; }
.hdr-ad-shade { position: absolute; inset: 0; background: linear-gradient(270deg, rgba(7,20,52,.12) 0%, rgba(7,20,52,.72) 45%, rgba(7,20,52,.92) 100%); pointer-events: none; }
.hdr-ad-copy {
  position: relative; z-index: 1; display: block; padding: 16px 20px; padding-left: 64px;
  font-family: var(--font); direction: rtl; text-align: right; unicode-bidi: plaintext;
}
.hdr-ad-title {
  display: block; margin: 0 0 4px; font-size: 15px; font-weight: 700; color: #fff;
  line-height: 1.55; font-style: normal; font-family: var(--font);
}
.hdr-ad-desc {
  display: block; margin: 0; font-size: 12.5px; font-weight: 400; font-style: normal;
  color: #D5DEEF; line-height: 1.7; font-family: var(--font);
}
.ad-tag {
  position: absolute; top: 8px; left: 10px; z-index: 2; background: rgba(7, 20, 52, .75); color: #fff;
  font-size: 10.5px; padding: 1px 8px; border-radius: 4px; font-family: var(--font); font-style: normal;
}
.ad-tag.inline { position: static; display: inline-block; background: var(--amber-l); color: var(--amber); margin-bottom: 4px; }
.side-ad {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 14px;
  box-shadow: var(--shadow); background: #fff; border: 1px solid #E8ECF3; color: var(--text);
  text-decoration: none !important; font-family: var(--font); direction: rtl; text-align: right;
}
.side-ad-media {
  display: block; height: 100px; background-color: var(--navy); background-size: cover;
  background-position: center; background-repeat: no-repeat;
}
.side-ad-media-plain { background: linear-gradient(135deg, var(--navy), var(--navy-3)); }
.side-ad-copy { display: block; padding: 12px 14px 14px; direction: rtl; text-align: right; unicode-bidi: plaintext; }
.side-ad-title {
  display: block; margin: 0 0 4px; color: var(--navy); font-size: 14px; font-weight: 700;
  line-height: 1.6; font-style: normal; font-family: var(--font);
}
.side-ad-desc {
  display: block; margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.75;
  font-style: normal; font-weight: 400; font-family: var(--font);
}
.native-ad {
  display: flex; gap: 12px; align-items: center; background: #fff; border: 1px dashed #E7C9A5;
  border-radius: var(--radius); padding: 12px; color: var(--text); margin-bottom: 12px;
  font-family: var(--font); direction: rtl; text-align: right; text-decoration: none !important;
}
.native-ad img { width: 64px; height: 64px; object-fit: contain; border-radius: 8px; background: var(--metal); flex-shrink: 0; }
.native-ad-title { display: block; color: var(--navy); font-size: 14px; font-weight: 700; font-style: normal; font-family: var(--font); line-height: 1.55; }
.native-ad-desc { display: block; margin: 2px 0 0; font-size: 12.5px; color: var(--muted); font-style: normal; font-family: var(--font); line-height: 1.7; }

/* ---------- Layout ---------- */
.site-main { min-height: 60vh; padding-bottom: 40px; }
.page-head { background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy-3) 100%); color: #fff; padding: 28px 0 32px; position: relative; overflow: hidden; }
.page-head::after { content: ""; position: absolute; left: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; border: 40px solid rgba(215, 20, 26, .18); }
.page-head h1 { color: #fff; margin: 4px 0 6px; position: relative; z-index: 1; }
.page-head p { color: #CDD6EA; margin: 0; max-width: 820px; position: relative; z-index: 1; }
.page-head .breadcrumb a, .page-head .breadcrumb span { color: #AFC0E4; }
/* فاصله یکدست زیر بنر عنوان — تا محتوا به بنر نچسبد */
.site-main > .page-head + .container,
.site-main > .page-head + .section {
  margin-top: 36px;
}
/* صفحات بدون page-head که مستقیم با container شروع می‌شوند */
.site-main > .container:first-child {
  padding-top: 24px;
}
.breadcrumb { font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; position: relative; z-index: 1; }
.breadcrumb a::after { content: "\f104"; font-family: FontAwesome; margin-right: 6px; opacity: .6; }
.section { padding: 34px 0 6px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.section-title h2 { margin: 0; display: flex; align-items: center; gap: 10px; }
.section-title h2::before { content: ""; width: 6px; height: 26px; background: var(--red); border-radius: 3px; display: inline-block; }
.section-title a { color: var(--red); font-weight: 500; font-size: 13.5px; }
.card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid #E8ECF3; }
.card-body { padding: 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-head h3, .card-head h4 { margin: 0; }
.layout-side { display: grid; grid-template-columns: 290px 1fr; gap: 22px; align-items: start; }
.layout-side.left { grid-template-columns: 1fr 300px; }
.sticky { position: sticky; top: 140px; }

/* ---------- Hero ---------- */
.hero { position: relative; background: radial-gradient(1200px 400px at 85% -10%, rgba(215, 20, 26, .35), transparent 60%), linear-gradient(125deg, var(--navy-dark) 0%, var(--navy) 50%, #183477 100%); color: #fff; padding: 54px 0 70px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background-image: url('/images/hero-pattern.svg'); background-size: 520px; opacity: .14; }
.hero-in { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: 2.15rem; line-height: 1.55; margin-bottom: 14px; }
.hero h1 em { font-style: normal; color: #FF5A5F; }
.hero p.lead { color: #D2DBEF; font-size: 16px; max-width: 640px; }
.hero-search { display: flex; background: #fff; border-radius: 14px; padding: 6px; margin: 22px 0 14px; box-shadow: var(--shadow-lg); max-width: 640px; }
.hero-search input { flex: 1; border: 0; outline: none; padding: 10px 14px; font-size: 15px; min-width: 0; }
.hero-tags { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.hero-tags a { color: #DDE4F4; border: 1px solid rgba(255, 255, 255, .25); padding: 2px 12px; border-radius: 20px; }
.hero-tags a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.hero-stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .15); border-radius: var(--radius-lg); padding: 18px; backdrop-filter: blur(6px); }
.hero-stat b { display: block; font-size: 28px; color: #fff; }
.hero-stat span { color: #C3CDE6; font-size: 13px; }
.hero-stat .fa { color: #FF5A5F; font-size: 22px; float: left; }
.pillars { margin-top: -40px; position: relative; z-index: 2; }
.pillar { background: #fff; border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-lg); display: flex; gap: 14px; align-items: flex-start; border-top: 4px solid var(--red); }
.pillar .ic { width: 50px; height: 50px; border-radius: 12px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.pillar b { color: var(--navy); display: block; margin-bottom: 2px; }
.pillar p { margin: 0; font-size: 13px; color: var(--muted); }

/* ---------- Category tiles ---------- */
.cat-tile { background: #fff; border-radius: var(--radius-lg); padding: 20px; border: 1px solid #E8ECF3; box-shadow: var(--shadow); transition: all .2s; display: block; color: var(--text); height: 100%; }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--red); }
.cat-tile .ic { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 12px; }
.cat-tile:hover .ic { background: linear-gradient(135deg, var(--red), var(--red-d)); }
.cat-tile h3 { font-size: 16px; margin-bottom: 6px; }
.cat-tile ul { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.cat-tile ul li::before { content: "\f104"; font-family: FontAwesome; color: var(--red); margin-left: 6px; }
.cat-tile .cnt { font-size: 12px; color: var(--red); font-weight: 500; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-size: 13px; }
.chip:hover, .chip.active { border-color: var(--red); color: var(--red); background: var(--red-l); }
.chip .x { color: var(--red); }
.chip small { color: var(--muted); }

/* ---------- Pills & badges ---------- */
.pill { display: inline-block; padding: 1px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill-ok { background: var(--green-l); color: var(--green); }
.pill-warn { background: var(--amber-l); color: var(--amber); }
.pill-info { background: var(--blue-l); color: var(--blue); }
.pill-red { background: var(--red-l); color: var(--red); }
.pill-gray { background: var(--metal); color: var(--muted); }
.pill-navy { background: var(--navy); color: #fff; }
.badge-v { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 500; margin: 2px 0 2px 4px; white-space: nowrap; }
.badge-v.lv1 { background: var(--blue-l); color: var(--blue); }
.badge-v.lv2 { background: var(--green-l); color: var(--green); }
.badge-v.lv3 { background: linear-gradient(90deg, #FFF4D1, #FCE7A4); color: #7A5A00; border: 1px solid #EBC75A; }
.badge-v.avl { background: var(--green); color: #fff; }
.badge-v.kb { background: #EDE9FE; color: #5B21B6; }
.badge-v.featured { background: var(--red); color: #fff; font-family: Tahoma, Arial; }
.badge-v.sm { font-size: 10.5px; padding: 0 7px; }
.plan-badge { display: inline-block; padding: 1px 10px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.plan-badge.bronze { background: #F6E3D3; color: #8A4B1B; }
.plan-badge.silver { background: #E8ECF2; color: #4B5568; }
.plan-badge.gold { background: #FCEFC0; color: #7A5A00; }
.plan-badge.free { background: var(--metal); color: var(--muted); }
.std-tag { display: inline-block; font-family: Tahoma, Arial; direction: ltr; font-size: 11.5px; background: var(--metal); color: var(--navy); border: 1px solid var(--line); padding: 0 7px; border-radius: 5px; margin: 2px; }

/* ---------- Product cards ---------- */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.p-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid #E6EAF1; box-shadow: var(--shadow); display: flex; flex-direction: column; position: relative; transition: all .2s; overflow: hidden; }
.p-card:hover { box-shadow: var(--shadow-lg); border-color: #C9D3E3; transform: translateY(-2px); }
.p-card.is-featured { border: 1.5px solid #EBC75A; }
.p-card .p-img { display: block; aspect-ratio: 4/3; background: linear-gradient(180deg, #F7F9FC, var(--metal)); position: relative; }
.p-card .p-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.p-card .p-flags { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.p-card .fav { position: absolute; top: 10px; left: 10px; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--muted); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; }
.p-card .fav.on, .fav-btn.on { color: var(--red); }
.p-card .p-body { padding: 12px 14px 8px; flex: 1; display: flex; flex-direction: column; }
.p-card .p-brand { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.p-card .p-brand img, .p-card .p-brand .logo-ph { width: 22px; height: 22px; border-radius: 5px; object-fit: contain; font-size: 10px; }
.p-card h3 { font-size: 14.5px; line-height: 1.7; margin: 0 0 4px; }
.p-card h3 a { color: var(--navy); }
.p-card h3 a:hover { color: var(--red); }
.p-card .p-model { font-family: Tahoma, Arial; direction: ltr; text-align: right; font-size: 12px; color: var(--muted); }
.p-card .p-specs { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.p-card .p-specs span { font-size: 11.5px; background: var(--metal); padding: 0 7px; border-radius: 5px; color: var(--navy); }
.p-card .p-foot { padding: 10px 14px 14px; display: flex; gap: 8px; align-items: center; border-top: 1px solid #F0F2F6; }
.p-card .p-foot .btn { flex: 1; }
.cmp-check { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); cursor: pointer; user-select: none; white-space: nowrap; }
.cmp-check input { accent-color: var(--red); width: 16px; height: 16px; }
.products-grid.list { grid-template-columns: 1fr; }
.products-grid.list .p-card { flex-direction: row; }
.products-grid.list .p-card .p-img { width: 220px; flex-shrink: 0; aspect-ratio: auto; }
.products-grid.list .p-card .p-foot { flex-direction: column; justify-content: center; border-top: 0; border-right: 1px solid #F0F2F6; width: 190px; }
.products-grid.list .p-card .p-foot .btn { flex: none; width: 100%; }
.products-grid.list .p-desc { display: block !important; }
.p-desc { display: none; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
.price-line { font-size: 13px; color: var(--green); font-weight: 500; }

/* ---------- Toolbar & filters ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: #fff; border-radius: var(--radius); padding: 10px 14px; box-shadow: var(--shadow); margin-bottom: 14px; border: 1px solid #E8ECF3; }
.toolbar select { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; }
.view-toggle a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 8px; color: var(--muted); border: 1px solid var(--line); }
.view-toggle a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid #E8ECF3; }
.filters-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters-head b { color: var(--navy); }
.f-group { border-bottom: 1px solid #EEF1F6; }
.f-group > summary { list-style: none; cursor: pointer; padding: 12px 16px; font-weight: 700; color: var(--navy); font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.f-group > summary::-webkit-details-marker { display: none; }
.f-group > summary::after { content: "\f107"; font-family: FontAwesome; color: var(--muted); }
.f-group[open] > summary::after { content: "\f106"; }
.f-body { padding: 0 16px 14px; max-height: 260px; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.f-opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; font-size: 13.5px; }
.f-opt input { accent-color: var(--red); width: 16px; height: 16px; flex-shrink: 0; }
.f-opt .c { margin-right: auto; font-size: 11.5px; color: var(--muted); background: var(--metal); border-radius: 10px; padding: 0 7px; }
.f-opt.zero { opacity: .45; }
.f-range { display: flex; gap: 8px; align-items: center; }
.f-range input, .f-body select { width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: 6px 8px; }
.filters-foot { padding: 12px 16px; display: none; gap: 8px; }
.filter-open-btn { display: none; }

/* ---------- Supplier card (IQS) ---------- */
.s-card { background: #fff; border-radius: var(--radius-lg); border: 1px solid #E6EAF1; box-shadow: var(--shadow); padding: 18px; display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(0, 220px); gap: 18px; margin-bottom: 16px; position: relative; overflow: hidden; }
.s-card.is-featured { border: 1.5px solid #EBC75A; background: linear-gradient(180deg, #FFFCF2, #fff 40%); }
.s-card .featured-ribbon { position: absolute; top: 14px; left: -1px; background: var(--red); color: #fff; font-size: 11px; padding: 1px 10px; border-radius: 0 6px 6px 0; font-family: Tahoma, Arial; z-index: 2; }
.s-logo-link { display: block; flex-shrink: 0; }
.s-main { min-width: 0; }
.s-logo { width: 96px; height: 96px; border-radius: 14px; border: 1px solid var(--line); object-fit: contain; background: #fff; padding: 6px; }
.logo-ph { display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; font-weight: 700; font-size: 26px; border-radius: 14px; }
.s-card h3 { margin: 0 0 2px; font-size: 17px; }
.s-card h3 a { color: var(--navy); }
.s-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 12px; margin: 4px 0 8px; }
.s-cap { font-size: 13px; margin: 6px 0; }
.s-cap b { color: var(--navy); }
.s-thumbs { position: relative; margin-top: 10px; max-width: 100%; min-width: 0; }
.s-thumbs-track { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scroll-behavior: smooth; scrollbar-width: none; padding-bottom: 2px; max-width: 100%; }
.s-thumbs-track::-webkit-scrollbar { display: none; }
.s-thumb { flex: 0 0 104px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--metal); display: block; }
.s-thumb img { width: 100%; height: 78px; object-fit: contain; padding: 6px; display: block; }
.s-thumb span { display: block; font-size: 11px; padding: 3px 6px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff; }
.s-thumbs .nav { position: absolute; top: 28px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--navy); cursor: pointer; z-index: 2; box-shadow: var(--shadow); }
.s-thumbs .nav.prev { right: -10px; } .s-thumbs .nav.next { left: -10px; }
.s-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; border-right: 1px solid #EEF1F6; padding-right: 18px; min-width: 0; }
.s-actions .btn { white-space: normal; text-align: center; max-width: 100%; }

/* ---------- Showroom ---------- */
.showroom-head { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; margin-top: 18px; border: 1px solid #E8ECF3; }
.showroom-cover { height: 170px; background: linear-gradient(120deg, var(--navy-dark), var(--navy) 50%, var(--navy-3)); position: relative; background-size: cover; background-position: center; }
.showroom-cover::after { content: ""; position: absolute; inset: 0; background: url('/images/hero-pattern.svg'); background-size: 420px; opacity: .12; }
.showroom-info { display: flex; gap: 20px; padding: 0 24px 20px; align-items: flex-end; flex-wrap: wrap; }
.showroom-info .s-logo { width: 120px; height: 120px; margin-top: -55px; position: relative; z-index: 2; box-shadow: var(--shadow-lg); }
.showroom-info .logo-ph.s-logo { font-size: 36px; }
.showroom-info h1 { margin: 10px 0 2px; font-size: 1.5rem; }
.showroom-info .grow { flex: 1; min-width: 260px; }
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 0 0 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none; background: #fff; border-radius: var(--radius) var(--radius) 0 0; padding: 0 10px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 12px 16px; color: var(--muted); font-weight: 500; border: 0; background: none; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs a.active, .tabs button.active { color: var(--red); border-bottom-color: var(--red); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.info-list li span:first-child { color: var(--muted); min-width: 130px; }
.info-list li b { color: var(--navy); font-weight: 500; }
.project-item { display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; background: #fff; }
.project-item .yr { background: var(--navy); color: #fff; border-radius: 10px; padding: 8px 10px; text-align: center; min-width: 70px; font-weight: 700; height: fit-content; }

/* ---------- Product page ---------- */
.product-top { display: grid; grid-template-columns: 1fr 1.1fr 300px; gap: 22px; margin-top: 18px; align-items: start; }
.gallery { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 14px; border: 1px solid #E8ECF3; }
.gallery-main { aspect-ratio: 1/1; background: linear-gradient(180deg, #F8FAFD, var(--metal)); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.gallery-main img { max-width: 100%; max-height: 100%; object-fit: contain; padding: 20px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none; padding-bottom: 2px; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumbs img { width: 68px; height: 68px; object-fit: contain; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; background: var(--metal); padding: 4px; }
.gallery-thumbs img.active { border-color: var(--red); }
.p-info h1 { font-size: 1.4rem; margin-bottom: 4px; }
.p-info .en-title { font-family: Tahoma, Arial; direction: ltr; text-align: right; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.key-specs { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; background: var(--metal); border-radius: 10px; overflow: hidden; }
.key-specs td { padding: 8px 12px; border-bottom: 1px solid #fff; }
.key-specs td:first-child { color: var(--muted); width: 40%; }
.key-specs td:last-child { color: var(--navy); font-weight: 500; }
.buy-box { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid #E8ECF3; padding: 18px; }
.buy-box .price { font-size: 15px; font-weight: 700; color: var(--green); margin-bottom: 10px; }
.buy-box .btn { margin-bottom: 8px; }
.seller-mini { display: flex; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.seller-mini img, .seller-mini .logo-ph { width: 52px; height: 52px; border-radius: 10px; object-fit: contain; border: 1px solid var(--line); font-size: 18px; }

/* ---------- Engineering data table (McMaster) ---------- */
.eng-wrap { position: relative; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--line); box-shadow: var(--shadow); }
.eng-scroll { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; border-radius: var(--radius-lg); position: relative; }
.eng-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 980px; }
.eng-table th { background: var(--navy); color: #fff; padding: 10px 12px; text-align: right; font-weight: 500; white-space: nowrap; position: relative; }
.eng-table th select { display: block; width: 100%; margin-top: 6px; border: 0; border-radius: 5px; padding: 3px 4px; font-size: 12px; background: rgba(255, 255, 255, .92); color: var(--navy); }
.eng-table td { padding: 10px 12px; border-bottom: 1px solid #E3E8F0; background: var(--metal); white-space: nowrap; }
.eng-table tr:nth-child(even) td { background: #F6F8FB; }
.eng-table tr:hover td { background: #FFF6F6; }
.eng-table td.code { font-family: Tahoma, Arial; direction: ltr; text-align: left; font-weight: 700; color: var(--navy); }
.eng-table .en { font-family: Tahoma, Arial; direction: ltr; unicode-bidi: embed; }
.eng-table .pin-1, .eng-table .pin-2 { position: sticky; z-index: 2; }
.eng-table .pin-1 { right: 0; min-width: 150px; width: 150px; }
.eng-table .pin-2 { right: 150px; min-width: 150px; width: 150px; box-shadow: -6px 0 8px -6px rgba(11, 30, 74, .35); }
.eng-table th.pin-1, .eng-table th.pin-2 { z-index: 3; background: var(--navy-dark); }
.eng-table td.pin-1, .eng-table td.pin-2 { background: #fff; }
.eng-table tr.sel td { background: #FFF1F1 !important; }
.eng-table tr.hide-row { display: none; }
.eng-table td.diff { color: var(--red); font-weight: 700; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.eng-table .act { display: flex; flex-direction: column; gap: 4px; }
.eng-table .act a { font-size: 12px; }
.scroll-hint { display: none; position: absolute; left: 10px; bottom: 10px; background: var(--red); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; pointer-events: none; animation: nudge 1.4s infinite; z-index: 5; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }
.eng-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.eng-compare-panel { display: none; padding: 12px 14px; background: #FFF8F8; border-top: 1px solid #F5D3D3; font-size: 13px; }
.eng-compare-panel.open { display: block; }

/* Asset box */
.asset-box { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.asset { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; color: var(--text); transition: all .15s; }
.asset:hover { border-color: var(--red); box-shadow: var(--shadow); }
.asset .ic { width: 46px; height: 46px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; color: #fff; background: var(--navy); }
.asset .ic.cad3d { background: #6D28D9; } .asset .ic.mtc { background: var(--green); } .asset .ic.datasheet { background: var(--red); } .asset .ic.manual { background: var(--amber); }
.asset b { display: block; font-size: 13.5px; color: var(--navy); line-height: 1.6; }
.asset small { color: var(--muted); font-size: 11.5px; }
.asset .lock { margin-right: auto; color: var(--gold); }

/* ---------- Compare (matrix) ---------- */
.cmp-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; min-width: 760px; }
.cmp-table th, .cmp-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: top; font-size: 13.5px; }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: right; background: var(--metal); color: var(--navy); font-weight: 700; width: 190px; position: sticky; right: 0; z-index: 2; }
.cmp-table thead td { vertical-align: top; }
.cmp-table .cmp-prod img { width: 120px; height: 100px; object-fit: contain; display: block; margin: 0 auto 8px; }
.cmp-table tr.differs td:not(:first-child) { color: var(--red); font-weight: 700; }
.cmp-table tr.differs td:first-child::after { content: " ≠"; color: var(--red); }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row.four { grid-template-columns: repeat(4, 1fr); }
.form-group { margin-bottom: 14px; }
.form-group label.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; cursor: pointer; }
.form-group label.check input { accent-color: var(--red); width: auto; }
.form-group label, .lbl { display: block; font-weight: 500; color: var(--navy); margin-bottom: 5px; font-size: 13.5px; }
.form-group label .req { color: var(--red); }
.input, .form-group input[type=text], .form-group input[type=email], .form-group input[type=password], .form-group input[type=tel], .form-group input[type=number], .form-group input[type=search], .form-group select, .form-group textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 9px; padding: 9px 12px; background: #fff; color: var(--text); outline: none; transition: border .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .input:focus { border-color: var(--navy-3); box-shadow: 0 0 0 3px rgba(29, 59, 128, .1); }
.form-group textarea { min-height: 110px; resize: vertical; }
.form-group .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.check-inline { display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; cursor: pointer; }
.check-inline input { accent-color: var(--red); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 12px; }
.check-grid label, .check-grid span { display: flex; align-items: center; gap: 6px; font-weight: 400 !important; }
.check-grid input { accent-color: var(--red); }
.dropzone { border: 2px dashed #B9C4D8; border-radius: 12px; padding: 18px; text-align: center; background: #FAFBFD; cursor: pointer; transition: all .15s; position: relative; }
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: var(--red-l); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .fa { font-size: 28px; color: var(--navy-3); }
.dropzone .fname { display: block; margin-top: 6px; color: var(--green); font-weight: 500; font-size: 13px; }
.rfq-quick { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; border-radius: var(--radius-lg); padding: 22px; position: relative; overflow: hidden; }
.rfq-quick::after { content: "\f1d8"; font-family: FontAwesome; position: absolute; left: 18px; top: 10px; font-size: 90px; opacity: .07; }
.rfq-quick h3 { color: #fff; margin-bottom: 4px; }
.rfq-quick p { color: #CCD5EA; font-size: 13px; }
.rfq-quick .form-group label { color: #E1E7F5; }
.rfq-quick .dropzone { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .35); color: #fff; }
.rfq-quick .dropzone .fa { color: #fff; }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; position: relative; }
.tbl { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
.tbl th { background: var(--metal); color: var(--navy); font-weight: 700; padding: 10px 12px; text-align: right; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #EDF0F5; vertical-align: middle; }
.tbl tr:hover td { background: #FAFBFD; }
.matrix th { background: var(--navy); color: #fff; text-align: center; }
.matrix td { text-align: center; }
.matrix td:first-child { text-align: right; font-weight: 700; color: var(--navy); background: var(--metal); }

/* ---------- Plans ---------- */
.plan-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1.5px solid var(--line); padding: 24px; display: flex; flex-direction: column; position: relative; }
.plan-card.gold { border-color: #EBC75A; box-shadow: 0 14px 40px rgba(184, 134, 11, .18); }
.plan-card.gold::before { content: "پیشنهاد ویژه"; position: absolute; top: -12px; right: 20px; background: var(--red); color: #fff; padding: 1px 12px; border-radius: 20px; font-size: 12px; }
.plan-card h3 { display: flex; align-items: center; gap: 8px; }
.plan-card .price { font-size: 26px; font-weight: 700; color: var(--navy); margin: 6px 0; }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 400; }
.plan-card ul { list-style: none; padding: 0; margin: 12px 0 18px; flex: 1; }
.plan-card li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; display: flex; justify-content: space-between; gap: 10px; }
.plan-card li span:first-child { color: var(--muted); }
.plan-card li b { color: var(--navy); text-align: left; }
.medal { width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; }
.medal.bronze { background: linear-gradient(135deg, #C77D3E, #8A4B1B); } .medal.silver { background: linear-gradient(135deg, #B7C0CD, #6B7689); } .medal.gold { background: linear-gradient(135deg, #F2CB4C, #B8860B); } .medal.free { background: var(--muted); }
.aud-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.aud-tabs .btn.active { background: var(--navy); color: #fff !important; border-color: var(--navy); }

/* ---------- Tenders / list items ---------- */
.t-item { background: #fff; border-radius: var(--radius-lg); border: 1px solid #E6EAF1; box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 12px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.t-item.featured { border-right: 4px solid var(--red); }
.t-item h3 { font-size: 15.5px; margin: 4px 0; }
.t-item h3 a { color: var(--navy); }
.t-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); }
.t-meta .fa { color: var(--navy-3); }
.countdown { text-align: center; background: var(--metal); border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.countdown b { display: block; color: var(--red); font-size: 15px; }
.countdown small { color: var(--muted); }
.lock-box { background: repeating-linear-gradient(45deg, #FAFBFD, #FAFBFD 10px, #F3F5F9 10px, #F3F5F9 20px); border: 1.5px dashed #C3CCDB; border-radius: var(--radius-lg); padding: 28px; text-align: center; }
.lock-box .fa-lock { font-size: 34px; color: var(--gold); }
.lock-box h4 { margin: 10px 0 6px; }
.locked-card { border-style: dashed; }
.feat-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.feat-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.feat-list li .fa-check { color: #1E8E4E; }
.feat-list li.no { color: var(--muted); }
.feat-list li.no .fa { color: var(--red); }
.special-cv { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.locked-card .card-body { background: repeating-linear-gradient(45deg, #FAFBFD, #FAFBFD 10px, #F3F5F9 10px, #F3F5F9 20px); }
.masked { filter: blur(4px); user-select: none; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; font-size: 13.5px; margin-bottom: 10px; }
.kv > div span { color: var(--muted); margin-left: 4px; }
.blur-text { filter: blur(6px); user-select: none; pointer-events: none; color: transparent; text-shadow: 0 0 8px rgba(24, 33, 58, .55); }
.owner-hidden { color: var(--muted); font-style: normal; background: var(--metal); padding: 1px 8px; border-radius: 4px; font-size: 12.5px; }
.exhibit-cta { background: linear-gradient(120deg, var(--navy-dark), var(--navy-3)); color: #fff; border-radius: var(--radius-lg); padding: 28px 26px; margin: 28px 0; display: grid; grid-template-columns: 1.4fr auto; gap: 18px; align-items: center; box-shadow: var(--shadow-lg); }
.exhibit-cta h3 { color: #fff; margin: 0 0 6px; font-size: 1.25rem; }
.exhibit-cta p { color: #C8D3EB; margin: 0; }
.exhibit-cta .btn { white-space: nowrap; }

/* ---------- Magazine ---------- */
.a-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #E8ECF3; display: flex; flex-direction: column; height: 100%; }
.a-card .a-img { aspect-ratio: 16/9; background: var(--metal); display: block; position: relative; overflow: hidden; }
.a-card .a-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.a-card:hover .a-img img { transform: scale(1.04); }
.a-card .a-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; }
.a-card h3 { font-size: 15px; line-height: 1.75; }
.a-card h3 a { color: var(--navy); }
.a-card p { font-size: 13px; color: var(--muted); flex: 1; }
.a-card .a-meta { font-size: 12px; color: var(--muted); display: flex; gap: 12px; }
.a-type { position: absolute; top: 10px; right: 10px; }
.a-feature { display: grid; grid-template-columns: 1.3fr 1fr; background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 20px; }
.a-feature img { width: 100%; height: 100%; object-fit: cover; min-height: 280px; }
.a-feature .a-body { padding: 26px; }
.article-content { font-size: 15.5px; line-height: 2.1; }
.article-content h3, .article-content h4 { margin-top: 1.3em; }
.article-content table { width: 100%; border-collapse: collapse; margin: 14px 0; }
.article-content table th, .article-content table td { border: 1px solid var(--line); padding: 8px 10px; }
.article-content table th { background: var(--metal); }

/* ---------- Catalogs ---------- */
.c-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #E8ECF3; display: flex; flex-direction: column; transition: all .2s; }
.c-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.c-cover { aspect-ratio: 3/4; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-3) 60%, var(--red) 140%); color: #fff; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.c-cover::after { content: ""; position: absolute; inset: 0; background: url('/images/hero-pattern.svg'); background-size: 300px; opacity: .12; }
.c-cover img.cv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.c-cover .c-logo { width: 54px; height: 54px; border-radius: 10px; background: #fff; padding: 4px; object-fit: contain; position: relative; z-index: 1; }
.c-cover b { font-size: 15px; line-height: 1.7; position: relative; z-index: 1; }
.c-cover .yr { position: relative; z-index: 1; font-size: 12px; color: #D0D9EE; }
.c-body { padding: 12px 14px; font-size: 13px; }
.c-body a.cn { color: var(--navy); font-weight: 500; }
.pdf-viewer { width: 100%; height: 78vh; border: 0; border-radius: var(--radius-lg); background: #525659; }

/* ---------- Events ---------- */
.e-item { display: flex; gap: 16px; background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid #E8ECF3; padding: 16px; margin-bottom: 14px; }
.e-date { width: 86px; flex-shrink: 0; border-radius: 12px; background: var(--navy); color: #fff; text-align: center; padding: 10px 6px; }
.e-date b { display: block; font-size: 26px; line-height: 1.2; }
.e-date span { font-size: 12px; color: #C9D3EA; }
.e-item.past { opacity: .6; }
.e-desc p { margin: 0 0 .4em; } .e-desc p:last-child { margin-bottom: 0; }
.exhibitors { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.exhibitors a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; background: var(--metal); padding: 2px 10px 2px 4px; border-radius: 20px; color: var(--navy); }
.exhibitors img, .exhibitors .logo-ph { width: 22px; height: 22px; border-radius: 50%; object-fit: contain; background: #fff; font-size: 10px; }

/* ---------- Alerts, empty, stats ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 14px; font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--blue-l); color: #1E3A8A; }
.alert-ok { background: var(--green-l); color: var(--green); }
.alert-warn { background: var(--amber-l); color: var(--amber); }
.alert-red { background: var(--red-l); color: var(--red-d); }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); background: #fff; border-radius: var(--radius-lg); border: 1px dashed var(--line); }
.empty .fa { font-size: 42px; color: #B6C0D2; display: block; margin-bottom: 10px; }
.stat { background: #fff; border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; border: 1px solid #E8ECF3; }
.stat .ic { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; color: #fff; background: var(--navy); flex-shrink: 0; }
.stat .ic.red { background: var(--red); } .stat .ic.green { background: var(--green); } .stat .ic.amber { background: var(--amber); }
.stat b { display: block; font-size: 22px; color: var(--navy); line-height: 1.3; }
.stat span { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 6px; justify-content: center; margin: 22px 0 6px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--navy); padding: 0 10px; }
.pager .cur { background: var(--navy); color: #fff; border-color: var(--navy); }
.az-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 14px; }
.az-bar a { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 500; }
.az-bar a.active { background: var(--red); color: #fff; border-color: var(--red); }

/* ---------- Trust / verification ---------- */
.level-card { background: #fff; border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); border-top: 5px solid var(--blue); height: 100%; }
.level-card.l2 { border-top-color: var(--green); } .level-card.l3 { border-top-color: var(--gold); }
.level-card .num { font-size: 40px; font-weight: 700; color: var(--metal-2); float: left; line-height: 1; }

/* ---------- Account layout ---------- */
.acc-layout { display: grid; grid-template-columns: 260px 1fr; gap: 22px; margin-top: 0; align-items: start; }
.acc-side { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow); border: 1px solid #E8ECF3; overflow: hidden; position: sticky; top: 140px; }
.acc-user { background: linear-gradient(135deg, var(--navy), var(--navy-3)); color: #fff; padding: 18px; }
.acc-user b { display: block; font-size: 15px; }
.acc-user small { color: #C9D3EA; }
.acc-menu a { display: flex; align-items: center; gap: 10px; padding: 11px 18px; color: var(--text); border-bottom: 1px solid #F1F3F7; font-size: 13.5px; }
.acc-menu a .fa { width: 20px; color: var(--navy-3); text-align: center; }
.acc-menu a:hover, .acc-menu a.active { background: var(--red-l); color: var(--red); }
.acc-menu a.active .fa { color: var(--red); }
.acc-menu .sep { padding: 10px 18px 4px; font-size: 11.5px; color: var(--muted); font-weight: 700; background: #FAFBFD; }

/* ---------- Compare bar, toast, modal ---------- */
.compare-bar { position: fixed; bottom: 0; right: 0; left: 0; background: var(--navy); color: #fff; z-index: 300; transform: translateY(110%); transition: transform .25s; border-top: 3px solid var(--red); padding-bottom: env(safe-area-inset-bottom, 0); }
.compare-bar.show { transform: translateY(0); }
body.has-compare { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
.compare-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
.compare-chips { display: flex; flex-wrap: nowrap; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none; max-width: 100%; flex: 1; min-width: 0; }
.compare-chips::-webkit-scrollbar { display: none; }
.compare-in .chip { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); margin: 2px; font-size: 12px; }
.compare-actions { display: flex; gap: 8px; }
.compare-actions .btn-ghost { color: #fff !important; }
.toast-wrap { position: fixed; top: 90px; left: 20px; z-index: 600; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lg); border-right: 4px solid var(--red); max-width: 360px; animation: tin .25s; }
@keyframes tin { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
.modal { display: none; position: fixed; inset: 0; background: rgba(7, 20, 52, .6); z-index: 500; align-items: center; justify-content: center; padding: 16px; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius-lg); max-width: 640px; width: 100%; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; }
.modal-head h3 { margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #B9C4DD; margin-top: 30px; }
.footer-trust { background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.trust-in { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 22px 18px; }
.trust-in > div { display: grid; grid-template-columns: 46px 1fr; column-gap: 12px; align-items: center; }
.trust-in .fa { grid-row: span 2; width: 46px; height: 46px; border-radius: 12px; background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.trust-in b { color: #fff; font-size: 14px; }
.trust-in span { font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr; gap: 26px; padding: 34px 18px 26px; }
.footer-grid h4 { color: #fff; font-size: 14.5px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--red); display: inline-block; }
.footer-grid a { display: block; color: #B9C4DD; padding: 3px 0; font-size: 13.5px; }
.footer-grid a:hover { color: #fff; padding-right: 4px; }
.footer-grid .muted { color: #8E9BBA; font-size: 13px; }
.brand-footer .brand-text b { color: #fff; }
.socials { display: flex; gap: 8px; margin-top: 10px; }
.socials a { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: inline-flex !important; align-items: center; justify-content: center; color: #fff; padding: 0 !important; }
.socials a:hover { background: var(--red); }
.newsletter { display: flex; gap: 6px; }
.newsletter input { flex: 1; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .06); border-radius: 8px; padding: 7px 10px; color: #fff; min-width: 0; outline: none; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 0; font-size: 12.5px; color: #8592B2; }
.footer-bottom-in { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; text-align: center; }
.footer-credit a { color: #B9C4DD; display: inline; padding: 0; }
.footer-credit a:hover { color: #fff; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 980px; margin: 34px auto; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.auth-side { background: linear-gradient(150deg, var(--navy-dark), var(--navy) 60%, var(--navy-3)); color: #fff; padding: 40px; position: relative; overflow: hidden; }
.auth-side::after { content: ""; position: absolute; left: -80px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; border: 44px solid rgba(215, 20, 26, .3); }
.auth-side h2 { color: #fff; }
.auth-side li { margin-bottom: 8px; color: #D2DAEE; }
.auth-form { padding: 36px 40px; }
.otp-input { text-align: center; font-size: 26px !important; letter-spacing: 12px; font-weight: 700; direction: ltr; }
.otp-sent { background: var(--bg, #F4F6FA); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.otp-sent b { direction: ltr; display: inline-block; }
.otp-test { border: 2px dashed var(--red); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; text-align: center; color: var(--navy); }
.otp-test b { font-size: 24px; letter-spacing: 6px; color: var(--red); direction: ltr; display: inline-block; }
.otp-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }
.otp-foot .disabled { pointer-events: none; opacity: .45; }
.type-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.type-pick label { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 8px; text-align: center; cursor: pointer; font-size: 12.5px; transition: all .15s; }
.type-pick label .fa { display: block; font-size: 22px; color: var(--navy-3); margin-bottom: 4px; }
.type-pick input { display: none; }
@media (hover: hover) and (pointer: fine) {
  .touch-x, .eng-scroll, .tbl-wrap, .s-thumbs-track, .gallery-thumbs, .tabs, .nav-links, .az-bar, .sub-chips, .acc-menu, .compare-chips { cursor: grab; }
  .touch-x.is-dragging, .eng-scroll.is-dragging, .tbl-wrap.is-dragging, .s-thumbs-track.is-dragging, .gallery-thumbs.is-dragging, .tabs.is-dragging, .az-bar.is-dragging, .sub-chips.is-dragging, .acc-menu.is-dragging, .compare-chips.is-dragging { cursor: grabbing; user-select: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .product-top { grid-template-columns: 1fr 1fr; }
  .product-top .buy-col { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-about, .footer-news { grid-column: span 3; }
  .g-6 { grid-template-columns: repeat(3, 1fr); }
  .g-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .mobile-only { display: inline-flex !important; }
  .hide-md { display: none !important; }
  .container { padding: 0 14px; }
  .topbar { font-size: 11.5px; }
  .topbar-in { min-height: 32px; gap: 8px; }
  .topbar-contact span { margin-left: 0; }
  .topbar-links { display: flex; align-items: center; gap: 6px; overflow: hidden; }
  .topbar-links a { margin-right: 0; white-space: nowrap; }
  .topbar-cta { padding: 3px 10px; font-size: 11px; }

  .site-header { position: sticky; top: 0; }
  .header-in {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-areas: "menu brand actions" "search search search";
    gap: 8px 10px; align-items: center; padding-top: 10px; padding-bottom: 10px; min-height: 0;
  }
  #navToggle { grid-area: menu; width: 42px; height: 42px; }
  .header-in > .brand { grid-area: brand; min-width: 0; }
  .header-in .brand-text small { display: none; }
  .header-in .brand-logo { width: 40px; height: 40px; }
  .header-in .brand-text b { font-size: 18px; }
  .header-in > .header-actions { grid-area: actions; margin: 0; gap: 6px; }
  .header-in .header-actions .btn { padding: 7px 10px; }
  .header-in > .search-box {
    grid-area: search; order: unset; flex-basis: auto; max-width: none; width: 100%;
    border-width: 1.5px; border-radius: 10px;
  }
  .search-scope { max-width: 96px; padding: 0 8px; font-size: 12px; border-radius: 0 8px 8px 0; }
  .search-input { padding: 10px 10px; font-size: 16px; }
  .search-btn { width: 48px; border-radius: 8px 0 0 8px; }
  .main-nav { display: none !important; }

  .hero { padding: 28px 0 48px; }
  .hero-in { grid-template-columns: 1fr; gap: 18px; }
  .hero h1 { font-size: 1.45rem; margin-bottom: 10px; }
  .hero p.lead { font-size: 14px; }
  .hero-search { flex-direction: column; gap: 8px; padding: 10px; margin: 16px 0 12px; border-radius: 12px; }
  .hero-search input { padding: 12px 12px; font-size: 16px; width: 100%; }
  .hero-search .btn { width: 100%; }
  .hero-tags { gap: 6px; }
  .hero-stats { gap: 10px; }
  .hero-stat { padding: 14px; }
  .hero-stat b { font-size: 22px; }
  .hero-stat .fa { float: none; display: block; margin-bottom: 6px; }

  .pillars { margin-top: -28px; }
  .pillars .grid.g-3 { grid-template-columns: 1fr; }
  .pillar { padding: 16px; gap: 12px; }
  .pillar .ic { width: 44px; height: 44px; font-size: 18px; }

  .section { padding: 26px 0 4px; }
  .section-title { gap: 8px; margin-bottom: 14px; align-items: flex-start; }
  .section-title h2 { font-size: 1.15rem; }
  .section-title h2::before { height: 22px; width: 5px; }
  .section-title a { font-size: 12.5px; white-space: nowrap; }

  .g-3, .g-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-tags a { padding: 4px 10px; font-size: 12px; }
  .layout-side, .layout-side.left, .acc-layout { grid-template-columns: 1fr; gap: 14px; }
  .acc-side { position: static; overflow: visible; }
  .acc-menu {
    display: flex; flex-wrap: nowrap; gap: 6px; padding: 10px; overflow-x: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none;
  }
  .acc-menu::-webkit-scrollbar { display: none; }
  .acc-menu .sep { display: none; }
  .acc-menu a {
    flex: 0 0 auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 20px;
    padding: 8px 14px; border-bottom: 1px solid var(--line); background: #fff; font-size: 12.5px;
  }
  .acc-menu a.active { border-color: var(--red); }

  .s-card {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 10px 12px; padding: 14px; width: 100%; max-width: 100%;
  }
  .s-card .s-logo, .s-logo { width: 64px; height: 64px; }
  .s-card .s-main { min-width: 0; grid-column: 2; }
  .s-card .s-logo-link { grid-column: 1; grid-row: 1; }
  .s-card h3 { font-size: 15px; }
  .s-meta { gap: 8px; font-size: 12px; }
  .s-cap { font-size: 12.5px; }
  .s-actions {
    grid-column: 1 / -1; grid-row: auto; flex-direction: column; border-right: 0; padding-right: 0;
    border-top: 1px solid #EEF1F6; padding-top: 12px; width: 100%; max-width: 100%;
  }
  .s-actions .btn { width: 100%; box-sizing: border-box; }
  .s-thumbs { max-width: 100%; }
  .s-thumbs .nav { display: none; }
  .s-thumb { flex: 0 0 86px; }
  .s-thumb img { height: 64px; }
  .a-feature { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; margin: 16px 12px; }
  .auth-side { display: none; }
  .auth-form { padding: 22px 16px; }
  .sticky { position: static; }

  .site-main > .page-head + .container,
  .site-main > .page-head + .section { margin-top: 20px; }
  .site-main > .container:first-child { padding-top: 14px; }
  .page-head { padding: 20px 0 22px; }
  .page-head h1 { font-size: 1.25rem; }

  .exhibit-cta { grid-template-columns: 1fr; text-align: center; padding: 20px 16px; margin: 18px 0; }
  .exhibit-cta .btn { width: 100%; }
  .hdr-ad { min-height: 64px; margin: 10px 0 14px; border-radius: 8px; }
  .hdr-ad-copy { padding: 12px 14px; padding-left: 52px; }
  .hdr-ad-title { font-size: 13px; }
  .hdr-ad-desc { font-size: 11.5px; }
  .side-ad-media { height: 88px; }
  .rfq-quick { padding: 16px; }
  .rfq-quick .flex-between { flex-direction: column; align-items: stretch; gap: 12px; }
  .rfq-quick .btn { width: 100%; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .p-card .p-body { padding: 10px; }
  .p-card h3 { font-size: 13px; }
  .p-card .p-foot { flex-direction: column; align-items: stretch; padding: 8px 10px 10px; gap: 6px; }
  .p-card .p-foot .btn { width: 100%; flex: none; }
  .p-card .cmp-check { justify-content: center; }
  .products-grid.list .p-card { flex-direction: column; }
  .products-grid.list .p-card .p-img { width: 100%; aspect-ratio: 4/3; }
  .products-grid.list .p-card .p-foot { width: 100%; flex-direction: column; border-right: 0; border-top: 1px solid #F0F2F6; }

  .toolbar { gap: 8px; padding: 10px; }
  .toolbar .flex { width: 100%; justify-content: space-between; }
  .t-item { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .countdown { text-align: right; }
  .product-top { grid-template-columns: 1fr; gap: 14px; }
  .product-top .buy-col { grid-column: auto; }
  .showroom-info { padding: 0 14px 16px; gap: 12px; }
  .showroom-info .s-logo { width: 88px; height: 88px; margin-top: -40px; }
  .tabs a, .tabs button { padding: 11px 12px; font-size: 13px; }
  .plan-card { padding: 18px; }
  .aud-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; scrollbar-width: none; }
  .aud-tabs::-webkit-scrollbar { display: none; }
  .aud-tabs .btn { flex: 0 0 auto; white-space: nowrap; font-size: 12.5px; padding: 8px 12px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 18px; }
  .footer-about, .footer-news { grid-column: span 2; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }

  input, select, textarea,
  .form-group input[type=text], .form-group input[type=email], .form-group input[type=password],
  .form-group input[type=tel], .form-group input[type=number], .form-group input[type=search],
  .form-group select, .form-group textarea, .search-box input, .toolbar input, .toolbar select,
  .hero-search input {
    font-size: 16px !important;
  }

  .filter-open-btn { display: inline-flex; }
  .filters-panel {
    position: fixed; inset: auto 0 0 0; top: 10vh; z-index: 450;
    transform: translateY(110%); transition: transform .28s ease; visibility: hidden; pointer-events: none;
    display: flex; flex-direction: column; max-height: 90vh;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .filters-panel.open { transform: translateY(0); visibility: visible; pointer-events: auto; }
  .filters-panel .filters {
    border-radius: 18px 18px 0 0; height: 100%; min-height: 0;
    display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 -8px 30px rgba(11, 30, 74, .22);
  }
  .filters-panel .filters-scroll {
    flex: 1; min-height: 0; overflow: auto;
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y;
  }
  .filters-panel .filters-head::before { content: ""; position: absolute; top: 8px; right: 50%; transform: translateX(50%); width: 44px; height: 4px; border-radius: 3px; background: var(--line); }
  .filters-panel .filters-head { position: relative; padding-top: 22px; flex-shrink: 0; }
  .filters-foot { display: flex; border-top: 1px solid var(--line); background: #fff; box-shadow: 0 -6px 16px rgba(11, 30, 74, .08); flex-shrink: 0; }
  .filters-foot .btn { flex: 1; }

  .scroll-hint { display: block; }
  .az-bar, .sub-chips {
    flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain; touch-action: pan-x pan-y; scrollbar-width: none; padding-bottom: 4px;
  }
  .az-bar::-webkit-scrollbar, .sub-chips::-webkit-scrollbar { display: none; }
  .az-bar a, .sub-chips > * { flex: 0 0 auto; }
  .cmp-table th:first-child, .cmp-table td:first-child { min-width: 110px; width: 110px; }
  .toast-wrap { top: auto; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); left: 10px; right: 10px; align-items: stretch; }
  .toast { max-width: none; }
  .compare-bar { padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
  body.has-compare { padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .overlay { -webkit-tap-highlight-color: transparent; }
}

@media (max-width: 640px) {
  body { font-size: 14px; }
  .hide-sm { display: none !important; }
  .container { padding: 0 12px; }
  .topbar-links a:not(.topbar-cta) { display: none; }
  .topbar-cta { border-radius: 16px; font-size: 11px; padding: 3px 10px; }
  .brand-text b { font-size: 17px; }

  /* هدر جمع‌وجور: یک ردیف؛ جستجوی هیرو در صفحه اصلی کافی است */
  body.home .header-in {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-areas: "menu brand actions";
    gap: 8px;
  }
  body.home .header-in > .search-box { display: none; }

  .hero { padding: 18px 0 32px; }
  .hero h1 { font-size: 1.2rem; line-height: 1.5; margin-bottom: 6px; }
  body.home .hero p.lead { display: none; }
  .hero p.lead {
    font-size: 13px; line-height: 1.7; margin: 0 0 4px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .hero .pill { font-size: 11px; padding: 2px 10px; max-width: 100%; white-space: normal; text-align: center; }
  .hero-search { margin: 12px 0 10px; padding: 8px; gap: 8px; }
  .hero-search .btn { padding: 11px 14px; }
  .hero-tags { gap: 6px; max-height: 68px; overflow: hidden; }
  .hero-tags > .muted { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr; gap: 6px; }
  .hero-stat { padding: 8px 10px; }
  .hero-stat b { font-size: 17px; }
  .hero-stat span { font-size: 10.5px; line-height: 1.35; }
  .hero-stat .fa { font-size: 16px; margin-bottom: 2px; }

  .pillars { margin-top: -18px; }
  .pillar { padding: 14px; gap: 10px; }
  .pillar .ic { width: 40px; height: 40px; font-size: 16px; }
  .pillar b { font-size: 13.5px; }
  .pillar p { font-size: 12px; line-height: 1.65; }

  /* دسته‌ها و کاتالوگ: دو ستون فشرده؛ بقیه تک‌ستون */
  .g-2, .g-4, .g-6 { grid-template-columns: 1fr; gap: 12px; }
  .g-3, .g-5,
  .g-6.keep-2, .g-5.keep-2, .g-4.keep-2, .g-3.keep-2 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid.g-4.keep-2 { grid-template-columns: repeat(2, 1fr); }

  /* ویترین محصولات در موبایل: دو ستون فشرده (نه کارت‌های غول‌پیکر تک‌ستونه) */
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .p-card { display: flex; flex-direction: column; }
  .p-card .p-img { aspect-ratio: 1/1; }
  .p-card .p-img img { padding: 8px; }
  .p-card .p-body { padding: 8px 10px 6px; }
  .p-card .p-foot { flex-direction: column; align-items: stretch; padding: 6px 8px 8px; gap: 6px; }
  .p-card .p-foot .btn { width: 100%; flex: none; font-size: 12px; padding: 7px 8px; }
  .p-card .cmp-check { display: none; }
  .p-card .p-flags { top: 6px; right: 6px; }
  .p-card .fav { top: 6px; left: 6px; width: 30px; height: 30px; }
  .p-card .p-specs { display: none; }
  .p-card .p-brand { font-size: 11px; }
  .p-card .p-brand img, .p-card .p-brand .logo-ph { width: 18px; height: 18px; }
  .p-card .price-line { font-size: 11.5px; }
  .p-card h3 { font-size: 12.5px; line-height: 1.55; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .p-card .p-model { display: none; }

  .cat-tile { padding: 12px; }
  .cat-tile .ic { width: 40px; height: 40px; font-size: 18px; margin-bottom: 8px; }
  .cat-tile h3 { font-size: 13.5px; }
  .cat-tile ul { display: none; }
  .cat-tile .cnt { font-size: 11.5px; }

  .s-card { padding: 12px; gap: 10px; grid-template-columns: 56px minmax(0, 1fr); }
  .s-card .s-logo, .s-logo { width: 56px; height: 56px; }
  .s-card .s-main > .muted { font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .s-card .s-cap { display: none; }
  .s-thumbs { margin-top: 8px; }
  .s-thumb { flex: 0 0 78px; }
  .s-thumb img { height: 56px; padding: 4px; }
  .s-thumb span { font-size: 10px; }
  .s-actions .btn { font-size: 13px; padding: 9px 12px; }

  .section-title { flex-wrap: wrap; }
  .section-title h2 { font-size: 1.05rem; }
  .hdr-ad { min-height: 56px; }
  .hdr-ad-desc { display: none; }
  .rfq-quick h3 { font-size: 15px; }
  .rfq-quick p { font-size: 12.5px; }
  .exhibit-cta { padding: 16px 14px; }
  .exhibit-cta h3 { font-size: 15px; }

  .form-row, .form-row.three { grid-template-columns: 1fr; }
  .form-row.four { grid-template-columns: 1fr 1fr; gap: 10px; }
  .trust-in { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-about, .footer-news { grid-column: auto; }
  .type-pick { grid-template-columns: 1fr; }
  .e-item { flex-direction: column; gap: 10px; }
  .e-date { width: auto; display: flex; gap: 10px; align-items: center; justify-content: flex-start; }
  .compare-in { flex-wrap: wrap; gap: 8px; }
  .compare-actions { width: 100%; }
  .compare-actions .btn { flex: 1; }
  .eng-table .pin-1 { min-width: 108px; width: 108px; }
  .eng-table .pin-2 { right: 108px; min-width: 100px; width: 100px; }
  .stat { padding: 14px; gap: 10px; }
  .stat .ic { width: 42px; height: 42px; font-size: 18px; }
  .stat b { font-size: 18px; }
  .site-main { padding-bottom: 28px; }
  .card-body { padding: 14px; }
  .btn-lg { padding: 12px 16px; font-size: 14.5px; width: 100%; }
  .section .g-2 .card-body .flex { flex-direction: column; align-items: stretch; }
  .section .g-2 .card-body .btn { width: 100%; justify-content: center; }
}

