:root {
  --am-ink: #16202a;
  --am-muted: #647180;
  --am-line: #dce3e8;
  --am-surface: #ffffff;
  --am-soft: #f4f7f8;
  --am-accent: #0f766e;
  --am-accent-dark: #0b5d57;
}

.am-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0 64px;
  color: var(--am-ink);
}

.am-hero {
  margin-bottom: 24px;
}

.am-hero h1,
.am-detail h1,
.am-chat h1 {
  margin: 10px 0;
  line-height: 1.15;
}

.am-back,
.am-card a,
.am-panel a,
.am-facets a {
  color: var(--am-accent-dark);
}

.am-filters {
  padding: 20px;
  margin-bottom: 28px;
  border: 1px solid var(--am-line);
  border-radius: 16px;
  background: var(--am-surface);
  box-shadow: 0 8px 28px rgba(22, 32, 42, 0.06);
}

.am-filters__main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.am-filters label,
.am-chat__form label,
.am-actions label {
  display: grid;
  gap: 6px;
  font-weight: 650;
}

.am-filters input,
.am-filters select,
.am-chat textarea,
.am-chat input,
.am-actions select,
.am-actions textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #bac6ce;
  border-radius: 9px;
  color: var(--am-ink);
  background: #fff;
}

.am-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 10px 15px;
  border: 1px solid var(--am-accent);
  border-radius: 9px;
  color: var(--am-accent-dark);
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.am-button--primary {
  color: #fff !important;
  background: var(--am-accent);
}

.am-button--primary:hover {
  background: var(--am-accent-dark);
}

.am-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.am-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.am-card,
.am-panel,
.am-message {
  border: 1px solid var(--am-line);
  border-radius: 15px;
  background: var(--am-surface);
  box-shadow: 0 6px 22px rgba(22, 32, 42, 0.05);
}

.am-card {
  overflow: hidden;
}

.am-card__media {
  display: grid;
  min-height: 210px;
  place-items: center;
  color: var(--am-muted);
  background: var(--am-soft);
}

.am-card__media img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.am-card__body {
  padding: 18px;
}

.am-card h2 {
  margin: 5px 0 12px;
  font-size: 1.2rem;
}

.am-card__link {
  font-weight: 700;
}

.am-kicker,
.am-muted,
.am-location {
  color: var(--am-muted);
}

.am-kicker {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.am-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.am-empty {
  grid-column: 1 / -1;
  padding: 40px;
  border-radius: 14px;
  text-align: center;
  background: var(--am-soft);
}

.am-notice {
  margin: 16px 0;
  padding: 12px 16px;
  border-radius: 9px;
}

.am-notice--error {
  color: #8b1e1e;
  background: #fff0f0;
}

.am-pagination,
.am-facets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 22px 0;
}

.am-pagination a,
.am-facets a {
  padding: 8px 12px;
  border: 1px solid var(--am-line);
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
}

.am-detail__layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 0.85fr);
  gap: 24px;
  margin-top: 20px;
}

.am-detail__aside {
  align-self: start;
  position: sticky;
  top: 18px;
}

.am-panel {
  padding: 22px;
  margin-bottom: 20px;
}

.am-panel h2 {
  margin-top: 0;
}

.am-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.am-gallery figure {
  margin: 0;
}

.am-gallery__cover {
  grid-column: 1 / -1;
}

.am-gallery img {
  display: block;
  width: 100%;
  height: 230px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--am-soft);
}

.am-gallery__cover img {
  height: min(520px, 55vw);
}

.am-data {
  margin: 0;
}

.am-data > div {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  padding: 10px 0;
  border-bottom: 1px solid var(--am-line);
}

.am-data dt {
  color: var(--am-muted);
}

.am-data dd {
  margin: 0;
  font-weight: 650;
}

.am-actions form,
.am-actions details {
  margin-top: 14px;
}

.am-actions details form {
  display: grid;
  gap: 12px;
}

.am-chat {
  max-width: 850px;
}

.am-chat__messages {
  display: grid;
  gap: 12px;
  margin: 20px 0;
}

.am-message {
  width: min(78%, 620px);
  padding: 15px;
}

.am-message--own {
  justify-self: end;
  background: #eaf7f5;
}

.am-message header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--am-muted);
  font-size: 0.85rem;
}

