/* ART-GSM Style B — поповер «наличие по складам».
   Триггер: бейдж .av на листинге (.prod-qrow) и на PDP (.av-line).
   Логика: redesign2026/js/app.js. Данные: /local/ajax/ag_stores.php. */

/* ── аффорданс: бейдж-триггер кликабелен + шеврон-индикатор ── */
body.ag-styleb .prod-qrow .av:not(.av--no),
body.ag-styleb .pinfo .tags .av:not(.av--no),
body.ag-styleb .av-line .av:not(.av--no) {
  cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
body.ag-styleb .prod-qrow .av:not(.av--no)::after,
body.ag-styleb .pinfo .tags .av:not(.av--no)::after,
body.ag-styleb .av-line .av:not(.av--no)::after {
  content: "";
  width: 6px; height: 6px;
  margin-left: 5px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
  opacity: .5;
  transition: opacity .15s ease, transform .15s ease;
}
body.ag-styleb .prod-qrow .av:not(.av--no):hover::after,
body.ag-styleb .pinfo .tags .av:not(.av--no):hover::after,
body.ag-styleb .av-line .av:not(.av--no):hover::after,
body.ag-styleb .av.ag-stores-active::after { opacity: .9; }
body.ag-styleb .av.ag-stores-active::after { transform: rotate(225deg) translateY(2px); }

/* ── поповер ── */
.ag-stores-pop {
  position: fixed; z-index: 9999;
  width: 286px; max-width: calc(100vw - 16px);
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e4e7ee);
  border-radius: var(--r-card, 18px);
  box-shadow: var(--shadow-lg, 0 16px 40px rgba(15,17,21,.14));
  font-family: var(--font, 'Manrope', system-ui, sans-serif);
  color: var(--ink, #0f1115);
  padding: 6px;
  opacity: 0; transform: translateY(-4px);
  transition: opacity .14s ease, transform .14s ease;
}
.ag-stores-pop.is-open { opacity: 1; transform: none; }
.ag-stores-pop * { box-sizing: border-box; }
.ag-stores-pop *::before { content: none; } /* гасим маркеры/декор из глобальных стилей Aspro */

.ag-stores-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase;
  color: var(--ink-2, #4a4f5a);
  padding: 8px 10px 6px;
}
.ag-stores-close {
  border: 0; background: none; cursor: pointer; line-height: 0;
  padding: 3px; margin: -3px -4px -3px 0; border-radius: 7px;
  color: var(--ink-3, #8a909c);
}
.ag-stores-close:hover { color: var(--ink, #0f1115); background: var(--surface-2, #f1f3f7); }
.ag-stores-close svg { width: 14px; height: 14px; display: block; }

.ag-stores-list { margin: 0; padding: 0; }
.ag-stores-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 12px;
}
.ag-stores-row:hover { background: var(--surface-2, #f1f3f7); }
.ag-stores-name {
  display: flex; flex-direction: column; gap: 1px; min-width: 0;
  font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--ink, #0f1115);
}
.ag-stores-name small {
  font-size: 11px; font-weight: 500; color: var(--ink-3, #8a909c);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 172px;
}

/* бейдж наличия в строке — те же .av-бейджи, что и на сайте (base.css); не сжимать */
.ag-stores-row .av { flex: none; }

.ag-stores-foot {
  padding: 8px 10px 5px; margin: 3px 0 0;
  border-top: 1px solid var(--line, #e4e7ee);
  font-size: 12px; color: var(--ink-3, #8a909c);
}
.ag-stores-foot b { color: var(--ink, #0f1115); font-weight: 800; }
.ag-stores-empty { padding: 4px 10px 12px; font-size: 13px; color: var(--ink-3, #8a909c); }

/* переключатель «вернуться к старой версии» в подвале */
.footer-bottom .ag-design-switch { color: var(--ink-3, #8a909c); text-decoration: underline; text-underline-offset: 2px; transition: color .15s ease; }
.footer-bottom .ag-design-switch:hover { color: var(--accent, #2563eb); }
