/* ==========================================================================
   Possy — каталог номенклатуры с мониторингом цен
   Bootstrap 5.3 · демо-тема
   ========================================================================== */

:root,
[data-bs-theme="light"] {
  --brand: #1b86e8;
  --brand-600: #1470cc;
  --brand-700: #0f5aa8;
  --brand-050: #eaf5ff;
  --brand-100: #cfe8ff;
  --ink: #101828;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e9f1;
  --line-2: #eef2f8;
  --bg: #f6f8fc;
  --up: #f43f5e;
  --up-bg: #fff1f4;
  --down: #0284c7;
  --down-bg: #e8f4ff;
  --flat: #98a2b3;
  --amber: #f59e0b;
  --amber-bg: #fff8e6;
  --violet: #8b5cf6;
  --violet-bg: #f4efff;
  --blue: #3b82f6;
  --blue-bg: #eaf2ff;
  --sky: #0ea5e9;

  --bs-body-bg: var(--bg);
  --bs-body-color: var(--ink);
  --bs-body-font-family: "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .9375rem;
  --bs-border-color: var(--line);
  --bs-border-radius: .625rem;
  --bs-border-radius-lg: .875rem;
  --bs-link-color: #1470cc;
  --bs-link-color-rgb: 20, 112, 204;
  --bs-link-hover-color: #0f5aa8;
  --bs-secondary-color: #667085;
  --bs-emphasis-color: #101828;
}

