/* Shared components: buttons, forms, badges, headings, pills, ratings, swatches, countdown,
   hotspots, play buttons, pagination, breadcrumbs, page heading, placeholders. */

/* ---------- Buttons ---------- */
.craftmarket-btn,
.button,
button.button,
input[type="submit"].button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--btn-radius);
  background: var(--color-primary);
  color: var(--color-primary-fg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.craftmarket-btn:hover,
.button:hover { background: var(--color-primary-hover); color: var(--color-primary-fg); }
.craftmarket-btn:active { transform: translateY(1px); }
.craftmarket-btn svg { flex: none; }
.craftmarket-btn--accent { background: var(--color-accent); color: var(--color-accent-fg); }
.craftmarket-btn--accent:hover { background: var(--color-accent-hover); color: var(--color-accent-fg); box-shadow: 0 10px 22px -12px var(--color-accent-hover); transform: translateY(-1px); }
.craftmarket-btn--accent:active { box-shadow: none; transform: translateY(0); }
.craftmarket-btn .craftmarket-icon--arrow { transition: transform .2s ease; }
.craftmarket-btn--accent:hover .craftmarket-icon--arrow { transform: translateX(3px); }
.craftmarket-btn--dark { background: var(--text-heading); color: var(--bg-card); }
.craftmarket-btn--dark:hover { background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-btn--outline { border-color: var(--color-primary); background: transparent; color: var(--color-primary); }
.craftmarket-btn--outline:hover { background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-btn--light { background: var(--bg-card); color: var(--text-heading); }
.craftmarket-btn--light:hover { background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-btn--ghost { border-color: var(--border-strong); background: transparent; color: var(--text-heading); }
.craftmarket-btn--ghost:hover { border-color: var(--text-heading); background: transparent; color: var(--text-heading); }
.craftmarket-btn--link { min-height: 0; padding: 0; border: 0; border-bottom: 1px solid currentColor; border-radius: 0; background: none; color: var(--text-heading); }
.craftmarket-btn--link:hover { background: none; color: var(--color-primary); }
.craftmarket-btn--sm { min-height: 38px; padding: 8px 16px; font-size: 14px; }
.craftmarket-btn--block { width: 100%; }
.craftmarket-btn[disabled], .craftmarket-btn.is-disabled { opacity: .55; pointer-events: none; }
/* Skins: Home 2 compact boutique caps, Home 4 compact controls for data-dense pages. */
:root[data-skin="jewelry"] .craftmarket-btn:not(.craftmarket-btn--link) { min-height: 42px; padding: 10px 22px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
:root[data-skin="jewelry"] .craftmarket-btn--sm:not(.craftmarket-btn--link) { min-height: 36px; padding: 8px 16px; font-size: 11px; }
/* Home 2 black buttons: hover stays black and draws a fine white frame inset 3px, like a jewellery box. */
:root[data-skin="jewelry"] .craftmarket-btn--primary { transition: box-shadow .3s ease, background-color .3s ease, color .3s ease; }
:root[data-skin="jewelry"] .craftmarket-btn--primary:hover,
:root[data-skin="jewelry"] .craftmarket-btn--primary:focus-visible { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-fg); box-shadow: inset 0 0 0 3px var(--color-primary), inset 0 0 0 4px rgba(255, 255, 255, .85); }
@media (max-width: 600px) {
  /* Long caps labels ("Start Your Bespoke Creation") stay on one line on phones. */
  :root[data-skin="jewelry"] .craftmarket-btn:not(.craftmarket-btn--link) { padding-inline: 16px; font-size: 12px; letter-spacing: .06em; }
  :root[data-skin="jewelry"] .craftmarket-btn:not(.craftmarket-btn--link) svg { display: none; }
}
:root[data-skin="trade"] .craftmarket-btn { min-height: 44px; padding: 10px 22px; font-size: 14px; }
:root[data-skin="trade"] .craftmarket-btn--sm { min-height: 36px; padding: 7px 14px; font-size: 13px; }
.craftmarket-btn.is-loading { position: relative; color: transparent !important; }
.craftmarket-btn.is-loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid var(--color-primary-fg); border-right-color: transparent; border-radius: 50%; animation: craftmarket-spin .7s linear infinite; }
@keyframes craftmarket-spin { to { transform: rotate(360deg); } }

.craftmarket-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-heading);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.craftmarket-link-arrow:hover { color: var(--color-primary); }
.craftmarket-link-arrow svg { transition: transform .2s ease; }
.craftmarket-link-arrow:hover svg { transform: translateX(3px); }

.craftmarket-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-heading);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.craftmarket-icon-btn:hover { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-icon-btn[disabled] { opacity: .4; pointer-events: none; }

/* ---------- Text ---------- */
.craftmarket-kicker {
  margin: 0 0 12px;
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}
:root[data-skin="jewelry"] .craftmarket-kicker { color: var(--text-accent); }
.craftmarket-handwritten { font-family: var(--font-accent); font-weight: 500; line-height: 1.1; }

/* ---------- Sections ---------- */
.craftmarket-section { padding-block: calc(var(--section-space) / 2); }
.craftmarket-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: 28px;
}
.craftmarket-section-head__main { min-width: 0; max-width: 760px; }
.craftmarket-section-head__title { margin: 0; font-size: var(--fs-h2); overflow-wrap: anywhere; }
.craftmarket-section-head__title em { color: var(--color-primary); font-style: italic; }
.craftmarket-section-head__text { margin: 8px 0 0; color: var(--text-secondary); }
.craftmarket-section-head__extra { min-width: 0; max-width: 100%; margin-inline-start: auto; }
.craftmarket-section-head--center { flex-direction: column; align-items: center; text-align: center; }
.craftmarket-section-head--center .craftmarket-section-head__extra { margin-inline-start: 0; }

/* ---------- Badges ---------- */
/* Small caps chips; Limited / New / Eco carry a status dot so they read well on any photo. */
.craftmarket-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-success);
  color: #FFFFFF;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.craftmarket-badge--new { background: var(--color-success); }
