.erc {
  --erc-ink: #102942;
  --erc-muted: #4c627a;
  --erc-pine: #07569e;
  --erc-bg: #f1f6fc;
  --erc-card: #fff;
  --erc-image: #eef3f9;
  --erc-line: #ccd9e8;
  --erc-control-line: #758da7;
  --erc-focus: #126fbc;
  --erc-primary: #154b85;
  --erc-primary-hover: #0e3b6d;
  --erc-selected: #154b85;
  --erc-selected-ink: #fff;
  --erc-secondary: #eaf4ff;
  --erc-secondary-hover: #dbeeff;
  color: var(--erc-ink);
  background: var(--erc-bg);
  color-scheme: light;
  font: inherit;
  line-height: 1.55;
  scroll-margin-top: 90px;
}
.erc *, .erc *::before, .erc *::after { box-sizing: border-box; }
.erc [hidden] { display: none !important; }
.erc :is(h1,h2,h3,p,ul) { margin: 0; }
.erc a { text-decoration: none; }
.erc :is(a,button,input,select,summary):focus-visible {
  outline: 3px solid var(--erc-focus);
  outline-offset: 3px;
}
.erc-shell {
  width: calc(100% - 44px);
  max-width: 1320px;
  margin: auto;
  padding: clamp(18px,2.4vw,34px) 0 42px;
}
.erc-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.erc .erc-page-heading h1 {
  color: var(--erc-ink);
  font-size: clamp(26px,3vw,46px);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.1;
}
.erc .erc-crosslink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 44px;
  color: var(--erc-pine);
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
}
.erc .erc-crosslink:hover { text-decoration: underline; text-underline-offset: 3px; }
.erc-crosslink svg { width: 15px; height: 15px; flex: none; }
.erc-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  background: var(--erc-card);
  border: 1px solid var(--erc-line);
  border-radius: 14px;
  padding: 12px 14px;
}
.erc-controls label { color: var(--erc-ink); display: block; margin-bottom: 5px; font-size: 13px; font-weight: 760; }
.erc-controls :is(input,select) {
  min-height: 46px;
  width: 100%;
  margin: 0;
  border: 1px solid var(--erc-control-line);
  border-radius: 9px;
  color: var(--erc-ink);
  background: var(--erc-bg);
  font: inherit;
  font-size: 15px;
  padding: 0 10px;
}
.erc-controls select { padding-right: 4px; }
.erc-controls input::placeholder { color: var(--erc-muted); opacity: 1; }
.erc-input-wrap { position: relative; }
.erc-input-wrap svg { pointer-events: none; position: absolute; top: 13px; left: 12px; color: var(--erc-pine); }
.erc-controls .erc-input-wrap input { padding-left: 42px; font-size: 16px; }
.erc-facets { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
#err-catalogue :is(.erc-facets button,.erc-reset) {
  margin: 0;
  padding: 8px 13px;
  min-height: 40px;
  color: var(--erc-pine);
  background: var(--erc-card);
  border: 1px solid var(--erc-control-line);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
  cursor: pointer;
}
#err-catalogue :is(.erc-facets button,.erc-reset):hover { border-color: var(--erc-pine); }
#err-catalogue .erc-facets button[aria-pressed=true] {
  color: var(--erc-selected-ink);
  background: var(--erc-selected);
  border-color: var(--erc-selected);
}
#err-catalogue .erc-filter-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 46px;
  padding: 0 10px;
  border: 1px solid var(--erc-control-line);
  border-radius: 9px;
  background: var(--erc-secondary);
  color: var(--erc-pine);
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.2;
  cursor: pointer;
}
#err-catalogue .erc-filter-trigger:hover { border-color: var(--erc-pine); }
.erc .erc-filter-trigger svg { width: 16px; height: 16px; flex: none; }
.erc .erc-dialog-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.erc-filter-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }

