/* AMIIN Core 15.1.20 — HALAMA: stay inside the parent service panel.
 * The viewport is NOT the available width of a shortcode in a WordPress column.
 * Only Halama's Core entry and Halama's own product/archive templates are scoped.
 * No global body, theme, PWA or other service styles are changed.
 */
.awc-halama-unified,
.halama-single,
.halama-archive {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.awc-halama-unified {
  inline-size: 100%;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
.awc-halama-unified :where(*, *::before, *::after),
:is(.halama-single, .halama-archive) :where(.halama-wrap, .halama-catalog, .halama-card, .halama-col, .halama-table, .halama-offers-table-wrap) {
  box-sizing: border-box;
}
.awc-halama-unified :where(
  .awc-halama-intro, .awc-halama-catalogo, .halama-catalog,
  .halama-filters, .halama-field, .halama-field-split, .halama-brand-field,
  .halama-results, .halama-grid, .halama-card, .halama-card-link,
  .halama-body, .halama-meta, .halama-pagination, .halama-pager,
  .halama-static-fallback, .halama-suggest, .halama-feedback,
  .halama-filter-actions, .halama-disclaimer
),
:is(.halama-single, .halama-archive) :where(
  .halama-wrap, .halama-catalog, .halama-filters, .halama-results,
  .halama-grid, .halama-card, .halama-card-link, .halama-cols,
  .halama-col, .halama-offers, .halama-content, .halama-offers-table-wrap
) {
  min-inline-size: 0;
  max-inline-size: 100%;
}
.awc-halama-unified .halama-catalog {
  inline-size: 100%;
  margin-inline: 0;
  padding: clamp(10px, 1.8vw, 16px);
}
/* Auto-fit responds to the real parent width, even on a large desktop with a
 * narrow sidebar/content column. These overrides beat old 7/4-column rules. */
.awc-halama-unified .halama-filters,
.halama-archive .halama-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)) !important;
  gap: 12px;
  max-inline-size: 100%;
}
.awc-halama-unified .halama-grid,
.halama-archive .halama-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 218px), 1fr)) !important;
  gap: 12px;
  max-inline-size: 100%;
}
.awc-halama-unified .halama-field-split,
.halama-archive .halama-field-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.awc-halama-unified :where(input, select, textarea, button),
.halama-archive .halama-catalog :where(input, select, textarea, button) {
  box-sizing: border-box;
  min-inline-size: 0;
  max-inline-size: 100%;
}
.awc-halama-unified :where(.halama-title, .halama-brand, .halama-price, .halama-vendors, .halama-badge, .halama-catalog-hint, .halama-feedback),
:is(.halama-single, .halama-archive) :where(.halama-title, .halama-meta-box, .halama-kpi, .halama-vendor-directory, .halama-table td) {
  overflow-wrap: anywhere;
  word-break: normal;
}
.awc-halama-unified .halama-meta,
.halama-archive .halama-meta {
  flex-wrap: wrap;
}
.awc-halama-unified :where(img, video, iframe, canvas),
:is(.halama-single, .halama-archive) :where(img, video, iframe, canvas) {
  max-inline-size: 100%;
}
/* Wide comparison tables must scroll locally, never stretch Core or the page. */
:is(.awc-halama-unified, .halama-single, .halama-archive) :where(.halama-offers-table-wrap, .awc-provider-table-scroll) {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  -webkit-overflow-scrolling: touch;
}
:is(.awc-halama-unified, .halama-single, .halama-archive) :where(pre) {
  max-inline-size: 100%;
  overflow-x: auto;
}
/* Product details retain their own layout, but tracks must be shrinkable. */
.halama-single .halama-wrap,
.halama-archive .halama-wrap { max-inline-size: 100%; }
.halama-single .halama-cols {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
}
.halama-single .halama-kpis {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}
@media (max-width: 620px) {
  .awc-halama-unified .halama-filter-actions,
  .halama-archive .halama-filter-actions { flex-wrap: wrap; }
  .awc-halama-unified .halama-filter-actions > *,
  .halama-archive .halama-filter-actions > * { flex: 1 1 120px; }
  .awc-halama-unified .halama-static-fallback ul,
  .halama-archive .halama-static-fallback ul { columns: 1; }
}
/* In a narrow embed the media query may never fire because the viewport is wide.
 * Let the actual container decide when each filter/card becomes a single track. */