.craftmarket-badge--hot, .craftmarket-badge--sale { background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-badge--wholesale { background: var(--text-heading); color: var(--bg-card); }
.craftmarket-badge--accent { background: var(--color-accent); color: var(--color-accent-fg); }
.craftmarket-badge--limited { background: var(--bg-card); color: var(--text-heading); box-shadow: 0 2px 8px rgba(31, 22, 16, .12); }
.craftmarket-badge--soft { background: var(--color-primary-light); color: var(--color-primary); }
.craftmarket-badge--eco { background: var(--color-success-bg); color: var(--color-success); }
.craftmarket-badge--outline { border: 1px solid var(--border-strong); background: var(--bg-card); color: var(--text-body); }
.craftmarket-badge--limited::before,
.craftmarket-badge--new::before,
.craftmarket-badge--eco::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.craftmarket-badge--limited::before { background: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-light); }
:root[data-skin="jewelry"] .craftmarket-badge--sale { background: var(--color-accent); color: var(--color-accent-fg); }
:root[data-skin="jewelry"] .craftmarket-badge--limited::before { background: var(--color-accent); }
/* On product photos every badge is the same white chip; only the status dot changes colour. */
.craftmarket-card__badges .craftmarket-badge,
.cmp-badges .craftmarket-badge { --cm-badge-dot: var(--color-primary); border: 0; background: var(--bg-card); color: var(--text-heading); box-shadow: 0 2px 8px rgba(31, 22, 16, .12); }
.craftmarket-card__badges .craftmarket-badge::before,
.cmp-badges .craftmarket-badge::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--cm-badge-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cm-badge-dot) 18%, transparent); }
.craftmarket-card__badges .craftmarket-badge--new,
.craftmarket-card__badges .craftmarket-badge--eco,
.cmp-badges .craftmarket-badge--new,
.cmp-badges .craftmarket-badge--eco { --cm-badge-dot: var(--color-success); }
.craftmarket-card__badges .craftmarket-badge--wholesale,
.cmp-badges .craftmarket-badge--wholesale { --cm-badge-dot: var(--text-heading); }
.craftmarket-card__badges .craftmarket-badge--accent,
.cmp-badges .craftmarket-badge--accent,
:root[data-skin="jewelry"] .craftmarket-card__badges .craftmarket-badge:is(.craftmarket-badge--sale, .craftmarket-badge--limited),
:root[data-skin="jewelry"] .cmp-badges .craftmarket-badge:is(.craftmarket-badge--sale, .craftmarket-badge--limited) { --cm-badge-dot: var(--color-accent); background: var(--bg-card); color: var(--text-heading); }

.craftmarket-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- Stars ---------- */
.craftmarket-stars {
  --star-size: 14px;
  position: relative;
  display: inline-block;
  width: calc(var(--star-size) * 5 + 8px);
  height: var(--star-size);
  vertical-align: middle;
  background: linear-gradient(90deg, var(--color-star) var(--stars, 0%), var(--border-strong) var(--stars, 0%));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 24'%3E%3Cpath d='M12 1.5l3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") 0 0 / calc(var(--star-size) + 1.6px) var(--star-size) repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 24'%3E%3Cpath d='M12 1.5l3.2 6.6 7.3 1-5.3 5.1 1.3 7.2L12 18l-6.5 3.4 1.3-7.2L1.5 9.1l7.3-1z'/%3E%3C/svg%3E") 0 0 / calc(var(--star-size) + 1.6px) var(--star-size) repeat-x;
}
/*rtl:raw:
.craftmarket-stars { transform: scaleX(-1); }
.craftmarket-icon--arrow,
.craftmarket-icon--arrow-left,
.craftmarket-icon--chevron-left,
.craftmarket-icon--chevron-right { transform: scaleX(-1); }
.craftmarket-link-arrow:hover svg { transform: scaleX(-1) translateX(3px); }
.craftmarket-btn--accent:hover .craftmarket-icon--arrow { transform: scaleX(-1) translateX(3px); }
*/

/* ---------- Forms ---------- */
.craftmarket-field { display: grid; gap: 6px; min-width: 0; }
.craftmarket-field > label, .craftmarket-label { color: var(--text-heading); font-size: 14px; font-weight: 600; }
.craftmarket-input,
.craftmarket-field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.craftmarket-field select,
.craftmarket-field textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--input-radius);
  background: var(--bg-input);
  color: var(--text-heading);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.craftmarket-field textarea { min-height: 110px; resize: vertical; }