.am-message img {
  display: block;
  max-width: 100%;
  max-height: 460px;
  border-radius: 10px;
}

.am-chat__form {
  display: grid;
  gap: 10px;
}

.am-form-status {
  min-height: 1.4em;
  color: var(--am-muted);
}

@media (max-width: 850px) {
  .am-grid,
  .am-filters__main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .am-detail__layout {
    grid-template-columns: 1fr;
  }

  .am-detail__aside {
    position: static;
  }
}

@media (max-width: 560px) {
  .am-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 22px;
  }

  .am-grid,
  .am-filters__main,
  .am-gallery {
    grid-template-columns: 1fr;
  }

  .am-gallery__cover {
    grid-column: auto;
  }

  .am-card__media,
  .am-card__media img {
    min-height: 185px;
    height: 185px;
  }

  .am-message {
    width: 88%;
  }
}

/* Search and filters: one page scroll, category results beside a 300px sidebar. */
.am-results-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 20px; }
.am-results-main, .am-filter-sidebar, .am-sort { min-width: 0; }
.am-filter-sidebar .am-filters { padding: 18px; margin: 0; }
.am-filter-sidebar .am-filters__main { grid-template-columns: minmax(0, 1fr); }
.am-sidebar-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: space-between; margin-bottom: 16px; }
.am-sidebar-heading h2 { margin: 0; font-size: 1.15rem; }
.am-filter-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.am-filter-group legend { font-weight: 650; margin-bottom: 7px; }
.am-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.am-filter-sidebar input, .am-filter-sidebar select { min-width: 0; max-width: 100%; }
.am-filter-sidebar select[multiple] { min-height: 90px; }
.am-advanced { border-top: 1px solid var(--am-line); padding: 14px 0; }
.am-advanced summary { cursor: pointer; font-weight: 650; margin-bottom: 12px; }
.am-text-button { background: none; border: 0; color: var(--am-accent-dark); cursor: pointer; padding: 5px 0; font: inherit; text-decoration: underline; }
.am-reset { display: block; margin-top: 12px; color: var(--am-accent-dark); }
.am-results-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 16px; }
.am-results-header h1 { margin: 4px 0 10px; overflow-wrap: anywhere; }
.am-sort { display: grid; gap: 6px; max-width: 100%; }
.am-sort select { padding: 9px; border: 1px solid var(--am-line); border-radius: 8px; max-width: 100%; background: white; }
.am-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; }
.am-filter-chips a { padding: 7px 10px; border: 1px solid var(--am-line); border-radius: 20px; background: var(--am-soft); color: var(--am-accent-dark); text-decoration: none; overflow-wrap: anywhere; max-width: 100%; }
.am-results-list { grid-template-columns: minmax(0, 1fr); }
.am-results-list .am-card { display: grid; grid-template-columns: 190px minmax(0, 1fr); }
.am-results-list .am-card__media { height: 100%; min-height: 165px; }
.am-results-list .am-card__media img { width: 100%; height: 100%; object-fit: cover; }
.am-card__body { min-width: 0; overflow-wrap: anywhere; }
.am-card time, .am-card__summary { color: var(--am-muted); font-size: .9rem; }
.am-filter-toggle { display: none; }
.am-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .am-results-layout { grid-template-columns: minmax(0, 1fr); }
  .am-js .am-filter-sidebar:not(.is-open) { display: none; }
  .am-js .am-filter-toggle { display: inline-flex; margin-top: 16px; }
}
@media (max-width: 560px) {
  .am-results-list .am-card { grid-template-columns: minmax(0, 1fr); }
  .am-results-list .am-card__media, .am-results-list .am-card__media img { height: 180px; }
  .am-results-header { display: block; }
  .am-sort { margin-bottom: 14px; }
}

