/* Порталът b2b.adig.bg — вариант Б, цветовете на логото: тъмносиньо за рамката, зелено за действията. */
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(fonts/golos-cyrillic-400.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 500; font-display: swap; src: url(fonts/golos-cyrillic-500.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(fonts/golos-cyrillic-600.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 700; font-display: swap; src: url(fonts/golos-cyrillic-700.woff2) format("woff2"); unicode-range: U+0400-04FF; }
@font-face { font-family: Golos; font-weight: 400; font-display: swap; src: url(fonts/golos-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Golos; font-weight: 500; font-display: swap; src: url(fonts/golos-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Golos; font-weight: 600; font-display: swap; src: url(fonts/golos-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }
@font-face { font-family: Golos; font-weight: 700; font-display: swap; src: url(fonts/golos-latin-700.woff2) format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC; }

:root {
  --navy: #003366; --ink: #0F2A44; --muted: #4F5D6B; --link: #1E5A96;
  --green: #2F7A1F; --green-dark: #24611A; --green-soft: #EAF3DE; --green-text: #27500A;
  --blue-soft: #EAF1F8; --bg: #F5F7F9; --field: #EEF2F6; --line: #E3E8EE; --line-2: #D3DBE4;
  --band: #3B7F1C; --shadow: 0 1px 2px rgba(15,42,68,.04), 0 6px 20px rgba(15,42,68,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 15px/1.5 Golos, system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--navy); }
h1 { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.015em; color: var(--navy); }
h2 { margin: 0; font-size: 18px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* Глава — тънка тъмносиня черта като под ADIG в логото */
.top { background: #fff; border-bottom: 2px solid var(--navy); position: sticky; top: 0; z-index: 5; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding-top: 10px; padding-bottom: 10px; }
.brand img { display: block; height: 34px; width: auto; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; }
.nav a { padding: 9px 14px; border-radius: 999px; color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--field); }
.nav a.on { background: #E6EEF6; color: var(--navy); font-weight: 600; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.who .name { font-size: 14px; color: var(--muted); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 19px; background: #E3EAF2; color: var(--navy); font-size: 13px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

.support-bar { background: #FAEEDA; color: #633806; font-size: 14px; }
.support-bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 16px; padding-top: 9px; padding-bottom: 9px; }
.support-bar .link-btn { color: #633806; font-weight: 600; }

main { flex: 1 0 auto; padding: 28px 0 56px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 8px 20px; }

.card { background: #fff; border-radius: 18px; padding: 20px 22px; box-shadow: var(--shadow); }
a.card { color: inherit; text-decoration: none; }
a.card:hover { box-shadow: 0 0 0 2px #E6EEF6, var(--shadow); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 14px; color: var(--muted); }
.stat .value { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.note { background: var(--blue-soft); border-radius: 16px; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.note strong { color: var(--navy); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 12px; border: 0;
  background: var(--green); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn-block { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chips a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 14px; text-decoration: none; }
.chips a.on { background: var(--navy); border-color: var(--navy); color: #fff; font-weight: 600; }
.chips select { height: 38px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font: inherit; color: var(--ink); }

.table-wrap { overflow-x: auto; }
table.docs { width: 100%; border-collapse: collapse; min-width: 720px; }
table.docs th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); }
table.docs td { padding: 13px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.docs tr:last-child td { border-bottom: 0; }
table.docs .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.files { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: flex-end; }
.files a { font-weight: 600; text-decoration: none; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill-paid { background: var(--green-soft); color: var(--green-text); }
.pill-open { background: #E9EEF3; color: var(--ink); }
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.doc-list li:first-child { border-top: 0; }
.doc-list .what { flex: 1 1 auto; display: flex; flex-direction: column; }
.doc-list .what span:first-child { font-weight: 600; }
.empty { padding: 28px 8px; text-align: center; color: var(--muted); }

/* Форми и вход */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input { height: 50px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #F9FBFC; font: inherit; color: var(--ink); }
.field input:focus { outline: 2px solid var(--link); outline-offset: 1px; background: #fff; }
.errors { margin: 0; padding: 12px 16px; list-style: none; border-radius: 12px; background: #FCEBEB; color: #791F1F; font-size: 14px; }
.alert { padding: 12px 16px; border-radius: 12px; background: var(--green-soft); color: var(--green-text); font-size: 14px; }
.auth-bar { background: #fff; border-bottom: 2px solid var(--navy); }
.auth-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 16px; padding-bottom: 16px; font-size: 14px; }
.auth-bar a { text-decoration: none; font-weight: 500; }
.auth { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 32px 16px 56px; }
.auth form { width: 100%; max-width: 420px; background: #fff; border-radius: 20px; padding: 36px 32px; box-shadow: 0 1px 2px rgba(15,42,68,.05), 0 12px 40px rgba(15,42,68,.08);
  display: flex; flex-direction: column; gap: 18px; }
.auth form img { height: 42px; width: auto; align-self: flex-start; }
.auth h1 { font-size: 26px; }
.narrow { max-width: 520px; }

/* Долу — зелена лента като на сайта */
.band { background: var(--band); color: #fff; }
.band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; font-size: 14px; }
.band a { color: #fff; text-decoration: none; }
.band a:hover { text-decoration: underline; }
.band .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }

/* Каталог */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.search { display: flex; gap: 8px; flex: 1 1 320px; max-width: 480px; }
.search input { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font: inherit; color: var(--ink); }
.search input:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.product { background: #fff; border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; box-shadow: var(--shadow); }
.product-img { display: flex; flex-direction: column; align-items: center; gap: 6px; background: var(--bg); border-radius: 14px; overflow: hidden; }
.product-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: contain; }
.product-name { display: flex; flex-direction: column; gap: 2px; }
.product-name a { font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
.product-name a:hover { color: var(--navy); text-decoration: underline; }
.packs { list-style: none; margin: 0; padding: 4px 12px; border-radius: 12px; background: var(--field); }
.packs li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 14px; }
.packs li:first-child { border-top: 0; }
.packs a { color: var(--ink); text-decoration: none; font-weight: 500; }
.packs a:hover { color: var(--navy); text-decoration: underline; }
.packs .num { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product .muted.small { margin-top: auto; }
.crumbs a { color: var(--muted); }
.product-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.product-img.big { padding-bottom: 12px; }
.label { font-size: 14px; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border-radius: 12px; background: var(--field); width: fit-content; max-width: 100%; }
.seg a { padding: 8px 16px; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: 15px; }
.seg a.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(15,42,68,.12); }
.price { display: flex; flex-direction: column; gap: 2px; }
.price .value { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; }
.facts dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-off, .btn-off:hover { background: var(--field); color: #8A96A3; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--field); color: var(--navy); }

/* Стока със снимка, описание, дозировка и фишове (прикачените в СКИПТЪР) */
.product-img.photo { background: #fff; border: 1px solid var(--line); }
.product-img.photo img { padding: 8px; }
.product-img.big.photo { padding: 16px; }
.product-img.big.photo img { aspect-ratio: 1 / 1; max-height: 460px; padding: 0; }
.latin { margin: 4px 0 0; }
.lead { margin: 0; font-size: 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 500; color: var(--muted); padding: 10px 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }
.tabs:not(.js) { display: none; } /* без JavaScript разделите стоят един под друг */
.panel + .panel { margin-top: 28px; }
.tabs.js ~ .panel { margin-top: 0; }
.panel > h2.sr-tab { margin-bottom: 12px; }
.tabs.js ~ .panel > h2.sr-tab { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.text { max-width: 820px; }
.text h3 { margin: 22px 0 8px; font-size: 16px; color: var(--navy); }
.text h3:first-child { margin-top: 0; }
.text p { margin: 0 0 10px; }
.text ul { margin: 0 0 10px; padding-left: 20px; }
.text li { margin: 4px 0; }
.text .dose { display: inline-block; padding: 10px 16px; margin-right: 8px; border-radius: 12px; background: var(--green-soft); color: var(--green-text); font-weight: 600; font-size: 17px; }
.tds { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.tds a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.tds a:hover { border-color: var(--line-2); background: var(--bg); }
.tds .ico { width: 36px; height: 44px; border-radius: 6px; background: #FCEBEB; color: #A32D2D; font-size: 11px; font-weight: 700; font-style: normal;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; flex: none; }
.tds span { display: flex; flex-direction: column; }
.tds b { font-weight: 600; }

/* Заявка: бутонът в горната лента, броят опаковки, кошницата */
.cart-btn { position: relative; width: 44px; height: 44px; border-radius: 12px; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center; }
.cart-btn:hover { background: var(--green-dark); color: #fff; }
.cart-btn .count { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px;
  background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.flash { margin: 0 0 18px; }
.buy { display: flex; flex-wrap: wrap; gap: 10px; }
.buy .btn { flex: 1 1 200px; height: 52px; font-size: 16px; }
.qty { display: flex; align-items: center; border-radius: 12px; background: var(--field); height: 52px; }
.qty input { width: 64px; height: 100%; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: 17px;
  color: var(--ink); text-align: center; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.qty input:focus { outline: 2px solid var(--link); outline-offset: -2px; border-radius: 10px; }
.qty .step { width: 46px; height: 100%; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 22px; cursor: pointer; border-radius: 12px; }
.qty .step:hover { background: var(--line); }
.cart { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cart-lines { flex: 999 1 560px; min-width: 0; gap: 12px; }
.cart .line { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 16px; }
.cart .line.gone { background: #FBFCFD; border: 1px dashed var(--line-2); box-shadow: none; }
.cart .thumb img { display: block; width: 76px; height: 76px; object-fit: contain; background: var(--bg); border-radius: 12px; }
.cart .what { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cart .what a { color: var(--ink); text-decoration: none; font-size: 17px; }
.cart .what a:hover { color: var(--navy); text-decoration: underline; }
.cart .qty { height: 44px; }
.cart .qty .step { width: 40px; }
.cart .qty input { width: 52px; font-size: 16px; }
.cart .sum { width: 110px; text-align: right; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart .x { width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: #8794A3; cursor: pointer;
  display: flex; align-items: center; justify-content: center; }
.cart .x:hover { background: var(--field); color: var(--ink); }
.cart textarea { padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; font: inherit; color: var(--ink); background: #F9FBFC; resize: vertical; }
.cart textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; background: #fff; }
.cart .total { flex: 1 1 320px; min-width: 0; position: sticky; top: 92px; padding: 24px; }
.cart .total .stack { gap: 16px; }
.when { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.when legend { margin-bottom: 8px; }
.when label { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.when input[type=radio] { width: 18px; height: 18px; accent-color: var(--green); }
.when input[type=date] { height: 40px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; color: var(--ink); background: #F9FBFC; }
.rows { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.rows div { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.rows .grand { padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink); align-items: baseline; }
.rows .grand span:first-child { font-weight: 600; }
.rows .grand span:last-child { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.btn-big { height: 56px; font-size: 17px; }
.btn[disabled] { background: var(--field); color: #8A96A3; cursor: not-allowed; }
.note-text { margin: 8px 0 0; white-space: pre-line; }

@media (max-width: 760px) {
  .product-page { grid-template-columns: 1fr; }
  .cart .total { position: static; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 26px; }
  .who .name { display: none; }
  .cart .line { gap: 12px; }
  .cart .thumb img { width: 56px; height: 56px; }
  .cart .what { flex-basis: calc(100% - 68px); }
  .cart .sum { width: auto; margin-left: auto; }
  .stat .value { font-size: 24px; }
}