.craftmarket-input:focus,
.craftmarket-field input:focus,
.craftmarket-field select:focus,
.craftmarket-field textarea:focus { border-color: var(--border-focus); outline: 0; box-shadow: 0 0 0 3px var(--ui-focus-ring); }
select.craftmarket-input, .craftmarket-field select, .craftmarket-select {
  appearance: none;
  padding-inline-end: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23786b60' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.craftmarket-check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.craftmarket-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--color-primary); }
/* Contact Form 7 (free, WordPress.org): same fields and button as the theme forms. */
.wpcf7-form p { display: grid; gap: 6px; margin: 0 0 18px; }
.wpcf7-form label { display: grid; gap: 6px; color: var(--text-heading); font-size: 14px; font-weight: 600; }
.wpcf7-form label br { display: none; }
.wpcf7-form .wpcf7-form-control-wrap { display: block; }
.wpcf7-form .wpcf7-form-control:not(.wpcf7-submit, .wpcf7-checkbox, .wpcf7-radio, .wpcf7-acceptance, [type="file"]) {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--input-radius);
  background: var(--bg-input);
  color: var(--text-heading);
  font-size: 15px;
  font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.wpcf7-form textarea.wpcf7-form-control { min-height: 140px; resize: vertical; }
.wpcf7-form .wpcf7-form-control:focus { border-color: var(--border-focus); }
.wpcf7-form .wpcf7-submit {
  justify-self: start;
  min-height: 48px;
  padding: 12px 28px;
  border: 0;
  border-radius: var(--btn-radius);
  background: var(--color-primary);
  color: var(--color-primary-fg);
  font-weight: 600;
  cursor: pointer;
  transition: background-color .2s ease;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--color-primary-hover); }
.wpcf7-form .wpcf7-not-valid { border-color: var(--color-error); }
.wpcf7-form .wpcf7-not-valid-tip { margin-top: 4px; color: var(--color-error); font-size: 13px; font-weight: 400; }
.wpcf7 form .wpcf7-response-output { margin: 8px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; }
.craftmarket-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* Quantity stepper */
.craftmarket-qty {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid var(--border-strong);
  border-radius: var(--btn-radius);
  background: var(--bg-input);
}
.craftmarket-qty button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-heading);
  cursor: pointer;
}
.craftmarket-qty input {
  width: 56px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-heading);
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}
/* Fields drawn inside a box light the box, not themselves. */
.craftmarket-qty:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--ui-focus-ring); }
.craftmarket-qty input:focus,
.craftmarket-search :is(input, select):focus { box-shadow: none; }
.craftmarket-qty input::-webkit-outer-spin-button,
.craftmarket-qty input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }

/* ---------- Pills / tabs ---------- */
.craftmarket-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.craftmarket-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 7px 18px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.craftmarket-pill:hover { border-color: var(--color-primary); color: var(--color-primary); }
.craftmarket-pill.is-active,
.craftmarket-pill[aria-selected="true"],
.craftmarket-pill[aria-pressed="true"] { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-fg); }

/* ---------- Swatches ---------- */
.craftmarket-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.craftmarket-swatch {
  display: inline-block;
  width: var(--swatch-size, 18px);
  height: var(--swatch-size, 18px);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 50%;
  background: var(--swatch, var(--bg-subtle));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.craftmarket-swatch img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Countdown ---------- */
.craftmarket-countdown { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.craftmarket-countdown li {
  display: grid;
  min-width: 52px;
  padding: 8px 6px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  text-align: center;
}
.craftmarket-countdown strong { color: var(--text-heading); font-size: 18px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.craftmarket-countdown span { color: var(--text-secondary); font-size: 11px; }

.craftmarket-progress { height: 6px; overflow: hidden; border-radius: var(--radius-pill); background: var(--border-default); }
.craftmarket-progress__bar { display: block; height: 100%; border-radius: inherit; background: var(--color-primary); }

/* ---------- Play button & video ---------- */
.craftmarket-play {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--bg-card);
  color: var(--text-heading);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform .2s ease;
}
.craftmarket-play:hover { transform: scale(1.06); }
/* The play path is drawn optically centred: no nudge (it pushed the triangle right, and left in RTL). */
.craftmarket-play svg { display: block; }
.craftmarket-play--sm { width: 40px; height: 40px; }
.craftmarket-play--dark { background: var(--text-heading); color: var(--bg-card); }

/* Video lightbox */
.craftmarket-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 8, 6, .86);
}
.craftmarket-lightbox[hidden] { display: none; }
.craftmarket-lightbox__frame { width: min(1080px, 100%); aspect-ratio: 16 / 9; }
.craftmarket-lightbox__frame--vertical { width: min(420px, 100%); aspect-ratio: 9 / 16; max-height: 86vh; }
.craftmarket-lightbox__frame iframe,
.craftmarket-lightbox__frame video { display: block; width: 100%; height: 100%; border: 0; border-radius: var(--radius-md); background: #000; }
/* Shorts: a landscape file fills the 9:16 frame instead of sitting in black bars. */
.craftmarket-lightbox__frame--vertical video { object-fit: cover; }
.craftmarket-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  color: #FFFFFF;
  cursor: pointer;
}

/* ---------- Hotspots ---------- */
.craftmarket-hotspots { position: relative; }
.craftmarket-hotspot {
  position: absolute;
  top: var(--y, 50%);
  left: var(--x, 50%) /*rtl:ignore*/; /* a point on the photo, which is not mirrored in RTL */
  z-index: 2;
  transform: translate(-50%, -50%) /*rtl:ignore*/;
}
.craftmarket-hotspot__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid #FFFFFF;
  border-radius: 50%;
  background: var(--color-primary);
  color: var(--color-primary-fg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .2s ease;
}
.craftmarket-hotspot__btn::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .35);
  animation: craftmarket-pulse 2.2s ease-out infinite;
  pointer-events: none;
}
:root[data-skin="jewelry"] .craftmarket-hotspot__btn { border-color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .25); backdrop-filter: blur(4px); }
@keyframes craftmarket-pulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
/* "+" turns into "x": rotate the icon, not the button (a rotated button threw its screen-reader label
   far off the page and widened it). */
