.aasg-search-box,
.aasg-home-wrap,
.aasg-vin-box {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 16px;
  font-family: inherit;
}
.aasg-search-hero {
  padding: 34px;
  background: #f5f7fa;
  border: 1px solid #e6eaf0;
  border-radius: 18px;
}
.aasg-search-hero h1,
.aasg-vin-box h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.1;
}
.aasg-search-hero p,
.aasg-vin-box p {
  margin: 0 0 22px;
  font-size: 18px;
}
.aasg-form {
  display: flex;
  gap: 12px;
}
.aasg-form input,
.aasg-vin-form input,
.aasg-vin-form textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  font-size: 16px;
  background: #fff;
}
.aasg-vin-form textarea {
  min-height: 112px;
  padding-top: 12px;
  resize: vertical;
}
.aasg-form input {
  flex: 1;
  font-size: 18px;
}
.aasg-form button,
.aasg-add,
.aasg-vin-form button {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: #f28c28;
  color: #111;
  font-weight: 700;
  cursor: pointer;
}
.aasg-form button:hover,
.aasg-add:hover,
.aasg-vin-form button:hover {
  filter: brightness(0.95);
}
.aasg-add:disabled,
.aasg-vin-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.aasg-examples {
  margin-top: 12px;
  color: #697586;
  font-size: 14px;
}
.aasg-status,
.aasg-vin-status {
  margin: 20px 0 10px;
  color: #3d4754;
  font-weight: 600;
}
.aasg-card {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  padding: 18px;
  margin: 12px 0;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
}
.aasg-brand {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
}
.aasg-name {
  font-size: 17px;
  margin-bottom: 8px;
}
.aasg-meta {
  color: #5d6673;
  font-size: 14px;
  margin-top: 4px;
}
.aasg-price {
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 8px;
}
.aasg-card-side {
  text-align: right;
}
.aasg-card-side .aasg-add {
  margin-top: 12px;
  width: 100%;
}
.aasg-empty {
  padding: 18px;
  border: 1px dashed #cfd6df;
  border-radius: 12px;
}
.aasg-home-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}
.aasg-info-card,
.aasg-vin-box {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}
.aasg-info-card h2 {
  margin-top: 0;
}
.aasg-info-card ol {
  margin-bottom: 0;
  padding-left: 20px;
}
.aasg-info-card li {
  margin-bottom: 8px;
}
.aasg-vin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.aasg-vin-form label {
  display: block;
  font-weight: 700;
  color: #222;
  margin-bottom: 14px;
}
.aasg-vin-form label input,
.aasg-vin-form label textarea {
  margin-top: 6px;
  font-weight: 400;
}
.aasg-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}
@media (max-width: 760px) {
  .aasg-form,
  .aasg-card,
  .aasg-home-grid,
  .aasg-vin-grid {
    display: block;
  }
  .aasg-form input,
  .aasg-form button {
    width: 100%;
    margin-bottom: 10px;
  }
  .aasg-card-side {
    text-align: left;
    margin-top: 12px;
  }
  .aasg-search-hero,
  .aasg-info-card,
  .aasg-vin-box {
    padding: 20px;
  }
}