@supports (container-type: inline-size) {
  .awc-halama-unified .awc-halama-catalogo,
  .halama-archive .halama-wrap { container-type: inline-size; }
  @container (max-width: 380px) {
    .halama-filters, .halama-grid { grid-template-columns: minmax(0, 1fr) !important; }
    .halama-filter-actions { flex-wrap: wrap; }
    .halama-filter-actions > * { flex: 1 1 120px; }
    .halama-static-fallback ul { columns: 1; }
  }
}

/* 15.1.20 · Paginated discovery and showcase stay inside Core. */
.awc-halama-unified :where(.halama-results-heading, .halama-results-title, .halama-results-subtitle, .halama-pagination-note),
.halama-archive :where(.halama-results-heading, .halama-results-title, .halama-results-subtitle, .halama-pagination-note){max-inline-size:100%;min-inline-size:0;overflow-wrap:anywhere}
.awc-halama-unified .halama-pager, .halama-archive .halama-pager{flex-wrap:wrap;max-inline-size:100%}
.awc-halama-unified .halama-results-heading, .halama-archive .halama-results-heading{margin:16px 0 14px}
.awc-halama-unified .halama-results-title, .halama-archive .halama-results-title{margin:0 0 5px;color:#1c513b;font-size:clamp(17px,2.5vw,21px);line-height:1.3}
.awc-halama-unified .halama-results-subtitle, .halama-archive .halama-results-subtitle{margin:0;color:#53695e;font-size:13px;line-height:1.55}
.awc-halama-unified .halama-pagination-note, .halama-archive .halama-pagination-note{font-size:12px;color:#526559;margin:10px 0 2px}

/* 15.1.20 · Store-like destinations without breaking the AMIIN service panel. */
.awc-halama-unified .awc-halama-shop-sources {margin:16px 0 20px;padding:clamp(12px,2vw,18px);border:1px solid #dce9e2;border-radius:16px;background:#f7faf8;inline-size:100%;max-inline-size:100%;min-inline-size:0;overflow:hidden}
.awc-halama-unified .awc-halama-shop-head h3{font-size:clamp(16px,2vw,19px);line-height:1.3;color:#184c36;margin:0 0 5px}
.awc-halama-unified .awc-halama-shop-head p{color:#51695b;font-size:13px;line-height:1.5;margin:0 0 12px}
.awc-halama-unified .awc-halama-shop-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,155px),1fr));gap:9px;min-inline-size:0;max-inline-size:100%}
.awc-halama-unified .awc-halama-shop{display:flex;flex-direction:column;justify-content:center;gap:3px;min-inline-size:0;max-inline-size:100%;min-height:93px;padding:11px 12px;background:#fff;border:1px solid #e0e8e4;border-radius:12px;color:#254a38;text-decoration:none;overflow-wrap:anywhere;transition:border-color .15s,box-shadow .15s}
.awc-halama-unified .awc-halama-shop:hover,.awc-halama-unified .awc-halama-shop:focus-visible{border-color:#328767;box-shadow:0 2px 9px rgba(0,0,0,.08)}
.awc-halama-unified .awc-halama-shop small{color:#547565;font-size:11px}
.awc-halama-unified .awc-halama-shop strong{font-size:14px;line-height:1.2}
.awc-halama-unified .awc-halama-shop span{color:#21674b;font-size:11px;font-weight:700}
.awc-halama-unified .awc-halama-sources-note{color:#53675e;font-size:11px;line-height:1.5;margin:9px 0 0}
.awc-halama-unified .halama-external-merchant{margin-bottom:6px;color:#295f48;font-size:11px;font-weight:700;overflow-wrap:anywhere}
.halama-single .halama-product-source{font-size:13px;color:#3d5e4d;line-height:1.6;background:#f4faf6;border:1px solid #dce9e2;padding:10px 12px;border-radius:10px;max-inline-size:100%}