.craftmarket-hotspot__btn svg { transition: transform .2s ease; }
.craftmarket-hotspot.is-open .craftmarket-hotspot__btn svg { transform: rotate(45deg); }
/* The active spot (and its card) sits above the other dots. */
.craftmarket-hotspot.is-open,
.craftmarket-hotspot:hover,
.craftmarket-hotspot:has(:focus-visible) { z-index: 4; }
.craftmarket-hotspot__card {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  z-index: 3;
  display: block;
  width: 260px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.craftmarket-hotspot.is-open .craftmarket-hotspot__card,
.craftmarket-hotspot:has(:focus-visible) .craftmarket-hotspot__card { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
@media (hover: hover) {
  .craftmarket-hotspot:hover .craftmarket-hotspot__card { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
}
.craftmarket-hotspot--below .craftmarket-hotspot__card { top: calc(100% + 12px); bottom: auto; }
.craftmarket-hotspot--start .craftmarket-hotspot__card { left: 0; transform: translate(-12px, 6px); }
.craftmarket-hotspot--start.is-open .craftmarket-hotspot__card,
.craftmarket-hotspot--start:hover .craftmarket-hotspot__card,
.craftmarket-hotspot--start:has(:focus-visible) .craftmarket-hotspot__card { transform: translate(-12px, 0); }
.craftmarket-hotspot--end .craftmarket-hotspot__card { right: 0; left: auto; transform: translate(12px, 6px); }
.craftmarket-hotspot--end.is-open .craftmarket-hotspot__card,
.craftmarket-hotspot--end:hover .craftmarket-hotspot__card,
.craftmarket-hotspot--end:has(:focus-visible) .craftmarket-hotspot__card { transform: translate(12px, 0); }
/* Opened from the start (a featured product): keeps its "+" and gives way while another spot is pointed at. */
.craftmarket-hotspot.is-default .craftmarket-hotspot__btn svg { transform: none; }
.craftmarket-hotspots:has(.craftmarket-hotspot:not(.is-default):hover) .craftmarket-hotspot.is-default .craftmarket-hotspot__card { opacity: 0; visibility: hidden; }
@media (min-width: 768px) {
  /* Beside the dot, vertically centred (design-new Home 1), so it never runs past the photo top. */
  .craftmarket-hotspot.is-default .craftmarket-hotspot__card,
  .craftmarket-hotspot.is-default:hover .craftmarket-hotspot__card { top: 50%; bottom: auto; left: calc(100% + 14px); right: auto; transform: translateY(-50%); }
}
/* Phones show cards as a sheet over the page: nothing opens before a tap. */
@media (max-width: 767px) {
  .craftmarket-hotspot.is-default .craftmarket-hotspot__card { opacity: 0; visibility: hidden; }
}
/* Closed with a click: stay hidden while the pointer / focus is still on the spot. */
.craftmarket-hotspot.is-closed .craftmarket-hotspot__card { opacity: 0; visibility: hidden; }
/* Phones: the card is a sheet along the bottom of the screen, so it never runs off the side (a fixed
   box does not widen the page either). The dot is centred with margins: a transform would contain it. */
@media (max-width: 767px) {
  .craftmarket-hotspot { margin: -17px 0 0 -17px; transform: none; }
  .craftmarket-hotspot .craftmarket-hotspot__card,
  .craftmarket-hotspot--below .craftmarket-hotspot__card,
  .craftmarket-hotspot--start .craftmarket-hotspot__card,
  .craftmarket-hotspot--end .craftmarket-hotspot__card { position: fixed; inset: auto 16px 16px; z-index: 1050; width: auto; transform: translateY(12px); }
  .craftmarket-hotspot.is-open .craftmarket-hotspot__card,
  .craftmarket-hotspot:hover .craftmarket-hotspot__card,
  .craftmarket-hotspot:has(:focus-visible) .craftmarket-hotspot__card,
  .craftmarket-hotspot--start.is-open .craftmarket-hotspot__card,
  .craftmarket-hotspot--start:hover .craftmarket-hotspot__card,
  .craftmarket-hotspot--start:has(:focus-visible) .craftmarket-hotspot__card,
  .craftmarket-hotspot--end.is-open .craftmarket-hotspot__card,
  .craftmarket-hotspot--end:hover .craftmarket-hotspot__card,
  .craftmarket-hotspot--end:has(:focus-visible) .craftmarket-hotspot__card { transform: none; }
}

/* Mini product card (hotspots, hero cards, mega menu) */
.craftmarket-mini { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: center; }
.craftmarket-mini__img { display: block; width: 64px; height: 64px; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg-subtle); }
.craftmarket-mini__img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.craftmarket-mini__body { display: grid; gap: 2px; min-width: 0; }
.craftmarket-mini__title { margin: 0; color: var(--text-heading); font-family: var(--font-body); font-size: 14px; font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.craftmarket-mini__title a { color: inherit; }
.craftmarket-mini__meta { color: var(--text-secondary); font-size: 12px; }
.craftmarket-mini__price { color: var(--text-heading); font-size: 15px; font-weight: 700; }
.craftmarket-mini__price del { color: var(--text-muted); font-weight: 400; }
.craftmarket-mini__price ins { text-decoration: none; }
.craftmarket-mini__action { grid-column: 1 / -1; }
.craftmarket-mini__action .craftmarket-btn { white-space: nowrap; }
/* Hotspot card: the photo runs the full height on the left; name, finish, price and button stack on the right. */
.craftmarket-hotspot__card .craftmarket-mini { grid-template-columns: 92px minmax(0, 1fr); align-items: stretch; column-gap: 14px; }
.craftmarket-hotspot__card .craftmarket-mini__img { grid-row: 1 / span 2; width: 92px; height: auto; min-height: 108px; position: relative; }
.craftmarket-hotspot__card .craftmarket-mini__img img { position: absolute; inset: 0; height: 100%; }
.craftmarket-hotspot__card .craftmarket-mini__body { align-content: center; gap: 3px; }
.craftmarket-hotspot__card .craftmarket-mini__action { grid-column: 2; align-self: end; }
.craftmarket-hotspot__card .craftmarket-mini__action .craftmarket-btn { width: 100%; justify-content: center; }

/* Floating product card (hero) */
.craftmarket-float-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 260px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
}
.craftmarket-float-card .craftmarket-mini__img { width: 72px; height: 72px; }

/* ---------- Pagination ---------- */
.craftmarket-pagination { margin-top: 40px; }
.craftmarket-pagination .nav-links,
.woocommerce-pagination ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.craftmarket-pagination .page-numbers,
.woocommerce-pagination .page-numbers li > * {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--btn-radius);
  background: var(--bg-card);
  color: var(--text-heading);
  font-weight: 500;
}
.craftmarket-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers li > .current { border-color: var(--color-primary); background: var(--color-primary); color: var(--color-primary-fg); }
.craftmarket-pagination a.page-numbers:hover,
.woocommerce-pagination .page-numbers li > a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.craftmarket-pagination .dots { border: 0; background: none; }

/* ---------- Breadcrumbs ---------- */
.craftmarket-breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 14px;
  padding: 0;
  color: var(--text-secondary);
  font-size: 14px;
  list-style: none;
}
.craftmarket-breadcrumbs li { min-width: 0; overflow-wrap: anywhere; }
.craftmarket-breadcrumbs li + li::before { content: "/"; margin-inline: 8px; color: var(--text-muted); }
.craftmarket-breadcrumbs a { color: var(--text-secondary); }
.craftmarket-breadcrumbs a:hover { color: var(--color-primary); }
.craftmarket-breadcrumbs [aria-current] { color: var(--text-heading); font-weight: 500; }