/* цветная полоска сверху страницы */
.accent-bar {
  height: 4px;
  background: linear-gradient(90deg, #38bdf8 0%, #22d3ee 28%, #60a5fa 52%, #a78bfa 74%, #fb7185 100%);
}

body { letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { letter-spacing: -.02em; font-weight: 700; }
a { text-underline-offset: 2px; }
::selection { background: #cfe8ff; color: #08243d; }
:focus-visible { outline: 3px solid rgba(27, 134, 232, .35); outline-offset: 2px; border-radius: .4rem; }
.container-xxl { max-width: 1340px; }

.mono { font-family: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace; }
.text-muted-2 { color: var(--muted-2) !important; }
.small-2 { font-size: .8125rem; }
.fs-13 { font-size: .8125rem; }
.fs-12 { font-size: .75rem; }
.fs-11 { font-size: .6875rem; }

/* основная кнопка: светлоголубая заливка + синий текст */
.btn-primary {
  --bs-btn-color: #0b4a8a;
  --bs-btn-hover-color: #083a6e;
  --bs-btn-active-color: #083a6e;
  --bs-btn-disabled-color: #9db6c9;
  --bs-btn-bg: #dcefff;
  --bs-btn-border-color: #a6d2f5;
  --bs-btn-hover-bg: #cbe6ff;
  --bs-btn-hover-border-color: #7fbdf0;
  --bs-btn-active-bg: #b6dcff;
  --bs-btn-active-border-color: #6fb2e9;
  --bs-btn-disabled-bg: #eef6fd;
  --bs-btn-disabled-border-color: #dce9f5;
  background-image: linear-gradient(135deg, #e4f3ff 0%, #c9e6ff 100%);
  border-color: #a6d2f5;
  color: #0b4a8a;
  box-shadow: 0 2px 8px rgba(27, 134, 232, .14), inset 0 1px 0 rgba(255, 255, 255, .9);
  font-weight: 600;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background-image: linear-gradient(135deg, #d8edff 0%, #b6dcff 100%);
  border-color: #7fbdf0;
  color: #083a6e;
  box-shadow: 0 4px 14px rgba(27, 134, 232, .20), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.btn-primary:active {
  background-image: linear-gradient(135deg, #c9e6ff 0%, #a7d3fb 100%);
  border-color: #6fb2e9;
  color: #083a6e;
  box-shadow: inset 0 2px 6px rgba(27, 134, 232, .16);
}
.btn-primary.is-watching {
  background-image: linear-gradient(135deg, #cbe6ff 0%, #a7d3fb 100%);
  border-color: #7fbdf0;
  box-shadow: 0 3px 12px rgba(27, 134, 232, .16), inset 0 1px 0 rgba(255, 255, 255, .9);
}
.btn-check:checked + .btn-primary, .btn-primary:disabled, .btn-primary.disabled {
  background-image: none;
  background-color: #eef6fd;
  color: #9db6c9;
  border-color: #dce9f5;
  box-shadow: none;
}

.btn { --bs-btn-border-radius: .625rem; --bs-btn-padding-y: .5rem; --bs-btn-padding-x: .875rem; --bs-btn-font-size: .875rem; }
.btn-lg { --bs-btn-padding-y: .7rem; --bs-btn-padding-x: 1.15rem; --bs-btn-font-size: .9375rem; }
.btn-sm { --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .65rem; --bs-btn-font-size: .8125rem; }

.btn-soft {
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #dbe3ee;
  --bs-btn-color: #101828;
  --bs-btn-hover-bg: #f2f9ff;
  --bs-btn-hover-border-color: #38bdf8;
  --bs-btn-hover-color: #0f5aa8;
  font-weight: 600;
}
.btn-ghost {
  --bs-btn-bg: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-color: #101828;
  --bs-btn-hover-bg: #eff8ff;
  --bs-btn-hover-border-color: transparent;
  --bs-btn-hover-color: #0f5aa8;
  font-weight: 600;
}

/* --- верхняя полоса ------------------------------------------------------ */
.topbar {
  background: #fff;
  color: #667085;
  font-size: .75rem;
  letter-spacing: .01em;
  border-bottom: 1px solid var(--line-2);
}
.topbar a { color: #475467; text-decoration: none; }
.topbar a:hover { color: var(--brand-700); text-decoration: underline; }
.topbar .sep { color: #d0d5dd; }
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .22);
  display: inline-block;
  flex: 0 0 auto;
}

/* --- шапка --------------------------------------------------------------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  z-index: 1030;
  transition: box-shadow .2s ease;
}
.site-header.is-stuck { box-shadow: 0 8px 24px rgba(16, 24, 40, .07); }

.logo { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 40px; height: 40px; flex: 0 0 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #7dd3fc 0%, #38bdf8 42%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}
.logo-mark svg { width: 23px; height: 23px; }
.logo-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.logo-tag { font-size: .625rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: .1em; }

.nav-main { display: flex; gap: .15rem; align-items: center; }
.nav-main a {
  padding: .45rem .7rem;
  border-radius: 8px;
  color: #344054;
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.nav-main a:hover { background: #f1f7f4; color: var(--brand-600); }
.nav-main a.is-active { color: var(--brand-700); font-weight: 700; background: linear-gradient(135deg, #eaf5ff, #eef2ff); }

.search-shell {
  display: flex;
  align-items: center;
  border: 1.5px solid #dfe6ef;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search-shell:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(27, 134, 232, .1); }
.search-shell .form-control { border: 0; box-shadow: none !important; height: 42px; font-size: .875rem; background: transparent; flex: 1 1 0; min-width: 0; width: auto; }
.search-shell .form-control::placeholder { color: #98a2b3; }
.search-shell .btn { margin: 3px; border-radius: 8px; padding: .4rem .8rem; }
.search-shell .search-icon { padding-left: .75rem; color: #98a2b3; display: inline-flex; }

/* --- хлебные крошки и заголовок ----------------------------------------- */
.breadcrumb { --bs-breadcrumb-divider: '›'; font-size: .8125rem; margin-bottom: 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: #1470cc; text-decoration: underline; }
.breadcrumb .active { color: var(--ink); }
.page-title { font-size: clamp(1.35rem, 2.2vw, 1.75rem); margin-bottom: .35rem; }
.page-lead { color: var(--muted); font-size: .9375rem; margin-bottom: 0; max-width: 46rem; }

/* --- блок заголовка: спокойный двухцветный градиент ---------------------- */
.hero-band {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: clamp(1rem, 2.4vw, 1.5rem);
  background:
    radial-gradient(620px 320px at 96% -22%, rgba(59, 130, 246, .20), transparent 64%),
    radial-gradient(520px 280px at 0% 122%, rgba(139, 92, 246, .15), transparent 66%),
    linear-gradient(118deg, #eff8ff 0%, #eaf2ff 52%, #f5f0ff 100%);
  border: 1px solid #e0eafa;
}
.hero-band > * { position: relative; z-index: 1; }
.hero-band .page-title { margin-bottom: .3rem; }
.hero-band .stat { box-shadow: 0 2px 8px rgba(16, 24, 40, .05); }

/* --- показатели ---------------------------------------------------------- */
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .8rem .9rem;
  height: 100%;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.stat-label { font-size: .75rem; color: #475467; display: flex; align-items: center; gap: .3rem; }
.stat .stat-ico {
  background: #fff;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .10);
}
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; margin-top: .15rem; }
.stat-value small { font-size: .75rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.stat-hint { font-size: .6875rem; color: var(--muted-2); }
.stat-ico {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--brand-050);
  color: var(--brand);
  flex: 0 0 30px;
}

/* --- боковые фильтры ---------------------------------------------------- */
.filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
}
.filter-card + .filter-card { margin-top: .75rem; }
.filter-title {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #3a4a40;
  margin-bottom: .65rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-link { font-size: .75rem; color: var(--muted); text-decoration: none; text-transform: none; letter-spacing: 0; font-weight: 500; }
.filter-link:hover { color: #1470cc; text-decoration: underline; }

.cat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .05rem; }
.cat-list a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .45rem;
  padding: .4rem .5rem;
  border-radius: 8px;
  color: #344054;
  font-size: .84375rem;
  text-decoration: none;
}
.cat-list a:hover { background: #f2f9ff; color: #1470cc; }
.cat-list a.is-active {
  background: linear-gradient(100deg, #eaf5ff 0%, #eef2ff 100%);
  color: var(--brand-700);
  font-weight: 700;
}
.cat-list .n { font-size: .6875rem; color: var(--muted-2); font-variant-numeric: tabular-nums; margin-left: auto; }
.cat-list .sub a { padding-left: 1.35rem; font-size: .8125rem; }

.form-check-label { font-size: .84375rem; color: #2a3a31; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #7fc09b; box-shadow: 0 0 0 .2rem rgba(21, 115, 71, .15); }
.price-range .form-control { font-size: .8125rem; height: 36px; }
.range-sep { color: var(--muted-2); font-size: .8125rem; }

/* --- панель результатов -------------------------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .1rem 0 .85rem;
}
.result-count { font-size: .8125rem; color: var(--muted); }
.result-count b { color: var(--ink); }
.sort-select {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: .8125rem;
  font-weight: 600;
  color: #2a3a31;
  padding: .4rem 1.9rem .4rem .65rem;
  max-width: 220px;
}
.active-filters { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: #eaf5ff;
  color: #0f5aa8;
  border: 1px solid #bfe0ff;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  padding: .2rem .55rem;
}
.filter-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  line-height: 1;
  font-size: .9rem;
  opacity: .6;
}
.filter-chip button:hover { opacity: 1; }

/* --- карточка товара ----------------------------------------------------- */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.product-card:hover {
  border-color: #b9d9f2;
  box-shadow: 0 14px 30px rgba(16, 24, 40, .10);
  transform: translateY(-2px);
}
.pc-media {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--tint, #f4f6f2) 0%, var(--tint2, #ffffff) 100%);
  overflow: hidden;
}
.pc-media::after {
  content: "";
  position: absolute;
  right: -30px; bottom: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  filter: blur(18px);
  pointer-events: none;
}
.pc-media svg.goods {
  position: relative;
  width: 52%;
  height: auto;
  filter: drop-shadow(0 8px 12px rgba(19, 32, 26, .12));
  transition: transform .3s ease;
}
.product-card:hover .pc-media svg.goods { transform: scale(1.04); }
.pc-media-hit { position: absolute; inset: 0; z-index: 1; display: block; border: 0; padding: 0; background: transparent; cursor: pointer; text-decoration: none; }
.pc-media .pc-change { position: absolute; right: .55rem; top: .55rem; z-index: 2; }

.pc-brand {
  position: absolute;
  left: .55rem; top: .55rem;
  z-index: 2;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(19, 32, 26, .06);
  border-radius: 6px;
  padding: .15rem .4rem;
  font-size: .6875rem;
  font-weight: 700;
  color: #2a3a31;
  letter-spacing: .02em;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pc-change {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  border-radius: 6px;
  padding: .18rem .38rem;
  font-size: .6875rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.pc-change.down { background: linear-gradient(135deg, #38bdf8, #0284c7); box-shadow: 0 2px 6px rgba(2, 132, 199, .25); }
.pc-change.up { background: linear-gradient(135deg, #fb7185, #f43f5e); box-shadow: 0 2px 6px rgba(244, 63, 94, .22); }
.pc-change.flat { background: #98a2b3; }

.pc-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: .7rem .8rem .75rem; gap: .28rem; }
.pc-title { font-size: .875rem; font-weight: 600; line-height: 1.3; margin: 0; min-height: 2.5em; }
.pc-title a { color: var(--ink); text-decoration: none; }
.pc-title a:hover { color: #1470cc; text-decoration: underline; text-decoration-thickness: 1px; }
.pc-barcode { font-size: .6875rem; color: var(--muted-2); display: flex; align-items: center; gap: .3rem; }
.pc-barcode svg { width: 13px; height: 13px; }

.pc-price { margin-top: auto; padding-top: .5rem; display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; }
.pc-min-label { font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.pc-min-value { font-size: 1.45rem; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.pc-avg { font-size: .6875rem; color: var(--muted); line-height: 1.5; text-align: right; }
.pc-avg b { color: #2a3a31; font-weight: 600; }

.spark { display: block; width: 100%; height: 34px; margin: .1rem 0 .2rem; }
.spark .area { opacity: .14; }
.spark .line { fill: none; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark circle { r: 2; }

.pc-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  font-size: .6875rem;
  color: var(--muted);
  border-top: 1px solid var(--line-2);
  padding-top: .5rem;
  margin-top: .15rem;
}
.pc-actions { display: flex; gap: .35rem; margin-top: .55rem; }
.pc-actions .btn { flex: 1 1 auto; }
.icon-action {
  flex: 0 0 34px;
  width: 34px; height: 34px;
  border: 1px solid #dbe3dc;
  border-radius: 8px;
  background: #fff;
  display: grid; place-items: center;
  color: #64756a;
  transition: all .15s ease;
}
.icon-action:hover { border-color: #38bdf8; color: #0f5aa8; background: #eaf5ff; }
.icon-action.is-active { border-color: #1b86e8; color: #fff; background: #1b86e8; }
.icon-action svg { width: 16px; height: 16px; }

/* CTA внутри карточки — мягкий индиго, чтобы карточки не были стерильно-белыми */
.pc-actions .btn-soft {
  --bs-btn-bg: #eaf5ff;
  --bs-btn-border-color: #bfe0ff;
  --bs-btn-color: #0f5aa8;
  --bs-btn-hover-bg: #1b86e8;
  --bs-btn-hover-border-color: #1b86e8;
  --bs-btn-hover-color: #fff;
}

/* --- таблица снижений ---------------------------------------------------- */
.drop-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .1rem;
  border-bottom: 1px solid var(--line-2);
}
.drop-item:last-child { border-bottom: 0; }
.drop-thumb {
  flex: 0 0 42px;
  width: 42px; height: 42px;
  border-radius: 9px;
  display: grid; place-items: center;
  background: var(--tint, #f4f6f2);
}
.drop-thumb svg { width: 64%; height: auto; }
.drop-body { min-width: 0; flex: 1 1 auto; }
.drop-name { font-size: .8125rem; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.drop-prices { font-size: .75rem; color: var(--muted); }
.drop-prices s { color: var(--muted-2); }
.drop-prices b { color: var(--ink); }

/* --- карточка «следить за ценой» ---------------------------------------- */
.alert-card {
  border-radius: 14px;
  border: 1px solid #cfe4ff;
  background: linear-gradient(135deg, #eef7ff 0%, #f7f2ff 100%);
  padding: 1rem;
}
.alert-card h3 { font-size: .9375rem; margin-bottom: .25rem; color: #0f5aa8; }
.alert-card p { font-size: .8125rem; color: #3f6055; margin-bottom: .75rem; }

/* --- карточка товара (страница) ----------------------------------------- */
.pd-media {
  background: linear-gradient(140deg, var(--tint, #f4f6f2) 0%, var(--tint2, #ffffff) 100%);
  border: 1px solid var(--line);
  border-radius: 16px;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.pd-media::after {
  content: "";
  position: absolute;
  right: -60px; bottom: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  filter: blur(26px);
  pointer-events: none;
}
.pd-media svg { width: 62%; height: auto; filter: drop-shadow(0 16px 24px rgba(19, 32, 26, .16)); }
.pd-media .pc-change { position: absolute; top: 1rem; right: 1rem; z-index: 2; }
.pd-title { font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.2; margin-bottom: .4rem; }
.pd-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; font-size: .8125rem; color: var(--muted); }
.pd-meta a { color: #1470cc; text-decoration: none; }
.pd-meta a:hover { text-decoration: underline; }
.chip-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: #f4f7fb;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: .25rem .5rem;
  font-size: .75rem;
  color: #344054;
  text-decoration: none;
}
a.chip-tag:hover { border-color: var(--brand); color: var(--brand-700); background: var(--brand-050); }

.price-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.price-card {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  padding: .7rem .8rem .7rem .95rem;
  position: relative;
  overflow: hidden;
}
.price-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--accent-bar, #1b86e8);
}
.price-card .label { font-size: .6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.price-card .value { font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.price-card .sub { font-size: .6875rem; color: var(--muted-2); }
.price-card.min { --accent-bar: linear-gradient(180deg, #7dd3fc, #0284c7); background: linear-gradient(135deg, #eff8ff, #f4f8ff 100%); }
.price-card.avg { --accent-bar: linear-gradient(180deg, #fbbf24, #f59e0b); background: linear-gradient(135deg, #fffbf0, #fff7f0 100%); }
.price-card.max { --accent-bar: linear-gradient(180deg, #fb7185, #f43f5e); background: linear-gradient(135deg, #fff4f6, #fdf3ff 100%); }

.card-plain { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.card-plain .card-head { background: linear-gradient(90deg, #f8fbff 0%, rgba(255,255,255,0) 60%); border-radius: 14px 14px 0 0; }
.card-plain .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--line-2);
  flex-wrap: wrap;
}
.card-plain .card-head h2 { font-size: .9375rem; margin: 0; }
.card-plain .card-body-p { padding: 1rem; }

/* график */
.chart-wrap { position: relative; height: 300px; overflow: hidden; }
.chart-wrap svg { display: block; width: 100%; height: 100%; }
.chart-legend { display: flex; flex-wrap: wrap; gap: .9rem; font-size: .75rem; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend-line { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.legend-line.dashed {
  background: repeating-linear-gradient(90deg, #f59e0b 0 4px, transparent 4px 7px);
}
.chart-grid-line { stroke: #eef2f8; stroke-width: 1; }
.chart-axis-label { fill: #98a2b3; font-size: 10px; font-family: "Segoe UI", sans-serif; }
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #101828;
  color: #fff;
  font-size: .6875rem;
  border-radius: 7px;
  padding: .35rem .5rem;
  line-height: 1.35;
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s ease;
  z-index: 5;
}
.chart-tooltip.show { opacity: 1; }
.period-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.period-switch button {
  border: 0;
  background: transparent;
  padding: .32rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  border-right: 1px solid var(--line);
}
.period-switch button:last-child { border-right: 0; }
.period-switch button.is-active { background: #eaf5ff; color: #0f5aa8; }

/* таблица предложений */
.offers-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.offers-table th {
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 700;
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.offers-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.offers-table tr:last-child td { border-bottom: 0; }
.offers-table .price-cell { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.blur-text { filter: blur(3.5px); user-select: none; color: #9aa8a0; }
.offer-row:hover { background: #fafbfa; }
.offer-best td { background: #eff8ff; }
.offer-best .price-cell { color: var(--brand-700); }

/* характеристики */
.spec-table { width: 100%; border-collapse: collapse; font-size: .8125rem; }
.spec-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  padding: .45rem 1rem .45rem 0;
  width: 42%;
  vertical-align: top;
}
.spec-table td { padding: .45rem 0; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.spec-table tr:last-child td, .spec-table tr:last-child th { border-bottom: 0; }

/* штрихкод */
.barcode-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .75rem;
  background: #fff;
  text-align: center;
}
.barcode-box svg { max-width: 100%; height: auto; }
.barcode-digits { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; letter-spacing: .16em; color: #3a4a40; margin-top: .15rem; }
.barcode-label { font-size: .6875rem; color: var(--muted-2); margin-top: .2rem; }

/* --- таблица «снижения» на странице каталога ---------------------------- */
.drop-card { background: linear-gradient(180deg, #ffffff 0%, #f5fbf8 100%); border: 1px solid var(--line); border-radius: 14px; padding: .4rem 1rem; }

/* --- подвал -------------------------------------------------------------- */
.site-footer {
  background: linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  color: #475467;
  padding-top: 2.5rem;
  font-size: .84375rem;
  border-top: 1px solid var(--line);
  position: relative;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #38bdf8, #22d3ee, #60a5fa, #a78bfa, #fb7185);
}
.site-footer h6 { color: #101828; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; margin-bottom: .8rem; }
.site-footer a { color: #475467; text-decoration: none; }
.site-footer a:hover { color: #1470cc; text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-bottom { border-top: 1px solid var(--line-2); margin-top: 2rem; padding-block: 1rem; font-size: .75rem; color: var(--muted-2); }

/* --- прочее -------------------------------------------------------------- */
.scroll-top {
  position: fixed;
  right: 1.25rem; bottom: 1.25rem;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, #38bdf8, #1b86e8);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 22px rgba(27, 134, 232, .32);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
  z-index: 1040;
}
.scroll-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.modal-content { border: 0; border-radius: 14px; }
.toast-container { z-index: 1090; }
.toast { border-radius: 10px; border: 0; box-shadow: 0 12px 28px rgba(16, 24, 40, .18); font-size: .8125rem; }
.offcanvas { --bs-offcanvas-width: 330px; }
.alert-note {
  font-size: .75rem;
  color: #8a6416;
  background: var(--amber-bg);
  border: 1px solid #fde3a7;
  border-radius: 8px;
  padding: .45rem .6rem;
}
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }

/* --- адаптив ------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .nav-main { display: none; }
  .site-header .search-shell { flex: 1 0 100%; }
}
@media (max-width: 575.98px) {
  .logo-tag { display: none; }
  .price-cards { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.15rem; }
  .stat-ico { display: none; }
  .stat { padding: .7rem .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

.text-accent { color: var(--down) !important; }
.badge-min { background: linear-gradient(135deg, #38bdf8, #0284c7); color: #fff; font-weight: 700; }