.erc-result-head { padding: 9px 2px; font-size: 13px; }
.erc-result-head p { color: var(--erc-ink); font-weight: 720; font-variant-numeric: tabular-nums; }
.erc .erc-grid { padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; align-items: stretch; }
.erc-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin: 0;
  min-width: 0;
  background: var(--erc-card);
  border: 1px solid var(--erc-line);
  border-radius: 15px;
  box-shadow: 0 2px 8px #142c510b;
}
.erc-photo { margin: 7px 7px 0; aspect-ratio: 5 / 4; overflow: hidden; border-radius: 9px; background: var(--erc-image); }
.erc .erc-studio-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  isolation: isolate;
  background: #d5e2ed url('/wp-content/mu-plugins/err-catalogue/studio-backdrop-desktop.webp') center / 100% 100% no-repeat;
}
.erc-studio-frame::before {
  content: '';
  position: absolute;
  inset: 84% 20% 8%;
  background: radial-gradient(ellipse,#1b344566,transparent 72%);
}
.erc-studio-frame::after {
  content: '';
  position: absolute;
  top: 8%;
  right: 6%;
  width: 11%;
  aspect-ratio: 1;
  background: url('/wp-content/uploads/2023/03/ERR-Professional-Badminton-Stringing-Singapore-2024.png') center / contain no-repeat;
  opacity: .78;
}
.erc .erc-studio-product {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  inset: 8% 15% 13%;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.erc .erc-studio-product img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px #19304130);
}
.erc-photo-empty { display: grid; place-items: center; background: var(--erc-secondary); }
.erc-photo-empty svg { width: 38px; height: 38px; color: var(--erc-pine); }
.erc-card-body { padding: 13px; display: flex; flex-direction: column; flex: 1; }
.erc-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 3px 7px; color: var(--erc-muted); font-size: 11px; font-weight: 750; }
.erc .erc-card-title { color: var(--erc-ink); font-size: clamp(16px,1.36vw,20px); line-height: 1.19; font-weight: 800; overflow-wrap: anywhere; margin: 5px 0 10px; }
.erc-rate { min-height: 33px; display: flex; gap: 5px; align-items: baseline; flex-wrap: wrap; color: var(--erc-muted); margin: 0 0 10px; font-size: 12px; }
.erc-rate strong { font-size: clamp(20px,2.15vw,28px); color: var(--erc-pine); letter-spacing: -.04em; line-height: 1.1; font-weight: 830; font-variant-numeric: tabular-nums; }
.erc-restriction { width: 100%; }
.erc-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding-top: 9px;
  margin-top: auto;
  border-top: 1px solid var(--erc-line);
}
.erc .erc-card-actions :is(a,button), #err-catalogue .erc-details button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 5px 7px;
  border: 1px solid var(--erc-line);
  border-radius: 8px;
  background: var(--erc-secondary);
  color: var(--erc-pine);
  font: inherit;
  font-size: 13px;
  font-weight: 740;
  line-height: 1.15;
  text-align: center;
  text-wrap: balance;
  white-space: normal;
  cursor: pointer;
}
.erc .erc-card-actions svg { width: 15px; height: 15px; flex: 0 0 15px; }
.erc .erc-card-actions .erc-action {
  color: #fff;
  background: var(--erc-primary);
  border-color: var(--erc-primary);
  padding-inline: 13px;
  transition: background-color .16s ease;
}
.erc .erc-card-actions .erc-action:hover { background: var(--erc-primary-hover); border-color: var(--erc-primary-hover); }
.erc .erc-card-actions .erc-review {
  color: var(--erc-pine);
  border-color: transparent;
  background: none;
  padding-inline: 3px;
  border-radius: 5px;
  text-align: right;
}
.erc .erc-card-actions .erc-review:hover { color: var(--erc-ink); text-decoration: underline; text-underline-offset: 3px; }
#err-catalogue .erc-details button:hover { background: var(--erc-secondary-hover); border-color: var(--erc-pine); }
.erc-review-compact { display: none; }
.erc .erc-details { width: min(420px,calc(100% - 32px)); margin: auto; padding: 24px; border: 1px solid var(--erc-line); border-radius: 18px; color: var(--erc-ink); background: var(--erc-card); box-shadow: 0 16px 70px #020e2980; }
.erc-details::backdrop { background: #07172a9c; }
.erc .erc-details h2 { margin: 5px 0 10px; font-size: 24px; line-height: 1.2; color: var(--erc-ink); }
.erc .erc-details p { margin: 8px 0; }
.erc-details-label, .erc-details [data-detail-price] { color: var(--erc-pine); font-weight: 740; }
.erc .erc-details form { margin: 16px 0 0; }
#err-catalogue .erc-details button { padding-inline: 18px; }
#err-catalogue .erc-details button.erc-dialog-done { color: #fff; background: var(--erc-primary); border-color: var(--erc-primary); }
#err-catalogue .erc-details button.erc-dialog-done:hover { background: var(--erc-primary-hover); }
.erc .erc-empty { padding: 26px; border-radius: 12px; background: var(--erc-card); border: 1px solid var(--erc-line); color: var(--erc-muted); }
.erc-scroll-end { height: 1px; }
@media (prefers-reduced-motion: no-preference) {
  .erc-card.erc-await-entry:not(:focus-within) { opacity: 0; }
  .erc-card.erc-enter:not(:focus-within) { animation: erc-card-enter 300ms ease-out both; }
}
@keyframes erc-card-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
.erc-index { margin: 22px 0 0; padding: 14px 18px; background: var(--erc-card); border: 1px solid var(--erc-line); border-radius: 12px; }
.erc-index summary { cursor: pointer; color: var(--erc-pine); font-weight: 740; }
.erc-index section { margin-top: 16px; scroll-margin-top: 95px; }
.erc-index section ul { padding-left: 20px; }
.erc-index a { color: var(--erc-pine); text-decoration: underline; }
@media (max-width: 1020px) {
  .erc .erc-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .erc-shell { width: calc(100% - 24px); padding-top: 14px; }
  .erc-page-heading { margin-bottom: 8px; gap: 8px; }
  .erc .erc-page-heading h1 { font-size: clamp(23px,6vw,30px); }
  .erc .erc-crosslink { font-size: 12px; flex: 0 0 auto; max-width: 29%; }
  .erc-crosslink svg { display: none; }
  .erc-controls { padding: 9px; border-radius: 12px; }
  #err-catalogue .erc-filter-trigger { padding-inline: 7px; }
  .erc .erc-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .erc-card { border-radius: 12px; }
  .erc-photo { margin: 5px 5px 0; border-radius: 8px; }
  .erc-card-body { padding: 8px; }
  .erc-card-actions { gap: 4px; padding-top: 6px; }
  .erc .erc-card-actions :is(a,button) { font-size: 11.5px; }
  .erc .erc-card-actions .erc-action { padding-inline: 7px; gap: 4px; }
  .erc .erc-card-actions .erc-action svg { width: 13px; height: 13px; flex-basis: 13px; }
  .erc .erc-card-actions .erc-review svg { display: none; }
  .erc-review-full { display: none; }
  .erc-review-compact { display: inline; }
  .erc .erc-studio-frame { background-image: url('/wp-content/mu-plugins/err-catalogue/studio-backdrop-mobile.webp'); }
}
@media (max-width: 355px) {
  .erc .erc-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .erc .erc-card-actions .erc-action { transition: none; }
}
html[data-err2-mode=dark] .erc {
  --erc-ink: #edf6ff;
  --erc-muted: #bdd0e4;
  --erc-pine: #a9d7ff;
  --erc-bg: #101d2d;
  --erc-card: #16283c;
  --erc-line: #375471;
  --erc-control-line: #7396b9;
  --erc-focus: #91d7ff;
  --erc-primary: #1469bf;
  --erc-primary-hover: #0b57aa;
  --erc-selected: #a9d7ff;
  --erc-selected-ink: #102942;
  --erc-secondary: #1e3955;
  --erc-secondary-hover: #284e72;
  color-scheme: dark;
}