/* ---------- Page heading ---------- */
.craftmarket-page-head { padding: 36px 0 32px; border-bottom: 1px solid var(--border-default); background: var(--bg-section); }
.craftmarket-page-head__title { margin: 0; font-size: var(--fs-h1); overflow-wrap: anywhere; }
.craftmarket-page-head__title span { color: var(--color-primary); }
.craftmarket-page-head__text { max-width: 720px; margin-top: 10px; color: var(--text-secondary); }
.craftmarket-page-head__text p:last-child { margin-bottom: 0; }
/* With a photo (Theme Options → Skins → Page heading image): the title and breadcrumbs sit in a light card. */
.craftmarket-page-head.has-image { position: relative; isolation: isolate; overflow: hidden; padding: 64px 0; border-bottom: 0; }
.craftmarket-page-head__media { position: absolute; inset: 0; z-index: -1; }
.craftmarket-page-head__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.craftmarket-page-head.has-image .craftmarket-page-head__card { max-width: 560px; padding: 24px 28px; border-radius: var(--card-radius); background: rgba(247, 243, 235, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.craftmarket-page-head.has-image .craftmarket-page-head__title { font-size: clamp(2rem, 4vw, 3rem); }

/* ---------- Placeholder ---------- */
.craftmarket-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 120px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .22) 14px 15px),
    linear-gradient(135deg, var(--color-primary-light), var(--bg-section));
  color: var(--text-muted);
}

/* ---------- Empty state & notices ---------- */
.craftmarket-empty { max-width: 560px; margin: 24px auto; padding: 40px 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); text-align: center; }
.craftmarket-empty__title { font-size: var(--fs-h3); }
.craftmarket-empty .craftmarket-search { margin-top: 16px; }

.craftmarket-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 18px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-body);
}
.craftmarket-notice--success { border-color: var(--color-success); background: var(--color-success-bg); }
.craftmarket-notice--error { border-color: var(--color-error); background: var(--color-error-bg); }
.craftmarket-notice--info { border-color: var(--color-info); background: var(--color-info-bg); }

/* ---------- Toast ---------- */
.craftmarket-toast {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(36, 27, 22, .32); /* a light veil: a confirmation, not a dialog */
  transition: opacity .25s ease, visibility .25s;
}
.craftmarket-toast__box {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(360px, 100%);
  padding: 32px 28px 28px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: 0 30px 80px -20px rgba(36, 27, 22, .45);
  color: var(--text-heading);
  text-align: center;
  transition: transform .3s cubic-bezier(.2, .8, .3, 1.2);
}
.craftmarket-toast__close {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.craftmarket-toast__close:hover { background: var(--bg-subtle); color: var(--text-heading); }
.craftmarket-toast__icon {
  display: none;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-success-bg);
  color: var(--color-success);
}
.craftmarket-toast.has-icon .craftmarket-toast__icon { display: grid; }
.craftmarket-toast__msg strong { font-weight: 600; }
.craftmarket-toast__msg { display: flex; flex-direction: column; align-items: center; gap: 18px; margin: 0; font-size: 16px; font-weight: 500; line-height: 1.45; }
.craftmarket-toast__msg a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: var(--btn-radius);
  background: var(--text-heading);
  color: var(--bg-card);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.craftmarket-toast__msg a:hover { background: var(--color-primary); color: var(--color-primary-fg); }
