/* ==========================================================================
   Мир Электроники: site theme (Bootstrap 5.3 on top)
   Brand colour is taken from img/logo.png (#42a184).
   ========================================================================== */

@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 400; src: url("../fonts/manrope-cyrillic-400.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 500; src: url("../fonts/manrope-cyrillic-500.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 600; src: url("../fonts/manrope-cyrillic-600.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 700; src: url("../fonts/manrope-cyrillic-700.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 800; src: url("../fonts/manrope-cyrillic-800.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 400; src: url("../fonts/manrope-latin-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 500; src: url("../fonts/manrope-latin-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 600; src: url("../fonts/manrope-latin-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 700; src: url("../fonts/manrope-latin-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 800; src: url("../fonts/manrope-latin-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Brand palette */
  --elc-primary: #42a184;        /* logo green */
  --elc-primary-rgb: 66, 161, 132;
  --elc-primary-dark: #2e7d65;   /* hover / text on light bg (AA contrast) */
  --elc-primary-soft: #e6f4ef;   /* tinted surfaces */
  --elc-deep: #0f2c25;           /* header bar, hero, footer */
  --elc-deep-2: #163d33;
  --elc-accent: #f2a93b;         /* warm accent, used sparingly (badges, highlights) */
  --elc-ink: #1b2a26;
  --elc-muted: #5b6d67;
  --elc-line: #dfe8e4;
  --elc-bg-alt: #f4f8f6;
  --elc-radius: 14px;
  --elc-shadow: 0 10px 30px -12px rgba(15, 44, 37, .18);

  /* Bootstrap overrides */
  --bs-primary: var(--elc-primary);
  --bs-primary-rgb: var(--elc-primary-rgb);
  --bs-link-color: var(--elc-primary-dark);
  --bs-link-color-rgb: 46, 125, 101;
  --bs-link-hover-color: var(--elc-deep-2);
  --bs-link-hover-color-rgb: 22, 61, 51;
  --bs-body-font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bs-body-color: var(--elc-ink);
  --bs-border-color: var(--elc-line);
  --bs-border-radius: 10px;
  --bs-border-radius-lg: var(--elc-radius);
  --bs-focus-ring-color: rgba(var(--elc-primary-rgb), .3);
}

body { -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }
h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-weight: 800; letter-spacing: -.02em; color: var(--elc-ink); }
.text-muted, .text-secondary { color: var(--elc-muted) !important; }
.text-primary { color: var(--elc-primary-dark) !important; }
.bg-primary { background-color: var(--elc-primary) !important; }
.bg-alt { background: var(--elc-bg-alt); }
.form-control:focus, .form-select:focus { border-color: var(--elc-primary); box-shadow: 0 0 0 .25rem rgba(var(--elc-primary-rgb), .2); }
.form-check-input:checked { background-color: var(--elc-primary); border-color: var(--elc-primary); }

.btn { font-weight: 700; border-radius: 10px; }
.btn-primary {
  --bs-btn-bg: var(--elc-primary); --bs-btn-border-color: var(--elc-primary);
  --bs-btn-hover-bg: var(--elc-primary-dark); --bs-btn-hover-border-color: var(--elc-primary-dark);
  --bs-btn-active-bg: var(--elc-primary-dark); --bs-btn-active-border-color: var(--elc-primary-dark);
  --bs-btn-disabled-bg: var(--elc-primary); --bs-btn-disabled-border-color: var(--elc-primary);
  --bs-btn-focus-shadow-rgb: var(--elc-primary-rgb);
}
.btn-outline-primary {
  --bs-btn-color: var(--elc-primary-dark); --bs-btn-border-color: var(--elc-primary);
  --bs-btn-hover-bg: var(--elc-primary); --bs-btn-hover-border-color: var(--elc-primary);
  --bs-btn-active-bg: var(--elc-primary-dark); --bs-btn-active-border-color: var(--elc-primary-dark);
  --bs-btn-focus-shadow-rgb: var(--elc-primary-rgb);
}
.btn-accent { --bs-btn-bg: var(--elc-accent); --bs-btn-border-color: var(--elc-accent); --bs-btn-color: #2b1d05; --bs-btn-hover-bg: #e59a26; --bs-btn-hover-border-color: #e59a26; --bs-btn-hover-color: #2b1d05; --bs-btn-active-bg: #d68d1c; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--elc-deep); color: rgba(255,255,255,.75); font-size: .85rem; }
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { color: var(--elc-primary); }
.topbar .bi { color: var(--elc-primary); margin-right: .35rem; }

.site-header { background: rgba(255,255,255,.96); backdrop-filter: saturate(160%) blur(8px); border-bottom: 1px solid var(--elc-line); }
.site-header .navbar { padding-block: .65rem; }
.site-header .navbar-brand img { height: 52px; width: auto; }
.site-header .nav-link { font-weight: 600; color: var(--elc-ink); padding-inline: .9rem !important; border-radius: 8px; }
.site-header .nav-link:hover { color: var(--elc-primary-dark); }
.site-header .nav-link.active { color: var(--elc-primary-dark); background: var(--elc-primary-soft); }
.header-search { min-width: 240px; }
.header-search .form-control { border-radius: 10px 0 0 10px; }
.header-search .btn { border-radius: 0 10px 10px 0; }
.request-btn { position: relative; white-space: nowrap; }
.request-count { position: absolute; top: -7px; right: -7px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--elc-accent); color: #2b1d05; font-size: .75rem; line-height: 22px; font-weight: 800; text-align: center; }
.request-count.is-empty { display: none; }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(var(--elc-primary-rgb), .3); }
@media (max-width: 991.98px) {
  .site-header .navbar-brand img { height: 42px; }
  .site-header .navbar-collapse { padding-block: .75rem; }
  .header-search { min-width: 0; margin-top: .5rem; }
}

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 400px at 85% 10%, rgba(var(--elc-primary-rgb), .35), transparent 60%),
    linear-gradient(160deg, var(--elc-deep) 0%, var(--elc-deep-2) 100%);
  padding: clamp(1.75rem, 4vw, 3rem) 0 clamp(2.5rem, 6vw, 4.5rem);
}
/* subtle PCB-trace pattern */
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.5) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}
.hero .container, .page-hero .container { position: relative; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; max-width: 16ch; }
.hero h1 span { color: var(--elc-primary); }
.hero .lead { color: rgba(255,255,255,.8); max-width: 46ch; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(var(--elc-primary-rgb), .18); color: #bfe6d8; font-weight: 700; font-size: .85rem; }

.search-box { background: #fff; border-radius: 16px; padding: .5rem; box-shadow: 0 24px 60px -20px rgba(0,0,0,.5); }
.search-box .form-control { border: 0; font-size: 1.1rem; padding: .9rem 1rem; box-shadow: none; }
.search-box .btn { padding-inline: 1.6rem; }
.search-hints { color: rgba(255,255,255,.65); font-size: .9rem; }
.search-hints a { color: #fff; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.45); margin-left: .4rem; }
.search-hints a:hover { color: var(--elc-primary); border-color: var(--elc-primary); }

.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--elc-radius); padding: 1.5rem; }
.hero-stat { display: flex; gap: 1rem; align-items: center; padding: .85rem 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-stat:last-child { border-bottom: 0; }
.hero-stat .bi { font-size: 1.6rem; color: var(--elc-primary); }
.hero-stat strong { display: block; font-size: 1.05rem; color: #fff; }
.hero-stat small { color: rgba(255,255,255,.65); }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--elc-deep) 0%, var(--elc-deep-2) 100%); color: #fff; padding: 2.5rem 0 2.25rem; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.5vw, 2.6rem); margin: 0; }
.page-hero .lead { color: rgba(255,255,255,.78); margin: .5rem 0 0; }
.page-hero .breadcrumb { --bs-breadcrumb-divider-color: rgba(255,255,255,.4); --bs-breadcrumb-item-active-color: rgba(255,255,255,.7); font-size: .85rem; margin-bottom: .75rem; }
.page-hero .breadcrumb a { color: #bfe6d8; text-decoration: none; }

/* ---------- Sections & cards ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: .5rem; }
.section-sub { color: var(--elc-muted); max-width: 60ch; }
.section-head { margin-bottom: 2.25rem; }
.section-head.text-center .section-sub { margin-inline: auto; }

.feature-card { height: 100%; background: #fff; border: 1px solid var(--elc-line); border-radius: var(--elc-radius); padding: 1.6rem; transition: transform .2s, box-shadow .2s, border-color .2s; }
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--elc-shadow); border-color: rgba(var(--elc-primary-rgb), .4); }
.feature-card h3 { font-size: 1.15rem; margin: 1rem 0 .5rem; }
.feature-card p { color: var(--elc-muted); margin: 0; }
.feature-icon { width: 52px; height: 52px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--elc-primary-soft); color: var(--elc-primary-dark); font-size: 1.5rem; }

.category-tile { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; border-radius: 12px; background: #fff; border: 1px solid var(--elc-line); font-weight: 700; color: var(--elc-ink); text-decoration: none; transition: border-color .2s, color .2s; }
.category-tile .bi { font-size: 1.4rem; color: var(--elc-primary); }
a.category-tile:hover { border-color: var(--elc-primary); color: var(--elc-primary-dark); }

.steps { counter-reset: step; }
.step { position: relative; height: 100%; padding: 1.5rem 1.4rem 1.4rem; border-radius: var(--elc-radius); background: #fff; border: 1px solid var(--elc-line); }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 1.1rem; right: 1.2rem; font-weight: 800; font-size: 1.8rem; color: rgba(var(--elc-primary-rgb), .22); }
.step .bi { font-size: 1.6rem; color: var(--elc-primary); }
.step h3 { font-size: 1.05rem; margin: .8rem 0 .35rem; }
.step p { color: var(--elc-muted); margin: 0; font-size: .95rem; }

.reason { display: flex; gap: 1.1rem; padding: 1.25rem 0; border-bottom: 1px solid var(--elc-line); }
.reason:last-child { border-bottom: 0; }
.reason-num { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--elc-primary); color: #fff; font-weight: 800; }
.reason h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.reason p { margin: 0; color: var(--elc-muted); }

.cta-band { border-radius: 20px; padding: clamp(2rem, 4vw, 3rem); color: #fff; background: radial-gradient(600px 240px at 90% 0%, rgba(255,255,255,.18), transparent 70%), linear-gradient(135deg, var(--elc-primary) 0%, var(--elc-primary-dark) 100%); }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); }
.cta-band .btn-light { color: var(--elc-primary-dark); }

.content-body { font-size: 1.05rem; line-height: 1.7; }
.content-body img { max-width: 100%; height: auto; border-radius: var(--elc-radius); }
.content-body h2 { margin-top: 2rem; }

/* ---------- Search results ---------- */
.results-table { --bs-table-hover-bg: var(--elc-primary-soft); font-size: .95rem; }
.results-table thead th { background: var(--elc-bg-alt); color: var(--elc-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; white-space: nowrap; border-bottom-width: 1px; }
.results-table td { vertical-align: middle; }
.results-table .pn { font-weight: 800; color: var(--elc-ink); white-space: nowrap; }
.results-table .desc { color: var(--elc-muted); font-size: .88rem; max-width: 340px; }
.results-table .price { font-weight: 700; white-space: nowrap; }
.stock-badge { display: inline-block; padding: .2rem .55rem; border-radius: 6px; background: var(--elc-primary-soft); color: var(--elc-primary-dark); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.datasheet-link { color: #d0453c; font-size: 1.3rem; }
@media (max-width: 767.98px) {
  .results-table thead { display: none; }
  .results-table, .results-table tbody, .results-table tr, .results-table td { display: block; width: 100%; }
  .results-table tr { border: 1px solid var(--elc-line); border-radius: 12px; margin-bottom: .9rem; padding: .6rem .9rem; background: #fff; }
  .results-table td { border: 0; padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
  .results-table td::before { content: attr(data-label); color: var(--elc-muted); font-size: .8rem; font-weight: 600; text-align: left; }
  .results-table td.pn::before, .results-table td.actions::before { content: none; }
  .results-table td.pn { font-size: 1.1rem; }
  .results-table td.actions { display: block; padding-top: .5rem; }
  .results-table td.actions .btn { width: 100%; }
  .results-table .desc { max-width: none; }
}

/* ---------- Request form ---------- */
.form-card { background: #fff; border: 1px solid var(--elc-line); border-radius: var(--elc-radius); padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--elc-shadow); }
.request-row { display: grid; grid-template-columns: 1fr 120px auto; gap: .5rem; margin-bottom: .5rem; }
@media (max-width: 575.98px) { .request-row { grid-template-columns: 1fr 90px auto; } }
.request-empty { border: 2px dashed var(--elc-line); border-radius: 12px; padding: 1.25rem; text-align: center; color: var(--elc-muted); }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Contacts ---------- */
.contact-item { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 0; border-bottom: 1px solid var(--elc-line); }
.contact-item:last-child { border-bottom: 0; }
.contact-item .feature-icon { flex: 0 0 auto; }
.contact-item small { display: block; color: var(--elc-muted); font-weight: 600; text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }
.contact-item a, .contact-item span.val { font-size: 1.1rem; font-weight: 700; color: var(--elc-ink); text-decoration: none; }
.contact-item a:hover { color: var(--elc-primary-dark); }
.map-wrap { border-radius: var(--elc-radius); overflow: hidden; border: 1px solid var(--elc-line); min-height: 360px; background: var(--elc-bg-alt); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Footer ---------- */
.site-footer { background: var(--elc-deep); color: rgba(255,255,255,.7); padding: 3.5rem 0 0; font-size: .95rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: rgba(255,255,255,.85); text-decoration: none; }
.site-footer a:hover { color: var(--elc-primary); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .55rem; }
.site-footer .bi { color: var(--elc-primary); margin-right: .45rem; }
.footer-logo { display: inline-block; background: #fff; border-radius: 12px; padding: .5rem .8rem; }
.footer-logo img { height: 44px; width: auto; display: block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding: 1.25rem 0; font-size: .85rem; color: rgba(255,255,255,.5); }

.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--elc-primary); color: #fff; font-size: 1.3rem; box-shadow: var(--elc-shadow); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; z-index: 1030; }
.to-top.show { opacity: 1; visibility: visible; }
.toast { border: 0; box-shadow: var(--elc-shadow); }
.toast .bi-check-circle-fill { color: var(--elc-primary); }

/* 404 */
.big-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; color: var(--elc-primary-soft); -webkit-text-stroke: 2px var(--elc-primary); }

/* fixes */
.search-box .btn, .header-search .btn { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.site-header .navbar-brand img { height: 62px; }
@media (max-width: 991.98px) { .site-header .navbar-brand img { height: 48px; } }
@media (max-width: 767.98px) { .results-table td > * { min-width: 0; overflow-wrap: anywhere; } }