/* v0.4 landing */
.aasg-landing {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 16px 56px;
  font-family: inherit;
  color: #121826;
}
.aasg-landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  align-items: stretch;
  padding: clamp(28px, 5vw, 58px);
  border-radius: 28px;
  background: linear-gradient(135deg, #111827 0%, #1f2937 55%, #0f172a 100%);
  color: #fff;
  overflow: hidden;
}
.aasg-kicker {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(242, 140, 40, 0.16);
  color: #ffc37d;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 18px;
}
.aasg-hero-content h1 {
  margin: 0 0 14px;
  max-width: 820px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: .95;
  letter-spacing: -.04em;
}
.aasg-hero-content > p {
  max-width: 720px;
  margin: 0 0 22px;
  color: #d7dde8;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}
.aasg-landing .aasg-search-box {
  padding: 0;
  margin: 0;
  max-width: none;
}
.aasg-search-box-compact .aasg-search-hero {
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}
.aasg-search-box-compact .aasg-form input {
  min-height: 60px;
  border: 0;
  font-weight: 700;
}
.aasg-search-box-compact .aasg-form button {
  min-height: 60px;
  padding-left: 28px;
  padding-right: 28px;
}
.aasg-search-box-compact .aasg-examples,
.aasg-search-box-compact .aasg-status {
  color: #cbd5e1;
}
.aasg-search-box-compact .aasg-card {
  color: #121826;
}
.aasg-hero-panel {
  display: grid;
  gap: 12px;
}
.aasg-hero-panel div {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
}
.aasg-hero-panel strong {
  display: block;
  font-size: 34px;
  line-height: 1;
  color: #f28c28;
}
.aasg-hero-panel span {
  display: block;
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 14px;
}
.aasg-quick-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.aasg-quick-links a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}
.aasg-quick-links span {
  color: #ffc37d;
  font-weight: 800;
}
.aasg-section {
  margin-top: 34px;
}
.aasg-section-head {
  margin-bottom: 16px;
}
.aasg-section-head span,
.aasg-contact-strip span {
  color: #f28c28;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 13px;
}
.aasg-section-head h2,
.aasg-contact-strip h2 {
  margin: 6px 0 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.05;
}
.aasg-card-grid,
.aasg-steps,
.aasg-category-grid,
.aasg-split {
  display: grid;
  gap: 16px;
}
.aasg-card-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.aasg-card-grid article,
.aasg-steps div,
.aasg-category-grid div {
  padding: 22px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.aasg-card-grid h3,
.aasg-steps h3 {
  margin: 0 0 8px;
  font-size: 18px;
}
.aasg-card-grid p,
.aasg-steps p {
  margin: 0;
  color: #5b6575;
  line-height: 1.55;
}
.aasg-category-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.aasg-category-grid div {
  font-weight: 800;
  text-align: center;
}
.aasg-steps {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.aasg-steps b {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f28c28;
  color: #111;
  margin-bottom: 12px;
}
.aasg-split {
  grid-template-columns: 1fr 1fr;
}
.aasg-dark-card {
  background: #111827;
  color: #fff;
  border-color: #111827;
}
.aasg-dark-card p {
  color: #d7dde8;
}
.aasg-link-button {
  display: inline-flex;
  margin-top: 8px;
  min-height: 48px;
  align-items: center;
  padding: 0 18px;
  border-radius: 10px;
  background: #f28c28;
  color: #111 !important;
  font-weight: 900;
  text-decoration: none;
}
.aasg-contact-strip {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border-radius: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.aasg-contact-list p {
  margin: 0 0 8px;
}
.aasg-consent {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500 !important;
  color: #4b5563 !important;
}
.aasg-consent input {
  width: auto !important;
  min-height: 0 !important;
  margin-top: 4px !important;
}
@media (max-width: 980px) {
  .aasg-landing-hero,
  .aasg-card-grid-4,
  .aasg-category-grid,
  .aasg-steps,
  .aasg-split,
  .aasg-contact-strip {
    grid-template-columns: 1fr;
    display: grid;
  }
  .aasg-contact-strip {
    display: block;
  }
}


/* v0.10.0: карточки, изображения и фильтры выдачи */
.aasg-results-toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
}
.aasg-results-toolbar label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; color: #475569; }
.aasg-results-toolbar select { width: 100%; min-height: 42px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; }
.aasg-card { grid-template-columns: 132px minmax(0, 1fr) 220px; align-items: center; }
.aasg-card-image { width: 120px; height: 120px; display: grid; place-items: center; border: 1px solid #eef2f7; border-radius: 12px; background: #fff; overflow: hidden; }
.aasg-card-image img { width: 100%; height: 100%; object-fit: contain; padding: 10px; box-sizing: border-box; }
.aasg-card-heading { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.aasg-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12px; font-weight: 800; }
.aasg-stock, .aasg-delivery { margin-top: 7px; font-size: 14px; font-weight: 700; }
.aasg-stock.is-available { color: #15803d; }
.aasg-stock.is-empty { color: #b91c1c; }
.aasg-load-more-wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: 14px; margin: 18px 0 0; padding: 14px; border: 1px solid #e1e7ef; border-radius: 12px; background: #f8fafc; }
.aasg-load-more-wrap[hidden] { display: none !important; }
.aasg-load-more-count { justify-self: end; color: #7b8794; font-size: 12px; font-weight: 500; line-height: 1.35; text-align: right; }
.aasg-load-more { grid-column: 2; justify-self: center; display: block; margin: 0; min-height: 46px; min-width: 180px; padding: 0 28px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; font-weight: 800; cursor: pointer; }
.aasg-load-more:hover { background: #eef2f7; }
.aasg-load-more-spacer { grid-column: 3; }
@media (max-width: 560px) {
  .aasg-load-more-wrap { grid-template-columns: 1fr; row-gap: 10px; }
  .aasg-load-more-count { grid-column: 1; justify-self: center; text-align: center; }
  .aasg-load-more { grid-column: 1; width: 100%; }
  .aasg-load-more-spacer { display: none; }
}
@media (max-width: 900px) {
  .aasg-results-toolbar { grid-template-columns: 1fr 1fr; }
  .aasg-card { grid-template-columns: 92px minmax(0, 1fr); }
  .aasg-card-image { width: 82px; height: 82px; }
  .aasg-card-side { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; text-align: left; align-items: center; }
  .aasg-card-side .aasg-add { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .aasg-results-toolbar { grid-template-columns: 1fr; }
  .aasg-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); }
  .aasg-card-image { width: 70px; height: 70px; }
  .aasg-card-side { display: block; }
}


/* v0.10.21: quantity selector + non-redirecting AJAX cart notice */
.aasg-qty { display: grid; grid-template-columns: 1fr 82px; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; font-weight: 800; color: #475569; text-align: left; }
.aasg-qty input { width: 82px; min-height: 40px; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; box-sizing: border-box; text-align: center; font: inherit; }
.aasg-cart-notice { position: fixed; top: 24px; right: 24px; z-index: 999999; max-width: min(420px, calc(100vw - 32px)); padding: 14px 16px; border: 1px solid #86efac; border-radius: 10px; background: #f0fdf4; color: #166534; box-shadow: 0 10px 30px rgba(15, 23, 42, .16); font-weight: 700; opacity: 0; transform: translateY(-8px); transition: opacity .2s ease, transform .2s ease; }
.aasg-cart-notice.is-visible { opacity: 1; transform: translateY(0); }
.aasg-cart-notice a { margin-left: 8px; color: #166534; text-decoration: underline; white-space: nowrap; }
@media (max-width: 560px) { .aasg-cart-notice { top: 14px; right: 16px; left: 16px; max-width: none; } .aasg-qty { grid-template-columns: 1fr 92px; } .aasg-qty input { width: 92px; } }


/* v0.10.23: ссылка менеджера на выбранное клиентом API-предложение */
.aasg-card.is-selected-offer { outline: 3px solid #2563eb; outline-offset: 2px; }
.aasg-badge-selected { background: #dbeafe; color: #1d4ed8; }

/* v0.16.0: единый Part Resolver */
.aasg-resolver-modal { position: fixed; inset: 0; z-index: 1000000; display: grid; place-items: center; padding: 20px; background: rgba(15,23,42,.55); }
.aasg-resolver-dialog { position: relative; width: min(720px, 100%); max-height: min(760px, calc(100vh - 40px)); overflow: hidden; display: grid; grid-template-rows: auto auto auto minmax(120px,1fr) auto; gap: 14px; padding: 24px; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(15,23,42,.28); }
.aasg-resolver-dialog h3 { margin: 0; font-size: clamp(22px,3vw,30px); color: #0f172a; }
.aasg-resolver-dialog p { margin: 0; color: #475569; line-height: 1.5; }
.aasg-resolver-close { position: absolute; right: 14px; top: 12px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: #f1f5f9; font-size: 24px; line-height: 1; cursor: pointer; }
.aasg-resolver-filter { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cbd5e1; border-radius: 10px; box-sizing: border-box; }
.aasg-resolver-list { overflow: auto; display: grid; gap: 8px; padding-right: 4px; }
.aasg-resolver-item { display: grid; grid-template-columns: minmax(120px, 180px) minmax(0,1fr); gap: 4px 14px; width: 100%; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.aasg-resolver-item:hover { border-color: #fb923c; background: #fff7ed; }
.aasg-resolver-item strong { color: #0f172a; }
.aasg-resolver-item span { color: #334155; }
.aasg-resolver-item small { grid-column: 2; color: #64748b; }
.aasg-resolver-all { min-height: 46px; border: 1px solid #f97316; border-radius: 10px; background: #fff; color: #c2410c; font-weight: 800; cursor: pointer; }
.aasg-resolver-all:hover { background: #fff7ed; }
.aasg-resolver-empty { padding: 18px; color: #64748b; text-align: center; }
@media (max-width: 600px) { .aasg-resolver-dialog { padding: 20px 16px 16px; } .aasg-resolver-item { grid-template-columns: 1fr; } .aasg-resolver-item small { grid-column: 1; } }

/* v0.17.0: persistent search state + explicit source-part selection */
.aasg-part-selection { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0 4px; padding:11px 13px; border:1px solid #fed7aa; border-radius:12px; background:#fff7ed; color:#7c2d12; }
.aasg-part-selection strong { color:#9a3412; }
.aasg-part-selection button { min-height:36px; padding:0 12px; border:1px solid #fb923c; border-radius:9px; background:#fff; color:#9a3412; font-weight:800; cursor:pointer; }
.aasg-part-selection button:hover { background:#ffedd5; }
@media (max-width:600px){ .aasg-part-selection{align-items:flex-start; flex-direction:column;} .aasg-part-selection button{width:100%;} }

/* v0.17.1: simpler source-brand UX and query-code emphasis. */
.aasg-query-code{color:#2563eb;font-weight:800}
.aasg-resolver-query{color:#2563eb;font-weight:800}


/* v0.17.2: cleaner Part Resolver state + compact animated search progress. */
.aasg-part-selection[hidden] { display: none !important; }
.aasg-search-loading { display: inline-flex; align-items: center; gap: 9px; min-height: 22px; }
.aasg-search-spinner { width: 17px; height: 17px; flex: 0 0 17px; border: 2px solid #cbd5e1; border-top-color: #f97316; border-radius: 50%; animation: aasg-search-spin .86s linear infinite; box-sizing: border-box; will-change: transform; transform-origin: 50% 50%; }
.aasg-search-loading-text { display: inline-block; min-width: 110px; }
.aasg-search-loading-dots { display: inline-block; min-width: 18px; }
@keyframes aasg-search-spin { to { transform: rotate(360deg); } }

/* v0.17.3: keep spinner animation continuous while loading text changes. */

/* v0.17.4: place the continuous loading spinner to the right of the progress text. */

/* v0.18.1: temporary client-side supplier filter for search testing. */


/* v0.18.16: Alpha custom filter dropdowns + resolver/focus polish. */
.aasg-custom-select { position: relative; width: 100%; min-width: 0; }
.aasg-select-native {
  position: absolute !important;
  inline-size: 1px !important;
  block-size: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.aasg-select-trigger {
  width: 100%; min-width: 0; min-height: 42px; padding: 0 38px 0 12px;
  border: 1px solid #cbd5e1; border-radius: 9px; background: #fff; color: #0f172a;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; font: inherit; cursor: pointer; box-sizing: border-box;
}
.aasg-select-trigger:hover { border-color: #aeb7c2; }
.aasg-select-trigger:focus, .aasg-select-trigger:focus-visible {
  outline: 0; border-color: #e31c24; box-shadow: 0 0 0 3px rgba(227,28,36,.10);
}
.aasg-select-trigger-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aasg-select-chevron { width: 8px; height: 8px; flex: 0 0 8px; border-right: 2px solid #65707c; border-bottom: 2px solid #65707c; transform: rotate(45deg) translateY(-2px); transition: transform .16s ease; }
.aasg-custom-select.is-open .aasg-select-chevron { transform: rotate(225deg) translate(-1px,-1px); }
.aasg-select-menu {
  position: absolute; z-index: 10050; top: calc(100% + 6px); left: 0; right: 0;
  min-width: 0; max-width: 100%; max-height: min(280px, 45vh); overflow: auto;
  padding: 5px; border: 1px solid #d9dee4; border-radius: 10px; background: #fff;
  box-shadow: 0 16px 36px rgba(15,23,42,.16); box-sizing: border-box;
}
.aasg-custom-select.is-up .aasg-select-menu { top: auto; bottom: calc(100% + 6px); }
.aasg-select-menu[hidden] { display: none !important; }
.aasg-select-option {
  display: block; width: 100%; min-width: 0; padding: 9px 10px; border: 0; border-radius: 7px;
  background: #fff; color: #25303b; text-align: left; font: inherit; line-height: 1.25;
  white-space: normal; overflow-wrap: anywhere; cursor: pointer;
}
.aasg-select-option:hover, .aasg-select-option:focus-visible { outline: 0; background: #fff1f2; color: #b5121b; }
.aasg-select-option.is-selected { background: #f7f8fa; color: #0f172a; font-weight: 800; }
.aasg-select-option.is-selected::before { content: '✓'; display: inline-block; width: 18px; color: #e31c24; font-weight: 900; }
.aasg-select-option:disabled { opacity: .45; cursor: default; }

.aasg-qty input:focus, .aasg-qty input:focus-visible {
  outline: 0 !important; border-color: #e31c24 !important; box-shadow: 0 0 0 3px rgba(227,28,36,.10) !important;
}

.aasg-resolver-modal { padding: 12px; background: rgba(17,24,33,.60); box-sizing: border-box; }
.aasg-resolver-dialog {
  width: min(560px, calc(100vw - 24px)); max-height: min(720px, calc(100dvh - 24px));
  grid-template-rows: auto auto auto minmax(0,1fr) auto; gap: 12px; padding: 22px;
  border: 1px solid #e1e5e9; border-radius: 14px; box-sizing: border-box;
}
.aasg-resolver-dialog::before { content: ''; position: absolute; left: 22px; top: 0; width: 44px; height: 3px; background: #e31c24; }
.aasg-resolver-dialog h3 { padding-right: 42px; font-size: clamp(20px, 4vw, 26px); line-height: 1.18; letter-spacing: -.02em; }
.aasg-resolver-query { color: #e31c24; }
.aasg-resolver-dialog p { color: #69737e; line-height: 1.48; }
.aasg-resolver-close { right: 14px; top: 14px; width: 38px; height: 38px; background: #f3f5f7; color: #17202b; transition: background .15s ease, color .15s ease; }
.aasg-resolver-close:hover, .aasg-resolver-close:focus-visible { outline: 0; background: #fff0f1; color: #c6141d; }
.aasg-resolver-filter { min-height: 46px; border-color: #cfd6dd; border-radius: 8px; color: #17202b; }
.aasg-resolver-filter:focus, .aasg-resolver-filter:focus-visible { outline: 0; border-color: #e31c24; box-shadow: 0 0 0 3px rgba(227,28,36,.10); }
.aasg-resolver-list { min-height: 0; padding-right: 3px; overscroll-behavior: contain; }
.aasg-resolver-item { grid-template-columns: minmax(110px,160px) minmax(0,1fr); padding: 12px; border-color: #e1e5e9; border-radius: 9px; }
.aasg-resolver-item:hover, .aasg-resolver-item:focus-visible { outline: 0; border-color: #ef9ba0; background: #fff6f6; }
.aasg-resolver-item strong { color: #17202b; }
.aasg-resolver-item span { color: #3f4a55; }
.aasg-resolver-item small { color: #7d8792; }
.aasg-resolver-all { min-height: 46px; border-color: #e31c24; border-radius: 8px; color: #c6141d; }
.aasg-resolver-all:hover, .aasg-resolver-all:focus-visible { outline: 0; background: #fff3f4; border-color: #c6141d; }

@media (max-width: 600px) {
  .aasg-resolver-modal { place-items: center; padding: 8px; }
  .aasg-resolver-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 18px 14px 14px; gap: 10px; border-radius: 12px; }
  .aasg-resolver-dialog::before { left: 14px; width: 38px; }
  .aasg-resolver-dialog h3 { padding-right: 38px; font-size: 20px; }
  .aasg-resolver-close { right: 10px; top: 10px; width: 34px; height: 34px; }
  .aasg-resolver-item { grid-template-columns: 1fr; }
  .aasg-resolver-item small { grid-column: 1; }
  .aasg-select-menu { max-height: min(240px, 40vh); }
}

/* v0.18.17: grouped product cards aligned with Alpha vehicle-search card structure. */
.aasg-product-card{display:grid;grid-template-columns:120px minmax(0,1fr) minmax(190px,240px);gap:18px;align-items:center}
.aasg-product-card>.aasg-offers{grid-column:1/-1;border-top:1px solid #e2e5e9;padding-top:10px}
.aasg-badges{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:8px}
.aasg-badge-stock{background:#eaf7ef;color:#19723e}
.aasg-badge-analog{background:#f1f3f5;color:#626b75}
.aasg-product-card .aasg-name{margin:0 0 9px;font-size:19px;font-weight:800}
.aasg-tags{display:flex;flex-wrap:wrap;gap:7px}
.aasg-tags span{background:#eef3f8;padding:6px 9px;border-radius:8px;font-size:13px}
.aasg-muted{margin-top:10px;color:#66717f;font-size:14px}
.aasg-noimg{color:#8a95a3;font-size:13px;text-align:center}
.aasg-buy-controls{display:grid;gap:8px;margin-top:10px}
.aasg-quantity{display:grid;grid-template-columns:38px minmax(52px,1fr) 38px;align-items:stretch;min-height:40px;border:1px solid #cfd8e3;border-radius:9px;overflow:hidden;background:#fff}
.aasg-quantity input{width:100%;min-width:0;margin:0!important;padding:0 4px!important;border:0!important;border-left:1px solid #dbe3ec!important;border-right:1px solid #dbe3ec!important;border-radius:0!important;background:#fff!important;color:#17212d!important;text-align:center;font-weight:800;box-shadow:none!important;-moz-appearance:textfield}
.aasg-quantity input::-webkit-outer-spin-button,.aasg-quantity input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.aasg-quantity button{display:flex;align-items:center;justify-content:center;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#eef3f8!important;color:#273444!important;font-size:20px!important;font-weight:800!important;line-height:1!important;cursor:pointer!important;box-shadow:none!important}
.aasg-quantity button:hover,.aasg-quantity button:focus{background:#dfe7ef!important;color:#17212d!important;outline:0!important}
.aasg-buy-controls.is-compact{grid-template-columns:minmax(110px,1fr) minmax(105px,130px);align-items:stretch;margin-top:0}
.aasg-buy-controls.is-compact .aasg-quantity{min-height:36px;grid-template-columns:34px 48px 34px}
.aasg-add-small{min-height:36px!important;margin:0!important}
.aasg-offers summary{display:flex;align-items:center;gap:7px;list-style:none;cursor:pointer;font-weight:700;color:#1d2327;padding:8px 0;margin:0;text-decoration:none;background:transparent;border:0;outline:0}
.aasg-offers summary::-webkit-details-marker{display:none}
.aasg-offers summary::before{content:'▶';display:inline-block;font-size:10px;line-height:1;transform-origin:center;transition:transform .15s ease;color:inherit}
.aasg-offers[open]>summary::before{transform:rotate(90deg)}
.aasg-offers-list{display:grid;gap:8px;padding:4px 0 8px}
.aasg-offer-row{display:grid;grid-template-columns:minmax(80px,.5fr) minmax(100px,.7fr) minmax(110px,.8fr) minmax(130px,1fr) minmax(230px,1.2fr);align-items:center;gap:12px;padding:10px 12px;background:#f6f7f7;border:1px solid #dcdcde;border-radius:8px}
@media(max-width:900px){.aasg-product-card{grid-template-columns:82px minmax(0,1fr)}.aasg-product-card>.aasg-card-side,.aasg-product-card>.aasg-offers{grid-column:1/-1}.aasg-offer-row{grid-template-columns:1fr 1fr}.aasg-offer-buy{grid-column:1/-1}}
@media(max-width:560px){.aasg-product-card{grid-template-columns:72px minmax(0,1fr)}.aasg-buy-controls.is-compact{grid-template-columns:1fr}.aasg-offer-row{grid-template-columns:1fr}.aasg-offer-buy{grid-column:1}}


/* v0.18.18 — stable disclosures and customer-readable alternative offers. */
.aasg-card-image .aasg-placeholder-image,
.aasg-card-image img.is-placeholder { padding: 0; object-fit: contain; }
.aasg-offer-part { min-width: 0; display: grid; gap: 2px; }
.aasg-offer-part strong { overflow-wrap: anywhere; }
.aasg-offer-part span { color: #7a8490; font-size: 11px; line-height: 1.3; }
.aasg-offer-row { grid-template-columns: minmax(150px,1.2fr) minmax(90px,.55fr) minmax(110px,.7fr) minmax(120px,.8fr) minmax(230px,1.15fr); }
@media(max-width:900px){
  .aasg-offer-row{grid-template-columns:minmax(0,1fr) minmax(105px,.5fr)}
  .aasg-offer-part{grid-column:1/-1}
  .aasg-offer-buy{grid-column:1/-1}
}
@media(max-width:560px){
  .aasg-offer-row{grid-template-columns:1fr}
  .aasg-offer-part,.aasg-offer-buy{grid-column:1}
  .aasg-buy-controls.is-compact{grid-template-columns:116px minmax(0,1fr)}
  .aasg-buy-controls.is-compact .aasg-quantity{width:116px}
}


/* v0.18.19 — alternative offers: part → stock → delivery → quantity → price → action. */
.aasg-offer-row{
  grid-template-columns:minmax(180px,1.35fr) minmax(120px,.75fr) minmax(130px,.85fr) 150px minmax(80px,.5fr) minmax(118px,.62fr);
  grid-template-areas:"part stock delivery quantity price action";
  align-items:center;
}
.aasg-offer-row>.aasg-offer-part{grid-area:part}
.aasg-offer-row>.aasg-offer-stock{grid-area:stock}
.aasg-offer-row>.aasg-offer-delivery{grid-area:delivery}
.aasg-offer-row>.aasg-offer-price{grid-area:price;text-align:right;white-space:nowrap}
.aasg-offer-row>.aasg-offer-buy{display:contents}
.aasg-offer-row .aasg-buy-controls.is-compact{display:contents;margin:0}
.aasg-offer-row .aasg-buy-controls.is-compact>.aasg-quantity{grid-area:quantity;width:100%;min-width:0;min-height:40px;height:40px}
.aasg-offer-row .aasg-buy-controls.is-compact>.aasg-add{grid-area:action;width:100%;min-width:0;min-height:40px!important;height:40px;margin:0!important}
@media(max-width:900px){
  .aasg-offer-row{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"part part" "stock delivery" "price price" "quantity action";
    gap:8px 10px;
  }
  .aasg-offer-row>.aasg-offer-price{text-align:left}
}
@media(max-width:560px){
  .aasg-offer-row{grid-template-columns:minmax(0,1fr) minmax(118px,.8fr);grid-template-areas:"part part" "stock delivery" "price price" "quantity action"}
}

/* v0.18.27 — reuse the existing Alpha-style progress pattern instead of the text "Ищу…" loader. */
.aasg-search-progress { display:grid; gap:9px; width:100%; }
.aasg-search-progress-copy { display:grid; gap:2px; min-width:0; }
.aasg-search-progress-copy strong { font-size:13px; line-height:1.3; }
.aasg-search-progress-copy span { color:#68737d; font-size:12px; line-height:1.4; }
.aasg-search-progress-track { display:block; width:100%; height:6px; overflow:hidden; border-radius:999px; background:#e7ebf0; }
.aasg-search-progress-bar { display:block; width:0; height:100%; border-radius:inherit; background:#e51b23; transition:width .22s ease; }


/* Dynamic filter rerenders must not become browser scroll anchors. */
.aasg-search-box, .aasg-search-box [data-aasg-toolbar], .aasg-search-box [data-aasg-results], .aasg-search-box [data-aasg-load-more-wrap]{overflow-anchor:none;}


/* Alpha photo request (shown only when the search result has no usable photo). */
.alpha-photo-request,
.alpha-site .alpha-photo-request {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  margin-top: 8px;
  padding: 2px 0;
  color: #005ca1;
  font-size: 12px;
  line-height: 1.35;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.alpha-photo-request:hover,
.alpha-site .alpha-photo-request:hover { color: #003e6c; }
.alpha-photo-request:focus-visible,
.alpha-site .alpha-photo-request:focus-visible { outline: 2px solid #005ca1; outline-offset: 3px; border-radius: 2px; }
.alpha-photo-request[hidden],
.alpha-site .alpha-photo-request[hidden] { display: none !important; }
@media (max-width:680px) {
  .alpha-photo-request,
  .alpha-site .alpha-photo-request { margin-top: 5px; font-size: 11px; }
}

/* vNEXT: staff preview cannot open a customer conversation. */
.alpha-photo-request-preview,
.alpha-site .alpha-photo-request-preview { color:#788493; text-decoration:none; cursor:default; }
.alpha-photo-request-preview small { font-size:.88em; font-weight:500; white-space:normal; }

/* Newly loaded cards reveal downward without repositioning the viewport. */
@keyframes aasg-reveal-page { from { opacity: .45; transform: translateY(-9px); } to { opacity: 1; transform: translateY(0); } }
.aasg-new-page-card { animation: aasg-reveal-page .24s ease-out both; }
@media (prefers-reduced-motion: reduce) { .aasg-new-page-card { animation: none; } }


/* Display-state guarantees; all featured card presentation is in the Alpha theme. */
.aasg-featured-card[hidden], .aasg-reference-media img[hidden], .aasg-reference-purchase[hidden] { display:none !important; }

/* Only the featured exact part receives the unavailable state, not analogues. */
.aasg-featured-card .aasg-badge-unavailable { background: #f3f4f6; color: #596574; }

/* Exact-part status remains visible when the separate buy panel is hidden. */
.alpha-site .aasg-featured-card .aasg-reference-availability[hidden] { display: none !important; }
.alpha-site .aasg-featured-card .aasg-badge-unavailable { background: var(--alpha-account-surface-soft, #f3f4f6) !important; color: var(--alpha-muted, #596574) !important; }