:root[data-skin="jewelry"] .craftmarket-toast__msg a { font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
/* Added to cart (theme.js CM.cartToast, .is-cart): ticked heading, the line as in the cart
   (photo | name, price, quantity · options), Checkout / View cart side by side, a text close link. */
.craftmarket-toast.is-cart .craftmarket-toast__box { justify-items: stretch; width: min(440px, 100%); padding: 18px 22px 20px; border-radius: var(--card-radius); text-align: start; }
.craftmarket-toast.is-cart .craftmarket-toast__close { top: 12px; }
.craftmarket-toast.is-cart .craftmarket-toast__msg { align-items: stretch; gap: 16px; font-size: 15px; }
.craftmarket-toast__head { display: flex; align-items: center; gap: 10px; padding-block: 2px 14px; padding-inline-end: 36px; border-bottom: 1px solid var(--border-default); color: var(--text-heading); font-size: 16px; font-weight: 600; }
.craftmarket-toast__head svg { flex: none; color: var(--color-success); }
.craftmarket-toast__item { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 18px; }
.craftmarket-toast__thumb { width: 104px; height: 104px; border-radius: var(--card-radius); background: var(--bg-subtle); object-fit: cover; }
.craftmarket-toast__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.craftmarket-toast__name { color: var(--text-heading); font-size: 16px; font-weight: 600; line-height: 1.3; }
.craftmarket-toast__price { color: var(--text-heading); font-size: 17px; font-weight: 600; }
.craftmarket-toast__meta { color: var(--text-secondary); font-size: 13px; font-weight: 400; }
.craftmarket-toast__actions { display: flex; gap: 10px; width: 100%; }
.craftmarket-toast__msg .craftmarket-toast__actions a { flex: 1 1 0; min-width: 0; padding-inline: 12px; }
.craftmarket-toast__msg a.is-secondary { background: transparent; box-shadow: inset 0 0 0 1px var(--border-strong); color: var(--text-heading); }
.craftmarket-toast__msg a.is-secondary:hover { background: var(--text-heading); box-shadow: none; color: var(--bg-card); }
.craftmarket-toast__continue { justify-self: center; align-self: center; margin-top: -4px; padding: 2px 0; border: 0; border-bottom: 1px solid currentColor; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 400; cursor: pointer; }
.craftmarket-toast__continue:hover { color: var(--text-heading); }
@media (max-width: 480px) {
  .craftmarket-toast.is-cart .craftmarket-toast__box { padding: 16px 16px 18px; }
  .craftmarket-toast__item { grid-template-columns: 80px minmax(0, 1fr); gap: 14px; }
  .craftmarket-toast__thumb { width: 80px; height: 80px; }
  .craftmarket-toast__actions { flex-direction: column; }
  .craftmarket-toast__msg .craftmarket-toast__actions a { flex: none; }
}
.craftmarket-toast[hidden] { display: grid; opacity: 0; visibility: hidden; pointer-events: none; }
.craftmarket-toast[hidden] .craftmarket-toast__box { transform: translateY(14px) scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .craftmarket-toast, .craftmarket-toast__box { transition: none; }
}

/* ---------- Monogram: initials in place of a missing logo (craftmarket_factory_logo) ---------- */
.craftmarket-monogram { display: grid; place-items: center; width: 100%; height: 100%; background: var(--color-primary); color: var(--color-primary-fg, #FFFFFF); font-family: var(--font-heading); font-size: 20px; font-weight: 700; letter-spacing: .02em; line-height: 1; }
.craftmarket-monogram--1 { background: var(--color-accent); color: var(--color-accent-fg, #1B1B1B); }
.craftmarket-monogram--2 { background: var(--text-heading); color: var(--bg-card); }
/* As an avatar (reviews, comments – craftmarket_initials_avatar): a circle sized by --avatar-size. */
.craftmarket-avatar { flex: none; width: var(--avatar-size, var(--avatar-px, 40px)); height: var(--avatar-size, var(--avatar-px, 40px)); border-radius: 50%; font-family: var(--font-body); font-size: calc(var(--avatar-size, var(--avatar-px, 40px)) * .38); font-weight: 600; }

/* ---------- Generic search form ---------- */
.craftmarket-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  background: var(--bg-input);
}
.craftmarket-search:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--ui-focus-ring); }
.craftmarket-search__field {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 18px;
  border: 0;
  background: none;
  color: var(--text-heading);
  font-size: 14px;
  text-overflow: ellipsis;
  outline: 0;
}
.craftmarket-search__field::-webkit-search-cancel-button { -webkit-appearance: none; }
.craftmarket-search__field::placeholder { color: var(--text-secondary); opacity: 1; text-overflow: ellipsis; }
.craftmarket-search__scope {
  flex: none;
  max-width: 170px;
  height: 30px;
  padding: 0 28px 0 12px;
  border: 0;
  border-inline-start: 1px solid var(--border-default);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23786b60' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--text-secondary);
  font-size: 13px;
  appearance: none;
  cursor: pointer;
}
.craftmarket-search__submit,
.craftmarket-search__camera {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-heading);
  cursor: pointer;
}
.craftmarket-search__submit:hover, .craftmarket-search__camera:hover { color: var(--color-primary); }

/* Live search (theme.js): suggestions under the header search boxes. */
.craftmarket-live {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-start: 0;
  z-index: 60;
  width: max(100%, 440px);
  max-width: calc(100vw - 32px);
  max-height: min(70vh, 560px);
  padding: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-lg);
  text-align: start;
}
.craftmarket-live[hidden] { display: none; }
/* Slim scrollbar inside the rounded panel: thin thumb, no arrows, track kept off the corners. */
.craftmarket-live { scrollbar-gutter: stable; }
@supports not selector(::-webkit-scrollbar) {
  .craftmarket-live { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; } /* Firefox */
}
.craftmarket-live::-webkit-scrollbar { width: 10px; }
.craftmarket-live::-webkit-scrollbar-track { margin-block: 10px; background: transparent; }
.craftmarket-live::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 10px; background: var(--border-strong) padding-box; }
.craftmarket-live::-webkit-scrollbar-thumb:hover { background-color: var(--text-secondary); }
.craftmarket-live::-webkit-scrollbar-button { display: none; height: 0; }
.craftmarket-live.is-flip { inset-inline-start: auto; inset-inline-end: 0; }
.craftmarket-live__group + .craftmarket-live__group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border-default); }
.craftmarket-live__label { margin: 0; padding: 8px 10px 4px; color: var(--text-secondary); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.craftmarket-live__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-body); text-decoration: none; }
.craftmarket-live :is(.craftmarket-live__item, .craftmarket-live__all).is-active { background: var(--bg-subtle); }
.craftmarket-live__img { flex: none; width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--bg-subtle); object-fit: cover; }
.craftmarket-live__group--makers .craftmarket-live__img { border-radius: 50%; }
.craftmarket-live__body { display: grid; flex: 1 1 auto; gap: 2px; min-width: 0; }
.craftmarket-live__title { overflow: hidden; color: var(--text-heading); font-size: 14px; font-weight: 500; line-height: 1.35; white-space: nowrap; text-overflow: ellipsis; }
.craftmarket-live__title mark { padding: 0; background: none; color: inherit; font-weight: 700; }
.craftmarket-live__meta { overflow: hidden; color: var(--text-secondary); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.craftmarket-live__price { flex: none; color: var(--text-heading); font-size: 14px; font-weight: 600; white-space: nowrap; }
.craftmarket-live__price del { margin-inline-end: 4px; color: var(--text-secondary); font-size: 12px; font-weight: 400; }
.craftmarket-live__price ins { text-decoration: none; }
.craftmarket-live__all { display: block; margin-top: 4px; padding: 12px 10px; border-top: 1px solid var(--border-default); border-radius: var(--radius-sm); color: var(--color-primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.craftmarket-live__empty { margin: 0; padding: 14px 10px; color: var(--text-secondary); font-size: 14px; }
.craftmarket-live__empty + .craftmarket-live__suggest { margin: -8px 0 0; padding: 0 10px 14px; color: var(--text-heading); font-size: 15px; }
.craftmarket-live__all + .craftmarket-live__every { margin-top: 0; border-top: 0; }
.craftmarket-live__every { color: var(--text-heading); font-weight: 500; }
.craftmarket-live__empty ~ .craftmarket-live__every { border-top: 0; }
.craftmarket-live__suggest a { border-radius: var(--radius-xs); color: var(--color-primary); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.craftmarket-live__suggest a.is-active { background: var(--bg-subtle); }
.craftmarket-live__popular { padding: 4px 2px 6px; }
.craftmarket-live__empty + .craftmarket-live__popular { margin-top: 2px; padding-top: 6px; border-top: 1px solid var(--border-default); }
.craftmarket-live__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 8px 4px; }
.craftmarket-live__chip { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 14px; border: 1px solid var(--border-default); border-radius: var(--radius-pill); background: var(--bg-page); color: var(--text-heading); font-size: 13px; text-decoration: none; transition: border-color .2s ease, color .2s ease; }
.craftmarket-live__chip:hover, .craftmarket-live__chip.is-active { border-color: var(--color-primary); color: var(--color-primary); }
.craftmarket-search.is-live-loading .craftmarket-search__submit { opacity: .45; }
.craftmarket-drawer .craftmarket-live { width: 100%; max-width: none; max-height: 60vh; }

/* Search filter: icon button opening a list of choices (radios submitted with the form). */
.craftmarket-search__filter { position: static; flex: none; }
.craftmarket-search__filter-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--text-secondary);
  list-style: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.craftmarket-search__filter-toggle::-webkit-details-marker { display: none; }
.craftmarket-search__filter-toggle:hover,
.craftmarket-search__filter[open] .craftmarket-search__filter-toggle { background: var(--bg-subtle); color: var(--color-primary); }
.craftmarket-search__filter-toggle:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 1px; }
.craftmarket-search__filter.is-set .craftmarket-search__filter-toggle { color: var(--color-primary); }
.craftmarket-search__filter.is-set .craftmarket-search__filter-toggle::after {
  content: "";
  position: absolute;
  top: 7px;
  inset-inline-end: 7px;
  width: 7px;
  height: 7px;
  border: 1.5px solid var(--bg-input);
  border-radius: 50%;
  background: var(--color-primary);
}
.craftmarket-search__filter-menu {
  position: absolute;
  top: calc(100% + 8px);
  inset-inline-end: 0;
  z-index: 70;
  display: grid;
  gap: 2px;
  min-width: 220px;
  max-height: min(360px, 70vh);
  margin: 0;
  padding: 8px;
  overflow-y: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}
.craftmarket-search__filter-menu legend {
  float: left;
  width: 100%;
  padding: 4px 10px 8px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
}
.craftmarket-search__filter-menu label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-size: 14px;
  cursor: pointer;
}
.craftmarket-search__filter-menu label:hover { background: var(--bg-subtle); color: var(--text-heading); }
.craftmarket-search__filter-menu input { width: 16px; height: 16px; margin: 0; accent-color: var(--color-primary); }
.craftmarket-search__filter-menu label:has(input:checked) { color: var(--text-heading); font-weight: 600; }