.am-facet-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; margin: 6px 0; font-weight: normal; }
.am-filter-sidebar .am-facet-option input { width: auto; margin: 0; }
.am-facet-option span { overflow-wrap: anywhere; }
.am-facet-count { color: #64748b; font-size: .8rem; font-variant-numeric: tabular-nums; }
.am-facet-more summary { cursor: pointer; font-size: .875rem; color: #475569; margin-top: 8px; }


/* V012 filter presentation. Scope to this card, preserving other product forms. */
.am-catalog-page .am-catalog-workspace { grid-template-columns: 330px minmax(0, 1fr); }
.am-filters--compact { padding: 20px; border-radius: 16px; margin-bottom: 0; }
.am-filters--compact .am-sidebar-heading { gap: 8px 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid #e3e9e5; }
.am-filters--compact .am-filter-reset { color: #167442; font-size: 12px; text-decoration: none; white-space: nowrap; }
.am-filters--compact .am-filter-reset:hover { text-decoration: underline; }
.am-filters--compact .am-filters__main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.am-filters--compact .am-filter-section { display: grid; gap: 16px; margin: 0; padding: 18px 0 0; min-width: 0; border: 0; border-top: 1px solid #e3e9e5; border-radius: 0; background: transparent; box-shadow: none; }
.am-filters--compact h3 { margin: 0; font-size: 16px; line-height: 1.4; }
.am-filters--compact .am-filter-group { min-width: 0; width: 100%; }
.am-filters--compact legend { max-width: 100%; padding: 0; margin-bottom: 8px; font-size: 14px; line-height: 1.45; font-weight: 600; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.am-filters--compact .am-filter-range { grid-column: 1 / -1; }
.am-filters--compact .am-range { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.am-filters--compact .am-range label { min-width: 0; font-size: 13px; font-weight: 400; }
.am-filters--compact input:not([type=radio]):not([type=checkbox]),
.am-filters--compact select { min-width: 0; max-width: 100%; height: 42px; padding: 8px 10px; font: inherit; font-size: 14px; border-color: #d6dfd9; }
.am-filters--compact input[type=number] { appearance: textfield; -moz-appearance: textfield; }
.am-filters--compact input[type=number]::-webkit-inner-spin-button,
.am-filters--compact input[type=number]::-webkit-outer-spin-button { appearance: none; margin: 0; }
.am-filters--compact .am-filter-pills { display: flex; flex-wrap: wrap; gap: 7px; }
.am-filters--compact .am-filter-choice { position: relative; display: block; margin: 0; min-width: 0; font-size: 12px; font-weight: 400; cursor: pointer; }
.am-filters--compact .am-choice-input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; margin: 0; }
.am-filters--compact .am-choice-face,
.am-filters--compact .am-choice-all { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 7px 11px; border: 1px solid transparent; border-radius: 22px; background: #f1f4f3; color: #32463b; line-height: 1.4; font: inherit; cursor: pointer; }
.am-filters--compact .am-choice-all { font-size: 12px; }
.am-filters--compact .am-choice-label { overflow-wrap: normal; word-break: normal; }
.am-filters--compact .am-choice-input:checked + .am-choice-face,
.am-filters--compact .am-choice-all[aria-pressed=true] { color: var(--am-catalog-green-dark, #105c2e); background: #eaf5ec; border-color: #76a883; }
.am-filters--compact :is(button, a, select, input, summary, [role=button]):focus-visible { outline: 3px solid #71af87; outline-offset: 3px; }
.am-filters--compact .am-choice-input:focus-visible + .am-choice-face { outline: 3px solid #71af87; outline-offset: 3px; }
.am-filters--compact .am-color-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 7px; align-items: start; }
.am-filters--compact .am-color-choice .am-choice-face { display: grid; grid-template-columns: minmax(0, 1fr); width: 100%; justify-items: center; gap: 5px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #32463b; text-align: center; font-size: 11px; line-height: 1.3; }
.am-filters--compact .am-color-swatch { display: block; width: 100%; max-width: 44px; aspect-ratio: 1; border: 1px solid #ced8d1; border-radius: 5px; background: #eee; }
.am-filters--compact .am-color-choice .am-choice-input:checked + .am-choice-face { color: #126a39; background: transparent; border: 0; font-weight: 700; }
.am-filters--compact .am-color-choice .am-choice-input:checked + .am-choice-face .am-color-swatch { outline: 2px solid #167442; outline-offset: 2px; }
.am-filters--compact.am-filter-ui-ready [data-color-grid][data-expanded=false] [data-color-extra] { display: none; }
.am-filters--compact .am-color-toggle { margin: 12px 0 0; padding: 3px 0; border: 0; background: transparent; color: #167442; font: inherit; font-size: 13px; cursor: pointer; }
.am-filters--compact .am-color-toggle::before { content: '⌄'; display: inline-block; margin-right: 8px; }
.am-filters--compact .am-color-toggle[aria-expanded=true]::before { content: '⌃'; }
.am-color-swatch[data-swatch=all] { background: radial-gradient(circle, #167442 1.5px, transparent 2px) center / 8px 8px #eff7f0; }
.am-color-swatch[data-swatch=beige] { background: #e8dfc4; }
.am-color-swatch[data-swatch=blue] { background: #235bce; }
.am-color-swatch[data-swatch=brown] { background: #88552d; }
.am-color-swatch[data-swatch=multicolor] { background: conic-gradient(#ef715f 0 20%, #f4cc58 20% 40%, #55a87a 40% 60%, #6987d1 60% 80%, #ba77ae 80%); }
.am-color-swatch[data-swatch=cream] { background: #fff7d9; }
.am-color-swatch[data-swatch=yellow] { background: #f7d82e; }
.am-color-swatch[data-swatch=gold] { background: linear-gradient(115deg, #95701c, #f2d77b, #b28825); }
.am-color-swatch[data-swatch=gray] { background: #a1a5a6; }
.am-color-swatch[data-swatch=green] { background: #278d47; }
.am-color-swatch[data-swatch=khaki] { background: #888858; }
.am-color-swatch[data-swatch=lavender] { background: #c9a8e7; }
.am-color-swatch[data-swatch=purple] { background: #8536bb; }
.am-color-swatch[data-swatch=orange] { background: #f18a31; }
.am-color-swatch[data-swatch=pink] { background: #e672a6; }
.am-color-swatch[data-swatch=print] { background: repeating-linear-gradient(45deg, #c9bda9 0 5px, #716556 5px 8px, #eee5d8 8px 12px); }
.am-color-swatch[data-swatch=rose] { background: #ddb1b5; }
.am-color-swatch[data-swatch=red] { background: #cf3441; }
.am-color-swatch[data-swatch=black] { background: #24272a; }
.am-color-swatch[data-swatch=silver] { background: linear-gradient(120deg, #92999e, #f4f5f5, #a7aeb2); }
.am-color-swatch[data-swatch=turquoise] { background: #33bfc0; }
.am-color-swatch[data-swatch=white] { background: #fff; border-color: #9ba8a0; }
.am-color-swatch[data-swatch=other] { background: linear-gradient(135deg, #e76c71, #f0ca52, #65af87, #5899d5, #a475cf); }
.am-color-swatch[data-swatch=unknown] { background: repeating-linear-gradient(135deg, #dde3df 0 6px, #f7f9f8 6px 12px); }
.am-filters--compact .am-multiselect { border: 1px solid #d6dfd9; border-radius: 9px; min-width: 0; }
.am-filters--compact .am-multiselect summary { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 8px 10px; font-size: 14px; cursor: pointer; list-style: none; }
.am-filters--compact .am-multiselect summary::-webkit-details-marker { display: none; }
.am-filters--compact .am-multiselect summary::after { content: '⌄'; margin-left: auto; }
.am-filters--compact .am-multiselect[open] summary::after { content: '⌃'; }
.am-filters--compact [data-multiselect-summary] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-filters--compact .am-multiselect-options { padding: 10px; border-top: 1px solid #e3e9e5; max-height: 260px; overflow-y: auto; }
.am-filters--compact .am-multiselect-options label { display: flex; align-items: start; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 400; overflow-wrap: normal; }
.am-filters--compact .am-multiselect-options input { flex: 0 0 auto; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: #167442; }
.am-filters--compact .am-multi-clear { border: 0; background: transparent; padding: 0; font: inherit; color: #167442; cursor: pointer; }
.am-filters--compact [data-filter-status]:empty { display: none; }
.am-filters--compact .am-filter-submit { width: 100%; gap: 8px; background: #167442; border-color: #167442; min-height: 44px; }
@media (max-width: 1000px) {
  .am-catalog-page .am-catalog-workspace { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 360px) {
  html.am-catalog-js .am-catalog-page .am-catalog-sidebar { width: 100vw; padding: 10px; }
  .am-filters--compact { padding: 15px; }
  .am-filters--compact .am-color-grid { gap: 10px 5px; }
  .am-filters--compact input:not([type=radio]):not([type=checkbox]) { font-size: 12px; padding-inline: 6px; }
}