/* ---------- Scroll rows (carousels with native scrolling) ---------- */
.craftmarket-scroller {
  display: grid;
  grid-auto-columns: var(--scroller-item, minmax(240px, 1fr));
  grid-auto-flow: column;
  gap: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.craftmarket-scroller::-webkit-scrollbar { display: none; }
.craftmarket-scroller > * { scroll-snap-align: start; }
.craftmarket-scroller-nav { display: flex; gap: 8px; }
.craftmarket-scroller-nav[hidden] { display: none; }

/* ---------- Marquee ---------- */
.craftmarket-marquee { position: relative; overflow: hidden; }
.craftmarket-marquee__track {
  display: flex;
  width: max-content;
  animation: craftmarket-marquee var(--marquee-speed, 40s) linear infinite;
}
.craftmarket-marquee:hover .craftmarket-marquee__track { animation-play-state: paused; }
.craftmarket-marquee__group { display: flex; flex: none; align-items: center; margin: 0; padding: 0; list-style: none; }
@keyframes craftmarket-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/*rtl:raw:
@keyframes craftmarket-marquee { from { transform: translateX(0); } to { transform: translateX(50%); } }
*/
@media (prefers-reduced-motion: reduce) {
  .craftmarket-marquee__track { animation: none; flex-wrap: wrap; }
  /* Static: one copy of the items, wrapped. */
  .craftmarket-marquee__group { flex: 1 1 100%; flex-wrap: wrap; justify-content: center; }
  .craftmarket-marquee__group[aria-hidden="true"],
  .craftmarket-marquee__group > [class$="__item"][aria-hidden="true"],
  .craftmarket-marquee__group > [aria-hidden="true"] + [class$="__sep"] { display: none; }
}

/* ---------- Maps (craftmarket_map_land(): land masked from assets/images/maps/{view}.svg) ---------- */
.craftmarket-map { position: relative; aspect-ratio: var(--map-ratio, 1.5); }
.craftmarket-map__land {
  position: absolute;
  inset: 0;
  background: var(--map-land, currentColor);
  -webkit-mask: var(--map) center / 100% 100% no-repeat;
  mask: var(--map) center / 100% 100% no-repeat;
  pointer-events: none;
}
.craftmarket-map__land--sea { --map: url("../../images/maps/sea.svg"); }
.craftmarket-map__land--asia { --map: url("../../images/maps/asia.svg"); }
/* Places sit at their latitude / longitude: never mirrored for right-to-left. */
.craftmarket-map__pin {
  position: absolute;
  top: calc(var(--y) - 38px);
  left: calc(var(--x) - 15px) /*rtl:ignore*/;
  z-index: 1;
  width: 30px;
  height: 38px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.craftmarket-map__pin.is-active,
.craftmarket-map__pin[aria-selected="true"] { z-index: 2; }
.craftmarket-map__marker {
  position: absolute;
  inset: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2px solid #FFFFFF;
  border-radius: 50% 50% 50% 0;
  background: var(--color-accent);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
  transform: rotate(-45deg);
  transition: transform .2s ease, background-color .2s ease;
}
.craftmarket-map__marker svg { width: 14px; height: 14px; transform: rotate(45deg); }
.craftmarket-map__pin:hover .craftmarket-map__marker,
.craftmarket-map__pin[aria-selected="true"] .craftmarket-map__marker { background: var(--color-accent-hover); transform: rotate(-45deg) scale(1.15); }
.craftmarket-map__pin:focus-visible { outline: none; }
.craftmarket-map__pin:focus-visible .craftmarket-map__marker { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--border-focus); } /* readable on the dark map too */
.craftmarket-map__label {
  position: absolute;
  top: 2px;
  left: 38px /*rtl:ignore*/;
  display: grid;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: inherit;
  line-height: 1.2;
  text-align: left /*rtl:ignore*/;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}
/*rtl:ignore*/
.craftmarket-map__pin--end .craftmarket-map__label { right: 38px; left: auto; text-align: right; }
.craftmarket-map__label strong { font-size: 15px; font-weight: 600; }
.craftmarket-map__label span { font-size: 11px; opacity: .9; }
.craftmarket-map__pin[aria-selected="true"] .craftmarket-map__label { background: var(--bg-card); color: var(--text-heading); box-shadow: var(--shadow-md); }

/* ---------- Utilities ---------- */
.craftmarket-visually-center { display: grid; place-items: center; }
.craftmarket-flag { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.craftmarket-dot { display: inline-block; width: 4px; height: 4px; margin-inline: 6px; border-radius: 50%; background: currentColor; vertical-align: middle; opacity: .6; }
