/*
 * IFP Color Finder – Frontend UI (minimal, MetaFormFelder-inspired)
 * Scoped with ifp-cf-* to avoid collisions.
 */

.ifp-cf-frontend {
  --ifp-cf-bg: #ffffff;
  --ifp-cf-border: #d9e0ea;
  --ifp-cf-soft: #eef3f8;
  --ifp-cf-text: #17232f;
  --ifp-cf-muted: #516173;
  --ifp-cf-accent: #1d4ed8;

  box-sizing: border-box;
}

.ifp-cf-frontend *,
.ifp-cf-frontend *::before,
.ifp-cf-frontend *::after {
  box-sizing: inherit;
}

.ifp-cf-frontend .ifp-cf-panel {
  background: var(--ifp-cf-bg);
  border: 1px solid var(--ifp-cf-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.ifp-cf-frontend .ifp-cf-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f3f7fc 100%);
  margin: 0 0 14px;
}

.ifp-cf-frontend .ifp-cf-hero-title {
  margin: 0;
  color: var(--ifp-cf-text);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
}

.ifp-cf-frontend .ifp-cf-hero-sub {
  margin: 0;
  color: var(--ifp-cf-muted);
  font-size: 13px;
  line-height: 1.35;
}

.ifp-cf-frontend .ifp-cf-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 14px;
}

@media (max-width: 860px) {
  .ifp-cf-frontend .ifp-cf-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 520px) {
  .ifp-cf-frontend .ifp-cf-form {
    grid-template-columns: minmax(0, 1fr);
  }
}


.ifp-cf-frontend .ifp-cf-pills{
  grid-column: 1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding: 4px 0 2px;
  margin: 0 0 6px;
}

.ifp-cf-frontend .ifp-cf-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe4f0;
  background: #f6f9ff;
  color: var(--ifp-cf-text);
  text-decoration:none;
  font-size: 12px;
  line-height: 1;
}

.ifp-cf-frontend .ifp-cf-pill:hover{
  border-color: rgba(29,78,216,0.35);
  box-shadow: 0 0 0 3px rgba(29,78,216,0.10);
}

.ifp-cf-frontend .ifp-cf-pill-label{
  color: var(--ifp-cf-muted);
  font-weight: 600;
}

.ifp-cf-frontend .ifp-cf-pill-x{
  display:inline-flex;
  width: 16px;
  height: 16px;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  background: rgba(15,23,42,0.08);
  font-weight: 700;
}

.ifp-cf-frontend .ifp-cf-field--search{
  grid-column: 1 / -1;
}

.ifp-cf-frontend .ifp-cf-submit{
  display:none;
}

.ifp-cf-frontend .ifp-cf-field {
  display: grid;
  gap: 6px;
}

.ifp-cf-frontend .ifp-cf-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ifp-cf-muted);
}

.ifp-cf-frontend .ifp-cf-field input[type="text"],
.ifp-cf-frontend .ifp-cf-field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ifp-cf-border);
  background: #fff;
  color: var(--ifp-cf-text);
  outline: none;
}

.ifp-cf-frontend .ifp-cf-field input[type="text"]:focus,
.ifp-cf-frontend .ifp-cf-field select:focus {
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.ifp-cf-frontend .ifp-cf-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.ifp-cf-frontend .ifp-cf-actions button[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--ifp-cf-accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.ifp-cf-frontend .ifp-cf-actions button[type="submit"]:hover {
  filter: brightness(0.95);
}

.ifp-cf-frontend .ifp-cf-actions a {
  color: var(--ifp-cf-accent);
  text-decoration: none;
  font-weight: 600;
}

.ifp-cf-frontend .ifp-cf-results {
  margin-top: 6px;
}

.ifp-cf-frontend .ifp-cf-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}



/* Grid columns (robust even if wrapper class changes) */
.ifp-cf-result-list--grid{
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

@media (min-width: 980px){
  .ifp-cf-result-list--grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Finder listing grid */
.ifp-cf-frontend.ifp-cf-layout-grid .ifp-cf-result-list{
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
}

@media (min-width: 980px){
  .ifp-cf-frontend.ifp-cf-layout-grid .ifp-cf-result-list{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ifp-cf-frontend.ifp-cf-layout-grid .ifp-cf-result{
  height: 100%;
}

.ifp-cf-frontend .ifp-cf-result {
  border: 1px solid var(--ifp-cf-border);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.ifp-cf-frontend .ifp-cf-result-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ifp-cf-frontend .ifp-cf-swatch {
  width: var(--ifp-cf-swatch);
  height: var(--ifp-cf-swatch);
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  display: inline-block;
  flex: 0 0 auto;
}

.ifp-cf-frontend .ifp-cf-title {
  color: var(--ifp-cf-text);
  font-weight: 800;
}

.ifp-cf-frontend .ifp-cf-code,
.ifp-cf-frontend .ifp-cf-hex {
  font-size: 12px;
  color: var(--ifp-cf-muted);
  font-weight: 700;
}

.ifp-cf-frontend .ifp-cf-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ifp-cf-frontend .ifp-cf-url {
  font-size: 12px;
  font-weight: 700;
  color: var(--ifp-cf-accent);
  text-decoration: none;
}

.ifp-cf-frontend .ifp-cf-url:hover {
  text-decoration: underline;
}

.ifp-cf-frontend .ifp-cf-no-results {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed var(--ifp-cf-border);
  background: #fbfdff;
  color: var(--ifp-cf-muted);
  font-weight: 600;
}



/* Copyable items */
.ifp-cf-item{
  display:inline-flex;
  align-items:center;
  gap:var(--ifp-cf-swatch-gap,8px);
  padding:6px 10px;
  border:1px solid rgba(0,0,0,.10);
  border-radius:10px;
  background: rgba(255,255,255,.75);
}
.ifp-cf-label{
  font-size:12px;
  opacity:.7;
}
.ifp-cf-value{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size:13px;
}
.ifp-cf-copy{
  appearance:none;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  padding:4px 8px;
  border-radius:8px;
  cursor:pointer;
  font-size:12px;
  line-height:1;
}
.ifp-cf-copy.is-flash{
  font-weight:700;
}



/* Swatch image support */
.ifp-cf-swatch--img{
  background: transparent;
  padding: 0;
  overflow: hidden;
}
.ifp-cf-swatch-img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}



/* Larger swatches in grid layout */
.ifp-cf-layout-grid .ifp-cf-swatch{
  width: calc(var(--ifp-cf-swatch) * 1.4);
  height: calc(var(--ifp-cf-swatch) * 1.4);
}
/* Layout enhancements (professional polish) */
.ifp-cf-frontend { --ifp-cf-swatch: 32px; }
.ifp-cf-layout-grid .ifp-cf-result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: stretch;
}
.ifp-cf-layout-list .ifp-cf-result-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ifp-cf-result { border-radius: 12px; }
.ifp-cf-swatch {
  width: var(--ifp-cf-swatch);
  height: var(--ifp-cf-swatch);
  border-radius: 8px;
  display: inline-block;
  border: 1px solid rgba(0,0,0,0.08);
  flex: 0 0 auto;
}
.ifp-cf-swatch--img img { width: var(--ifp-cf-swatch); height: var(--ifp-cf-swatch); border-radius: 8px; display:block; }

.ifp-cf-pagination { margin-top: 14px; }
.ifp-cf-pagination ul { list-style: none; display: flex; gap: 8px; padding: 0; margin: 0; flex-wrap: wrap; }
.ifp-cf-pagination a, .ifp-cf-pagination span {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.12);
  text-decoration: none;
}
.ifp-cf-pagination .current { font-weight: 600; }


/* Summary + secondary actions */
.ifp-cf-summary{ display:flex; justify-content:space-between; align-items:center; margin: 6px 0 10px; }
.ifp-cf-summary-count{ font-size:12px; font-weight:700; color: var(--ifp-cf-muted); }
.ifp-cf-actions a{ display:inline-block; padding:10px 14px; border-radius:12px; border:1px solid var(--ifp-cf-border); background: #fff; }
.ifp-cf-actions a:hover{ background: var(--ifp-cf-soft); }


/* === Pro Grid Overhaul (v0.1.40) ===
   Ziel: Im Grid muss sofort erkennbar sein, dass Farben gelistet werden.
   Wir verwenden reine CSS-Overrides (lossless), ohne HTML/JS zu ändern. */
.ifp-cf-layout-grid .ifp-cf-result{
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.ifp-cf-layout-grid .ifp-cf-result-top{
  display: block;
  padding: 0;
}
.ifp-cf-layout-grid .ifp-cf-swatch{
  display: block;
  width: 100%;
  height: calc(var(--ifp-cf-swatch) * 3.0);
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.ifp-cf-layout-grid .ifp-cf-swatch--img img{
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 0;
  object-fit: cover;
}
.ifp-cf-layout-grid .ifp-cf-title{
  display: block;
  padding: 12px 14px 0;
  font-size: 15px;
  line-height: 1.25;
}
.ifp-cf-layout-grid .ifp-cf-meta{
  padding: 10px 14px 14px;
  gap: 8px;
}
.ifp-cf-layout-grid .ifp-cf-actions{
  padding: 0 14px 14px;
}
.ifp-cf-layout-grid .ifp-cf-result:hover{
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}


/* Grid cards: keep a consistent card width even when only one result exists */
.ifp-cf-layout-grid .ifp-cf-result {
  flex: 0 1 340px;
  max-width: 380px;
  width: 100%;
}

/* Ensure a consistent header area (color background and optional image overlay) */
.ifp-cf-frontend .ifp-cf-card-header {
  width: 100%;
  height: calc(var(--ifp-cf-swatch) * 3.2);
  min-height: 120px;
  border-radius: 14px 14px 0 0;
  background: #f1f5f9;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
  overflow: hidden;
  position: relative;
}
.ifp-cf-frontend .ifp-cf-card-header .ifp-cf-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* In grid layout, cards are color-first: header on top, content below */
.ifp-cf-layout-grid .ifp-cf-result {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.ifp-cf-layout-grid .ifp-cf-result-top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 0;
}
.ifp-cf-layout-grid .ifp-cf-title {
  padding: 0 14px;
  font-size: 16px;
}
.ifp-cf-layout-grid .ifp-cf-meta {
  padding: 0 14px 14px 14px;
}

/* If there is no hex and no image, keep header area (background already) */
.ifp-cf-layout-grid .ifp-cf-card-header:empty::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.06), rgba(15,23,42,0));
}

/* Mobile: allow full width */
@media (max-width: 520px) {
  .ifp-cf-layout-grid .ifp-cf-result { flex-basis: 100%; max-width: none; }
}


/* Step navigation (Category -> Manufacturer -> Colors) */
.ifp-cf-nav-title {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: var(--ifp-cf-text);
}
.ifp-cf-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  max-width: 980px;
}
.ifp-cf-choice {
  flex: 0 1 220px;
  max-width: 260px;

  display: block;
  padding: 12px 12px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 12px;
  background: var(--ifp-cf-bg);
  text-decoration: none;
  color: var(--ifp-cf-text);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ifp-cf-choice:hover {
  transform: translateY(-1px);
  border-color: rgba(29,78,216,.55);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.ifp-cf-choice-label {
  display: block;
  font-weight: 600;
  font-size: 14px;
}
.ifp-cf-nav-breadcrumb {
  margin: 0 0 10px 0;
}
.ifp-cf-nav-back {
  color: var(--ifp-cf-muted);
  text-decoration: none;
}
.ifp-cf-nav-back:hover {
  text-decoration: underline;
}


/* Navigation (category -> manufacturer -> colors) */
.ifp-cf-nav-selected {
  margin: 8px 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 12px;
  background: rgba(0,0,0,.02);
  font-size: 13px;
}
.ifp-cf-nav-selected-key { font-weight: 600; }
.ifp-cf-nav-selected-sep { opacity: .6; }

.ifp-cf-nav-search-wrap { margin: 8px 0 12px; max-width: 420px; }
.ifp-cf-nav-search {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--ifp-cf-border);
  background: var(--ifp-cf-bg);
  color: var(--ifp-cf-text);
}


/* Category cards: image + teaser */
.ifp-cf-choice--category {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
}

.ifp-cf-choice-media {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--ifp-cf-soft);
  border: 1px solid var(--ifp-cf-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.ifp-cf-choice-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ifp-cf-choice-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ifp-cf-choice-teaser {
  display: block;
  color: var(--ifp-cf-muted);
  font-size: 13px;
  line-height: 1.25;
}

/* Selected category header (breadcrumb step 2/3) */
.ifp-cf-nav-selected--category {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ifp-cf-nav-selected-media {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--ifp-cf-soft);
  border: 1px solid var(--ifp-cf-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ifp-cf-nav-selected-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Category description block */
.ifp-cf-cat-description {
  margin: 10px 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--ifp-cf-border);
  background: #fff;
  border-radius: 14px;
  color: var(--ifp-cf-text);
}

.ifp-cf-cat-description p {
  margin: 0 0 10px;
}

.ifp-cf-cat-description p:last-child {
  margin-bottom: 0;
}


/* --- Enhancements: cards with logos + family filter --- */
.ifp-cf-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.ifp-cf-choice {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 14px;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.ifp-cf-choice:hover {
  transform: translateY(-1px);
  border-color: #c6d2e3;
  box-shadow: 0 10px 24px rgba(20, 34, 56, 0.08);
}

.ifp-cf-choice-media {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--ifp-cf-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 44px;
}

.ifp-cf-choice-media--empty {
  background: var(--ifp-cf-soft);
}

.ifp-cf-choice-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ifp-cf-choice-label {
  font-weight: 600;
  line-height: 1.2;
}

.ifp-cf-family-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 14px;
  background: #fff;
  margin: 12px 0 16px;
}

.ifp-cf-family-label {
  font-weight: 600;
  color: var(--ifp-cf-muted);
}

.ifp-cf-family-select {
  min-width: 220px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--ifp-cf-border);
  background: #fff;
}

.ifp-cf-nav-selected-media {
  display: inline-flex;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ifp-cf-soft);
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  margin-right: 8px;
}

.ifp-cf-nav-selected-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ifp-cf-result-man-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--ifp-cf-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.ifp-cf-result-man-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* Category icons: show as compact round icon */
.ifp-cf-choice--category .ifp-cf-choice-media {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--ifp-cf-soft);
  border: 1px solid var(--ifp-cf-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 56px;
}
.ifp-cf-choice--category .ifp-cf-choice-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ifp-cf-choice--category {
  gap: 14px;
  align-items: center;
}
.ifp-cf-color-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid var(--ifp-cf-border);
  background: var(--ifp-cf-soft);
  color: var(--ifp-cf-muted);
  font-size: 12px;
  line-height: 1.6;
}


/* === Navigation polish: category/manufacturer cards === */
.ifp-cf-choice {
  border-radius: 14px;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
  box-shadow: 0 6px 18px rgba(17,24,39,.06);
}
.ifp-cf-choice:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17,24,39,.10);
  border-color: rgba(17,24,39,.18);
}
.ifp-cf-choice-count {
  display: inline-flex;
  margin-left: 8px;
  font-size: 12px;
  opacity: .75;
}

/* === Family filter as clickable tiles === */
.ifp-cf-family-block {
  margin: 18px 0 10px;
  padding: 14px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 16px;
  background: var(--ifp-cf-bg);
}
.ifp-cf-family-title {
  font-weight: 700;
  margin: 0 0 10px;
}
.ifp-cf-family-grid {
  display: grid;
  gap: 10px;
}
.ifp-cf-family-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ifp-cf-border);
  border-radius: 14px;
  text-decoration: none;
  background: #fff;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ifp-cf-family-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(17,24,39,.10);
  border-color: rgba(17,24,39,.18);
}
.ifp-cf-family-tile.is-active {
  border-color: rgba(59,130,246,.55);
  box-shadow: 0 10px 26px rgba(59,130,246,.15);
}
.ifp-cf-family-name {
  font-weight: 600;
}
.ifp-cf-family-count {
  font-size: 12px;
  opacity: .75;
}

/* Parent grouping (Hell/Dunkel under a base color) */
.ifp-cf-family-group {
  padding-top: 6px;
  border-top: 1px dashed rgba(17,24,39,.12);
}
.ifp-cf-family-group:first-child {
  border-top: 0;
  padding-top: 0;
}
.ifp-cf-family-group-label {
  font-weight: 700;
  margin: 6px 0 8px;
  opacity: .9;
}
.ifp-cf-family-group-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

/* Make choice grid slightly denser and more "app-like" */
.ifp-cf-choice-grid {
  gap: 12px;
}
@media (min-width: 720px) {
  .ifp-cf-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


/* --- IFP CF UI Upgrade (v0.1.72) ------------------------------------ */

/* Accordion (Farbgruppen) */
.ifp-cf-accordion {
  margin: 12px 0 16px;
}
.ifp-cf-accordion-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--ifp-cf-border);
  background: #fff;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.ifp-cf-accordion-title {
  font-weight: 700;
}
.ifp-cf-accordion-selected {
  font-size: 13px;
  color: var(--ifp-cf-muted);
  margin-left: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}
.ifp-cf-accordion-icon {
  opacity: .7;
  transition: transform .15s ease;
}
.ifp-cf-accordion-toggle[aria-expanded="true"] .ifp-cf-accordion-icon {
  transform: rotate(180deg);
}
.ifp-cf-accordion-panel {
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--ifp-cf-border);
  background: #fff;
}

/* Farbgruppen: kompakte Chips statt riesiger Kacheln */
.ifp-cf-family-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}
.ifp-cf-family-tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--ifp-cf-border);
  background: var(--ifp-cf-bg);
  text-decoration: none;
  color: var(--ifp-cf-text);
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.ifp-cf-family-tile:hover {
  transform: translateY(-1px);
  border-color: rgba(29,78,216,.55);
  box-shadow: 0 6px 18px rgba(15,23,42,.08);
}
.ifp-cf-family-tile.is-active {
  border-color: rgba(29,78,216,.8);
  box-shadow: 0 8px 22px rgba(29,78,216,.12);
}
.ifp-cf-family-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.ifp-cf-family-name {
  font-weight: 600;
  font-size: 13px;
}
.ifp-cf-family-count {
  font-size: 12px;
  opacity: .75;
}

/* Cards: etwas "professioneller" */
.ifp-cf-choice-grid {
  gap: 12px;
}
.ifp-cf-choice {
  padding: 14px 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.06);
  border: 1px solid rgba(15,23,42,.08);
}
.ifp-cf-choice:hover {
  border-color: rgba(29,78,216,.55);
  box-shadow: 0 10px 26px rgba(15,23,42,.10);
}
.ifp-cf-choice-media {
  border-radius: 14px;
  background: var(--ifp-cf-soft);
}
.ifp-cf-choice-label {
  font-size: 15px;
  font-weight: 700;
}
.ifp-cf-choice-teaser {
  margin-top: 6px;
  color: var(--ifp-cf-muted);
}

/* Result cards spacing */
.ifp-cf-result {
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.06);
}


/* --- Pro/Woo: Product color swatches (lossless additive) --- */
.ifp-cf-product-swatches__label{font-weight:600;margin-bottom:6px;}
.ifp-cf-product-swatches__list{display:flex;flex-wrap:wrap;gap:var(--ifp-cf-swatch-gap, 8px) !important;}
/* Fallback spacing for browsers/themes where flex-gap is ineffective */
.ifp-cf-product-swatches__list{margin:calc(var(--ifp-cf-swatch-gap, 8px) / -2);}
.ifp-cf-product-swatch{margin:calc(var(--ifp-cf-swatch-gap, 8px) / 2);}
.ifp-cf-swatch{display:inline-flex;align-items:center;gap:6px;text-decoration:none;border:1px solid rgba(0,0,0,.12);padding:6px 8px;border-radius:999px;}
.ifp-cf-swatch:focus{outline:2px solid currentColor;outline-offset:2px;}
.ifp-cf-swatch__dot{width:14px;height:14px;border-radius:50%;border:1px solid rgba(0,0,0,.25);display:inline-block;}
.ifp-cf-swatch__name{font-size:0.9em;line-height:1;}
.ifp-cf-color-shop-link .button{display:inline-block;}


/* Linked products on Color pages */
.ifp-cf-linked-products{margin:24px 0;}
.ifp-cf-linked-products__more{margin-top:12px;}


.ifp-cf-product-swatches {
  margin: 10px 0;
  padding: var(--ifp-cf-box-padding, 10px) calc(var(--ifp-cf-box-padding, 10px) + 2px);
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: var(--ifp-cf-box-radius, 12px);
  background: var(--ifp-cf-box-bg, transparent);
  box-sizing: border-box;
}

.ifp-cf-product-swatches__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin: 0 0 8px;
}

.ifp-cf-product-swatches__label{
  font-weight: 700;
  font-size: var(--ifp-cf-label-size, 13px);
  line-height: 1.2;
  color: var(--ifp-cf-label-color, inherit);
}

.ifp-cf-product-swatches__toggle{
  appearance:none;
  border: 1px solid rgba(15,23,42,0.18);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.ifp-cf-product-swatches__toggle:hover{
  opacity: .9;
}

.ifp-cf-product-swatches__list{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(22px, 1fr));
  gap: 8px;
}

.ifp-cf-product-swatch{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ifp-cf-swatch-size,14px);
  min-width: var(--ifp-cf-swatch-size,14px);
  height: var(--ifp-cf-swatch-size,14px);
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}

.ifp-cf-product-swatch__dot{
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.25);
  background: rgba(15,23,42,0.08);
  box-sizing: border-box;
}
.ifp-cf-product-swatch__sr{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip: rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}




/* === Product Swatches (Single Product) === */
.ifp-cf-product-swatches {
  margin: 14px 0 10px;
}
.ifp-cf-product-swatches__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.ifp-cf-product-swatches__label{
  font-weight:600;
  font-size:14px;
  line-height:1.3;
}
.ifp-cf-product-swatches__toggle{
  appearance:none;
  border:1px solid var(--ifp-cf-border, #d9e0ea);
  background: var(--ifp-cf-soft, #eef3f8);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.ifp-cf-product-swatches__list{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(26px, 1fr));
  gap: 8px;
  max-width: 520px;
}
.ifp-cf-product-swatch{
  display:flex;
  align-items:center;
  justify-content:center;
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,0.12);
  text-decoration:none;
}
.ifp-cf-product-swatch:hover,
.ifp-cf-product-swatch:focus{
  outline:none;
  box-shadow: 0 0 0 3px rgba(29,78,216,0.25);
}
.ifp-cf-product-swatch__dot{
  width:100%;
  height:100%;
  border-radius:999px;
  background:#cbd5e1;
}
.ifp-cf-product-swatch__sr{
  position:absolute !important;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}

/* === Shop Filter UI === */
.ifp-cf-shop-filterbar{
  border:1px solid var(--ifp-cf-border, #d9e0ea);
  background: rgba(255,255,255,0.7);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 10px 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.ifp-cf-shop-filterbar__left{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ifp-cf-shop-filterbar__badge{
  display:inline-flex;
  align-items:center;
  gap:var(--ifp-cf-swatch-gap,8px);
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  background: var(--ifp-cf-soft, #eef3f8);
  font-size: 12px;
}
.ifp-cf-shop-filterbar__dot{
  width:14px;height:14px;border-radius:999px;
  border:1px solid rgba(0,0,0,0.15);
  background:#cbd5e1;
}
.ifp-cf-shop-filterbar__clear{
  font-size:12px;
  text-decoration: none;
  border:1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}
.ifp-cf-shop-colorsearch{
  position:relative;
  min-width: 240px;
  flex: 1;
  max-width: 360px;
}
.ifp-cf-shop-colorsearch input{
  width:100%;
  border:1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
}
.ifp-cf-shop-colorsearch__list{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 6px);
  z-index: 9999;
  border:1px solid var(--ifp-cf-border, #d9e0ea);
  background:#fff;
  border-radius: 12px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}
.ifp-cf-shop-colorsearch__item{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  cursor:pointer;
  font-size: 13px;
}
.ifp-cf-shop-colorsearch__item:hover{
  background: var(--ifp-cf-soft, #eef3f8);
}
.ifp-cf-shop-colorsearch__itemdot{
  width:14px;height:14px;border-radius:999px;
  border:1px solid rgba(0,0,0,0.15);
  background:#cbd5e1;
}


/* WooCommerce compatibility: keep swatches from breaking add-to-cart flex layouts */
.woocommerce div.product form.cart .ifp-cf-frontend,
.woocommerce div.product form.cart .ifp-cf-product-swatches{
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  display:block;
  clear:both;
}


/* WooCommerce single product: force plugin blocks to full row inside flex containers (themes often use flex on form.cart or variation wrapper) */
.woocommerce div.product form.cart .ifp-cf-colorify,
.woocommerce div.product form.cart .ifp-cf-frontend,
.woocommerce div.product form.cart .ifp-cf-product-swatches,
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .ifp-cf-colorify,
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .ifp-cf-frontend,
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart .ifp-cf-product-swatches{
  width: 100%;
  max-width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  flex-basis: 100%;
  display: block;
  clear: both;
  box-sizing: border-box;
}

.woocommerce div.product form.cart .ifp-cf-product-swatches{ 
  margin: 10px 0;
}


/* IFP CF modal (Farbseite) */
.ifp-cf-modal{position:fixed;inset:0;z-index:99999;}
.ifp-cf-modal__backdrop{position:absolute;inset:0;background:rgba(0,0,0,0.6);}
.ifp-cf-modal__dialog{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:min(960px,92vw);height:min(720px,86vh);background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,0.35);}
.ifp-cf-modal__close{position:absolute;right:10px;top:10px;z-index:2;border:0;border-radius:999px;padding:6px 10px;cursor:pointer;}
.ifp-cf-modal__frame{width:100%;height:100%;border:0;}

/* Swatches notice */
.ifp-cf-product-swatches__notice{margin-top:8px;padding:8px 10px;border-radius:8px;background:rgba(220,38,38,0.12);border:1px solid rgba(220,38,38,0.35);font-size:14px;}


/* === IFP CF: Theme override guard for swatch buttons (prevent theme button styles) === */
.woocommerce div.product form.cart .ifp-cf-product-swatch,
.woocommerce div.product .summary .ifp-cf-product-swatch{
  -webkit-appearance: none !important;
  appearance: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: var(--ifp-cf-swatch-size,14px) !important;
  width: var(--ifp-cf-swatch-size,14px) !important;
  min-width: var(--ifp-cf-swatch-size,14px) !important;
  border-radius: 999px !important;
  line-height: 1 !important;
  font-size: 0 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden !important;
}
.woocommerce div.product form.cart .ifp-cf-product-swatch:focus-visible{
  outline: 2px solid rgba(0,0,0,0.35) !important;
  outline-offset: 2px !important;
}



/* Selected colors (pills) */
.ifp-cf-product-swatches__selected{margin-top:8px;}
.ifp-cf-selected-pills{display:flex;flex-wrap:wrap;gap:6px;}
.ifp-cf-selected-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:999px;
  padding:4px 8px;
  background:rgba(255,255,255,.15);
  cursor:pointer;
}
.ifp-cf-selected-pill__dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--ifp-cf-pill-color, transparent);
  border:1px solid rgba(0,0,0,.25);
  display:inline-block;
}
.ifp-cf-selected-pill__text{font-size:12px;line-height:1;}
.ifp-cf-selected-pill__x{font-weight:700;opacity:.7;}
.ifp-cf-selected-pill:hover{background:rgba(255,255,255,.25);}

/* Hide selected swatches in grid (CSS-driven, robust against theme button styles) */
.ifp-cf-product-swatches.ifp-cf-hide-selected .ifp-cf-product-swatch.is-selected{display:none !important;}


/* Swatches: no-click mode */
.woocommerce div.product .ifp-cf-product-swatches.ifp-cf-click-none .ifp-cf-product-swatch{
  cursor: default !important;
}
.woocommerce div.product .ifp-cf-product-swatches.ifp-cf-click-none .ifp-cf-product-swatch:active{
  transform: none !important;
}



/* Single Color Page */
.ifp-cf-color-page{
  margin: 18px 0 22px;
}
.ifp-cf-color-card{
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 18px;
  background: var(--ifp-cf-bg, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  overflow: hidden;
}
@media (max-width: 860px){
  .ifp-cf-color-card{ grid-template-columns: 1fr; }
}

.ifp-cf-color-preview{
  background: var(--ifp-cf-preview-bg, linear-gradient(180deg, rgba(248,251,255,1) 0%, rgba(243,247,252,1) 100%));
  border: 1px solid #dbe4f0;
  border-radius: 16px;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height: 260px;
}
.ifp-cf-color-preview-img{
  width: 100%;
  height: auto;
  border-radius: 14px;
  display:block;
  object-fit: cover;
}
.ifp-cf-color-swatch-large{
  width: 100%;
  min-height: 220px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.25);
}
.ifp-cf-color-swatch-large--empty{
  display:flex;
  align-items:center;
  justify-content:center;
  color: rgba(23,35,47,.6);
  background: #f3f6fb;
}

.ifp-cf-color-title{
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 2px 0 10px;
  color: var(--ifp-cf-text, #17232f);
}

.ifp-cf-color-actions{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin: 0 0 14px;
}

.ifp-cf-btn{
  border-radius: 12px;
  padding: 10px 14px;
}
.ifp-cf-btn--ghost{
  background: transparent;
}

.ifp-cf-color-kv{
  display:grid;
  gap: 10px;
}
.ifp-cf-kv-row{
  display:grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(217,224,234,0.9);
  border-radius: 14px;
  background: #fbfdff;
}
@media (max-width: 860px){
  .ifp-cf-kv-row{ grid-template-columns: 1fr; }
}
.ifp-cf-kv-label{
  font-weight: 600;
  color: var(--ifp-cf-muted, #516173);
}
.ifp-cf-kv-value{
  color: var(--ifp-cf-text, #17232f);
}

.ifp-cf-badges{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
}
.ifp-cf-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  border: 1px solid rgba(217,224,234,1);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.92rem;
  line-height: 1;
}

.ifp-cf-term-row{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 4px 0;
}
.ifp-cf-term-logo{
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(217,224,234,1);
  background: #fff;
  padding: 6px;
}
.ifp-cf-term-thumb{
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(217,224,234,1);
  background: #fff;
}
.ifp-cf-term-name{
  font-weight: 600;
}

/* Linked products section refinements */
.ifp-cf-linked-products{
  margin: 26px 0 10px;
  padding: 18px;
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 18px;
  background: var(--ifp-cf-bg, #fff);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}
.ifp-cf-linked-products h2{
  margin: 0 0 12px;
  font-size: 1.2rem;
}
.ifp-cf-linked-products__more{
  margin-top: 12px;
}


/* Finder cards: link + term badges */
.ifp-cf-frontend .ifp-cf-card-link {
  color: inherit;
  text-decoration: none;
}
.ifp-cf-frontend .ifp-cf-card-link:hover .ifp-cf-title,
.ifp-cf-frontend .ifp-cf-card-link:focus .ifp-cf-title {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.ifp-cf-frontend .ifp-cf-row-term {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 0;
}

.ifp-cf-frontend .ifp-cf-term-logo {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.ifp-cf-frontend .ifp-cf-term-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: #fff;
  font-size: 12px;
  line-height: 1.3;
  color: var(--ifp-cf-text);
}

.ifp-cf-frontend .ifp-cf-term-badge.is-muted {
  color: var(--ifp-cf-muted);
  background: rgba(238, 243, 248, 0.65);
}

.ifp-cf-frontend .ifp-cf-term-muted {
  color: var(--ifp-cf-muted);
  font-size: 12px;
}

/* === Robust grid enforcement (themes sometimes override UL/LIs) === */
.ifp-cf-frontend ul.ifp-cf-result-list.ifp-cf-result-list--grid{
  display: grid !important;
  width: 100% !important;
  max-width: 100% !important;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  justify-content: stretch !important;
  align-items: stretch !important;
}
@media (min-width: 980px){
  .ifp-cf-frontend ul.ifp-cf-result-list.ifp-cf-result-list--grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
.ifp-cf-frontend ul.ifp-cf-result-list.ifp-cf-result-list--grid > li{
  width: auto !important;
  max-width: none !important;
}
/* Ensure cards don't force full row */
.ifp-cf-frontend .ifp-cf-result{
  width: auto !important;
  max-width: 100% !important;
}



/* === Finder Listing Grid: compact responsive columns (restores multi-column layout) === */
.ifp-cf-frontend.ifp-cf-layout-grid ul.ifp-cf-result-list{
  display: grid !important; /* override legacy flex grid */
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) !important;
  gap: 12px !important;
  align-items: stretch !important;
}

/* Ensure cards can shrink to fit columns */
.ifp-cf-frontend.ifp-cf-layout-grid .ifp-cf-result{
  flex: initial !important;
  max-width: none !important;
  width: auto !important;
}

/* Prefer exactly 3 columns on larger screens when space allows */
@media (min-width: 980px){
  .ifp-cf-frontend.ifp-cf-layout-grid ul.ifp-cf-result-list{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Medium screens: 2 columns */
@media (min-width: 640px) and (max-width: 979px){
  .ifp-cf-frontend.ifp-cf-layout-grid ul.ifp-cf-result-list{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}



/* === Grid listing: allow cards to shrink so multiple columns fit === */
.ifp-cf-frontend ul.ifp-cf-result-list.ifp-cf-result-list--grid .ifp-cf-color-card{
  grid-template-columns: 1fr !important;
  min-width: 0 !important;
}
.ifp-cf-frontend ul.ifp-cf-result-list.ifp-cf-result-list--grid .ifp-cf-color-preview{
  min-height: 96px;
}

/* --- Finder output v0.1.148+: solid DIV grid (no UL/LI) --- */
.ifp-cf-frontend .ifp-cf-results-grid{
  display: grid !important;
  gap: 12px;
  width: 100%;
  align-items: stretch;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

@media (min-width: 980px){
  .ifp-cf-frontend .ifp-cf-results-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ifp-cf-frontend .ifp-cf-finder-card{
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 16px;
  background: var(--ifp-cf-bg, #fff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  display:flex;
  flex-direction:column;
  min-width: 0;
}

.ifp-cf-frontend .ifp-cf-finder-card__head{
  position: relative;
  height: 120px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: linear-gradient(180deg, rgba(248,251,255,1) 0%, rgba(243,247,252,1) 100%);
}

.ifp-cf-frontend .ifp-cf-finder-card__head .ifp-cf-finder-card__img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

.ifp-cf-frontend .ifp-cf-finder-card__body{
  padding: 12px 14px 14px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.ifp-cf-frontend .ifp-cf-finder-title{
  font-size: 15px;
  line-height: 1.2;
  margin: 0;
  font-weight: 700;
}

.ifp-cf-frontend .ifp-cf-finder-title a{
  text-decoration: none;
  color: inherit;
}

.ifp-cf-frontend .ifp-cf-finder-sub{
  display:flex;
  flex-wrap:wrap;
  gap: 8px;
  align-items:center;
}

.ifp-cf-frontend .ifp-cf-badge{
  display:inline-flex;
  gap:6px;
  align-items:center;
  border: 1px solid rgba(15,23,42,0.10);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.2;
  background: rgba(248,250,252,1);
}

.ifp-cf-frontend .ifp-cf-badge img{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  object-fit: cover;
  display:block;
}

.ifp-cf-frontend .ifp-cf-finder-meta{
  display:flex;
  flex-direction:column;
  gap: 8px;
}

.ifp-cf-frontend .ifp-cf-finder-row{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  align-items:center;
  font-size: 13px;
}

.ifp-cf-frontend .ifp-cf-finder-actions{
  margin-top: 2px;
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
}

.ifp-cf-frontend .ifp-cf-finder-actions .ifp-cf-copy{
  border-radius: 10px;
  padding: 7px 10px;
}



/* === 2026-03-06: Remember / Compare / configurable card links === */
.ifp-cf-frontend .ifp-cf-finder-card.is-clickable{cursor:pointer;}
.ifp-cf-frontend .ifp-cf-finder-card.is-clickable:hover{box-shadow:0 8px 24px rgba(0,0,0,.12);}
.ifp-cf-frontend .ifp-cf-finder-card__topline{display:flex;gap:8px;align-items:flex-start;justify-content:space-between;}
.ifp-cf-frontend .ifp-cf-finder-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px;}
.ifp-cf-frontend .ifp-cf-btn--tiny{font-size:12px;padding:6px 9px;border-radius:999px;}
.ifp-cf-frontend .ifp-cf-remember-toggle.is-active{background:#ecfdf5;border-color:rgba(16,185,129,.35);color:#065f46;}

.ifp-cf-frontend .ifp-cf-remember-bar{
  margin:0 0 16px;
  padding:14px;
  border:1px solid #dbe4f0;
  border-radius:14px;
  background:linear-gradient(180deg,#fbfdff 0%,#f6f9fc 100%);
}
.ifp-cf-frontend .ifp-cf-remember-bar__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.ifp-cf-frontend .ifp-cf-remember-bar__title{font-weight:700;color:var(--ifp-cf-text);}
.ifp-cf-frontend .ifp-cf-remember-bar__actions{display:flex;gap:8px;flex-wrap:wrap;}
.ifp-cf-frontend .ifp-cf-remember-items{display:flex;gap:8px;flex-wrap:wrap;}
.ifp-cf-frontend .ifp-cf-remember-empty{font-size:13px;color:var(--ifp-cf-muted);}
.ifp-cf-frontend .ifp-cf-remember-pill{
  display:inline-flex;align-items:center;gap:8px;padding:8px 10px;border-radius:999px;
  background:#fff;border:1px solid #dbe4f0;max-width:100%;
}
.ifp-cf-frontend .ifp-cf-remember-pill__swatch{
  width:16px;height:16px;border-radius:999px;border:1px solid rgba(0,0,0,.15);display:inline-block;flex:0 0 auto;
}
.ifp-cf-frontend .ifp-cf-remember-pill__swatch--empty{background:#f3f4f6;}
.ifp-cf-frontend .ifp-cf-remember-pill__label{font-size:12px;font-weight:600;}
.ifp-cf-frontend .ifp-cf-remember-pill__remove{
  appearance:none;border:0;background:transparent;color:var(--ifp-cf-accent);font-size:12px;font-weight:700;cursor:pointer;padding:0;
}

.ifp-cf-frontend .ifp-cf-compare-panel{
  margin-top:14px;padding-top:14px;border-top:1px solid #dbe4f0;
}
.ifp-cf-frontend .ifp-cf-compare-panel__head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:12px;
}
.ifp-cf-frontend .ifp-cf-compare-panel__title{margin:0;font-size:18px;}
.ifp-cf-frontend .ifp-cf-compare-grid{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;
}
.ifp-cf-frontend .ifp-cf-compare-card{
  background:#fff;border:1px solid #dbe4f0;border-radius:16px;padding:12px;display:flex;flex-direction:column;gap:10px;
}
.ifp-cf-frontend .ifp-cf-compare-card__preview{
  min-height:110px;border-radius:12px;background:#f8fafc;display:flex;align-items:center;justify-content:center;overflow:hidden;
}
.ifp-cf-frontend .ifp-cf-compare-card__preview img{display:block;width:100%;height:110px;object-fit:cover;}
.ifp-cf-frontend .ifp-cf-compare-card__swatch{
  width:100%;height:110px;border-radius:12px;border:1px solid rgba(0,0,0,.08);display:block;
}
.ifp-cf-frontend .ifp-cf-compare-card__swatch--empty{
  display:flex;align-items:center;justify-content:center;background:#f3f4f6;color:#6b7280;font-size:28px;
}
.ifp-cf-frontend .ifp-cf-compare-card__title{font-size:16px;font-weight:700;line-height:1.25;}
.ifp-cf-frontend .ifp-cf-compare-card__meta{display:grid;gap:6px;font-size:13px;color:var(--ifp-cf-text);}
.ifp-cf-frontend .ifp-cf-compare-card__actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;}

.ifp-cf-color-page .ifp-cf-color-actions{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px;}
.ifp-cf-color-page .ifp-cf-color-page__inner{display:block;}


/* Product swatches: search + visible label */
.ifp-cf-product-swatches__search-wrap{
  width: 100%;
  margin-top: 8px;
}
.ifp-cf-product-swatches__search{
  width: 100%;
  max-width: 360px;
  padding: 8px 10px;
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 10px;
  background: #fff;
  color: var(--ifp-cf-text, #17232f);
}
.ifp-cf-product-swatches__search:focus{
  border-color: rgba(29, 78, 216, 0.55);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
  outline: none;
}
.ifp-cf-product-swatch{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  min-width: 54px;
}
.ifp-cf-product-swatch__label{
  display: block;
  max-width: 74px;
  font-size: 10px;
  line-height: 1.2;
  color: var(--ifp-cf-muted, #516173);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.ifp-cf-product-swatches.ifp-cf-search-empty .ifp-cf-product-swatches__list::after,
.ifp-cf-product-swatches.ifp-cf-search-empty .ifp-cf-product-swatches__list--hidden::after{
  content: 'Keine passende Farbe gefunden.';
  display: block;
  width: 100%;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ifp-cf-muted, #516173);
}


/* Product swatches search toggle */
.ifp-cf-product-swatches__search-toggle{
  margin-top: 8px;
  align-self: flex-start;
  padding: 4px 10px;
  border: 1px solid var(--ifp-cf-border, #d9e0ea);
  border-radius: 999px;
  background: #fff;
  color: var(--ifp-cf-text, #17232f);
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
}
.ifp-cf-product-swatches__search-toggle[aria-expanded="true"]{
  background: #f5f8fc;
}
.ifp-cf-product-swatches__search-wrap[hidden]{
  display: none !important;
}


/* === Product Swatches UI Polish (v0.1.171) === */
.single-product .ifp-cf-product-swatches{
  --ifp-cf-swatch-tile-min: 72px;
  --ifp-cf-swatch-dot-size: clamp(24px, 2vw, 30px);
  margin: 16px 0 12px;
  padding: 14px 14px 12px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0.08) 100%);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  backdrop-filter: blur(2px);
}

.single-product .ifp-cf-product-swatches__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}

.single-product .ifp-cf-product-swatches__head-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.single-product .ifp-cf-product-swatches__eyebrow{
  font-size:11px;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.72;
}

.single-product .ifp-cf-product-swatches__label{
  margin:0;
  font-size:14px;
  line-height:1.35;
  font-weight:700;
}

.single-product .ifp-cf-product-swatches__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.single-product .ifp-cf-product-swatches__search-toggle,
.single-product .ifp-cf-product-swatches__toggle{
  appearance:none;
  border:1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.82);
  color: #5e2b25;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  line-height:1.2;
  font-weight:600;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.single-product .ifp-cf-product-swatches__search-toggle:hover,
.single-product .ifp-cf-product-swatches__toggle:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.10);
}

.single-product .ifp-cf-product-swatches__search-toggle[aria-expanded="true"],
.single-product .ifp-cf-product-swatches__toggle[aria-expanded="true"]{
  background: #fff;
}

.single-product .ifp-cf-product-swatches__search-wrap{
  margin: 0 0 12px;
}

.single-product .ifp-cf-product-swatches__search{
  width:100%;
  max-width: 320px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.92);
  color: #2b211f;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.single-product .ifp-cf-product-swatches__search:focus{
  outline:none;
  border-color: rgba(255,255,255,0.48);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}

.single-product .ifp-cf-product-swatches__selected{
  margin: 0 0 12px;
}

.single-product .ifp-cf-selected-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.single-product .ifp-cf-selected-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,0.24);
  border-radius:999px;
  background: rgba(255,255,255,0.18);
  color: inherit;
  cursor:pointer;
}

.single-product .ifp-cf-selected-pill__dot{
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ifp-cf-pill-color, #cbd5e1);
  border: 1px solid rgba(0,0,0,0.12);
}

.single-product .ifp-cf-selected-pill__text{
  font-size:12px;
  line-height:1.2;
}

.single-product .ifp-cf-selected-pill__x{
  font-size:14px;
  line-height:1;
  opacity:.8;
}

.single-product .ifp-cf-product-swatches__list{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--ifp-cf-swatch-tile-min), 1fr));
  gap:10px;
  max-width:none;
  margin:0;
}

.single-product .ifp-cf-product-swatch{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  min-height: 76px;
  width:100%;
  height:auto;
  padding:10px 8px 8px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.10);
  text-decoration:none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.single-product .ifp-cf-product-swatch:hover,
.single-product .ifp-cf-product-swatch:focus{
  outline:none;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.28);
  box-shadow: 0 10px 18px rgba(0,0,0,0.10);
}

.single-product .ifp-cf-product-swatch__dot{
  width: var(--ifp-cf-swatch-dot-size);
  height: var(--ifp-cf-swatch-dot-size);
  min-width: var(--ifp-cf-swatch-dot-size);
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.82);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.single-product .ifp-cf-product-swatch__label{
  display:block;
  max-width:100%;
  font-size:11px;
  line-height:1.2;
  text-align:center;
  white-space:normal;
  word-break:break-word;
  opacity:.95;
}

.single-product .ifp-cf-product-swatch.is-selected{
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.42);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.16), 0 10px 20px rgba(0,0,0,0.12);
}

.single-product .ifp-cf-product-swatch.is-selected::after{
  content:"✓";
  position:absolute;
  top:7px;
  right:7px;
  width:18px;
  height:18px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  background:#ffffff;
  color:#1f2937;
  box-shadow:0 2px 6px rgba(0,0,0,0.12);
}

.single-product .ifp-cf-product-swatches__notice{
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(127, 29, 29, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.24);
  font-size: 12px;
}

.single-product .ifp-cf-search-empty .ifp-cf-product-swatches__list::after{
  content: "Keine passende Farbe gefunden.";
  grid-column: 1 / -1;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.16);
  font-size: 12px;
  text-align: center;
  opacity: .9;
}

@media (max-width: 767px){
  .single-product .ifp-cf-product-swatches__head{
    flex-direction:column;
    align-items:stretch;
  }

  .single-product .ifp-cf-product-swatches__actions{
    justify-content:flex-start;
  }

  .single-product .ifp-cf-product-swatches__search{
    max-width:none;
  }

  .single-product .ifp-cf-product-swatches__list{
    grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  }

  .single-product .ifp-cf-product-swatch{
    min-height:72px;
  }
}


/* === Product Swatches UI Refresh (v0.1.173) === */
.single-product .ifp-cf-product-swatches{
  --ifp-cf-swatch-tile-min: 78px;
  --ifp-cf-swatch-dot-size: 28px;
  --ifp-cf-swatch-panel-height: min(360px, 52vh);
  margin: 16px 0 12px;
  padding: 14px;
  border: 1px solid rgba(15,23,42,0.12);
  border-radius: var(--ifp-cf-box-radius, 12px);
  background: var(--ifp-cf-box-bg, rgba(255,255,255,0.08));
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  backdrop-filter: none;
}

.single-product .ifp-cf-product-swatches__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
}

.single-product .ifp-cf-product-swatches__head-main{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.single-product .ifp-cf-product-swatches__eyebrow{
  font-size:11px;
  line-height:1.2;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.72;
}

.single-product .ifp-cf-product-swatches__label{
  margin:0;
  font-size:14px;
  line-height:1.3;
  font-weight:700;
  color: var(--ifp-cf-label-color, inherit);
}

.single-product .ifp-cf-product-swatches__hint{
  font-size:11px;
  line-height:1.35;
  opacity:.72;
}

.single-product .ifp-cf-product-swatches__actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:8px;
}

.single-product .ifp-cf-product-swatches__search-toggle,
.single-product .ifp-cf-product-swatches__toggle{
  appearance:none;
  border:1px solid rgba(15,23,42,0.16);
  background: rgba(255,255,255,0.9);
  color: inherit;
  border-radius:999px;
  padding:7px 12px;
  font-size:12px;
  line-height:1.2;
  font-weight:600;
  cursor:pointer;
  transition: box-shadow .15s ease, transform .15s ease, background .15s ease;
}

.single-product .ifp-cf-product-swatches__search-toggle:hover,
.single-product .ifp-cf-product-swatches__toggle:hover{
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.single-product .ifp-cf-product-swatches__search-wrap{
  margin: 0 0 12px;
}

.single-product .ifp-cf-product-swatches__search{
  width:100%;
  max-width:360px;
  min-height:38px;
  padding:8px 12px;
  border:1px solid rgba(15,23,42,0.16);
  border-radius:10px;
  background:#fff;
  color:inherit;
}

.single-product .ifp-cf-product-swatches__search-wrap[hidden]{
  display:none !important;
}

.single-product .ifp-cf-product-swatches__selected{
  margin: 0 0 12px;
}

.single-product .ifp-cf-selected-pills{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.single-product .ifp-cf-selected-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border:1px solid rgba(15,23,42,0.14);
  border-radius:999px;
  background: rgba(255,255,255,0.85);
  color: inherit;
  cursor:pointer;
}

.single-product .ifp-cf-selected-pill__dot{
  width:12px;
  height:12px;
  border-radius:999px;
  background: var(--ifp-cf-pill-color, #cbd5e1);
  border:1px solid rgba(15,23,42,0.18);
}

.single-product .ifp-cf-product-swatches__list{
  display:grid !important;
  grid-template-columns: repeat(auto-fill, minmax(var(--ifp-cf-swatch-tile-min), 1fr));
  gap:10px !important;
  margin:0 !important;
  max-width:none;
}

.single-product .ifp-cf-product-swatches__list--preview{
  margin-bottom: 0;
}

.single-product .ifp-cf-product-swatches__expand{
  margin-top:10px;
}

.single-product .ifp-cf-product-swatches__expand[hidden]{
  display:none !important;
}

.single-product .ifp-cf-product-swatches__expand-inner{
  max-height: var(--ifp-cf-swatch-panel-height);
  overflow:auto;
  padding: 2px 2px 2px 0;
  border-top:1px solid rgba(15,23,42,0.10);
  scrollbar-width: thin;
}

.single-product .ifp-cf-product-swatch{
  position:relative;
  display:flex !important;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:7px;
  width:100%;
  min-width:0;
  min-height:76px;
  height:auto;
  padding:10px 8px 8px;
  margin:0 !important;
  border:1px solid rgba(15,23,42,0.12);
  border-radius:12px;
  background: rgba(255,255,255,0.78);
  text-decoration:none;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease;
}

.single-product .ifp-cf-product-swatch:hover,
.single-product .ifp-cf-product-swatch:focus{
  outline:none;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.96);
  border-color: rgba(15,23,42,0.22);
  box-shadow: 0 8px 18px rgba(0,0,0,0.08);
}

.single-product .ifp-cf-product-swatch__dot{
  display:block;
  width: var(--ifp-cf-swatch-dot-size);
  height: var(--ifp-cf-swatch-dot-size);
  min-width: var(--ifp-cf-swatch-dot-size);
  min-height: var(--ifp-cf-swatch-dot-size);
  border-radius:999px;
  border:2px solid rgba(255,255,255,0.95);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.18), 0 2px 8px rgba(0,0,0,0.10);
  background: #cbd5e1;
}

.single-product .ifp-cf-product-swatch__label{
  display:block;
  width:100%;
  max-width:100%;
  font-size:11px;
  line-height:1.25;
  text-align:center;
  color: inherit;
  white-space:normal;
  word-break:break-word;
  opacity:.92;
}

.single-product .ifp-cf-product-swatch.is-selected{
  background: rgba(255,255,255,1);
  border-color: rgba(29,78,216,0.42);
  box-shadow: 0 0 0 2px rgba(29,78,216,0.12), 0 10px 20px rgba(0,0,0,0.10);
}

.single-product .ifp-cf-product-swatch.is-selected::after{
  content:"✓";
  position:absolute;
  top:7px;
  right:7px;
  width:18px;
  height:18px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:11px;
  font-weight:700;
  background:#fff;
  color:#1f2937;
  box-shadow:0 2px 6px rgba(0,0,0,0.12);
}

.single-product .ifp-cf-product-swatches.ifp-cf-hide-selected .ifp-cf-product-swatch.is-selected{
  display:none !important;
}

.single-product .ifp-cf-product-swatches__notice{
  margin:0 0 10px;
  padding:8px 10px;
  border-radius:10px;
  background: rgba(127,29,29,0.08);
  border: 1px solid rgba(248,113,113,0.18);
  font-size:12px;
}

.single-product .ifp-cf-search-empty .ifp-cf-product-swatches__list--all::after,
.single-product .ifp-cf-search-empty .ifp-cf-product-swatches__list--preview::after{
  content:"Keine passende Farbe gefunden.";
  grid-column:1 / -1;
  padding:10px 12px;
  border-radius:10px;
  background: rgba(255,255,255,0.72);
  font-size:12px;
  text-align:center;
}

@media (max-width: 767px){
  .single-product .ifp-cf-product-swatches__head{
    flex-direction:column;
    align-items:stretch;
  }

  .single-product .ifp-cf-product-swatches__actions{
    justify-content:flex-start;
  }

  .single-product .ifp-cf-product-swatches__search{
    max-width:none;
  }

  .single-product .ifp-cf-product-swatches__list{
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  }
}


/* === Product Swatches Size Respect Fix (v0.1.173) === */
.single-product .ifp-cf-product-swatches{
  --ifp-cf-swatch-dot-size: var(--ifp-cf-swatch-size, 40px);
  --ifp-cf-swatch-tile-min: max(calc(var(--ifp-cf-swatch-size, 40px) + 24px), 78px);
}

.single-product .ifp-cf-product-swatches__list{
  grid-template-columns: repeat(auto-fill, minmax(var(--ifp-cf-swatch-tile-min), 1fr)) !important;
}

.single-product .ifp-cf-product-swatch{
  min-height: calc(var(--ifp-cf-swatch-dot-size) + 34px);
  padding: 10px 8px 8px;
}

.single-product .ifp-cf-product-swatch__dot{
  width: var(--ifp-cf-swatch-dot-size) !important;
  height: var(--ifp-cf-swatch-dot-size) !important;
  min-width: var(--ifp-cf-swatch-dot-size) !important;
  min-height: var(--ifp-cf-swatch-dot-size) !important;
  border: 2px solid rgba(255,255,255,0.92);
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.28), 0 2px 6px rgba(0,0,0,0.12);
}

.single-product .ifp-cf-product-swatch__label{
  font-size: 10px;
}

@media (max-width: 767px){
  .single-product .ifp-cf-product-swatches{
    --ifp-cf-swatch-tile-min: max(calc(var(--ifp-cf-swatch-size, 40px) + 20px), 68px);
  }
}



/* === Product Swatches Name-Below-Dot Fix (v0.1.174) === */
.single-product .ifp-cf-product-swatches{
  --ifp-cf-swatch-name-height: 2.8em;
}

.single-product .ifp-cf-product-swatches__list{
  align-items: start;
}

.single-product .ifp-cf-product-swatch{
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: calc(var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) + var(--ifp-cf-swatch-name-height)) !important;
  padding: 10px 6px 8px !important;
  border-radius: 14px !important;
}

.single-product .ifp-cf-product-swatch__dot{
  display: block !important;
  flex: 0 0 auto !important;
  margin: 0 auto !important;
}

.single-product .ifp-cf-product-swatch__label{
  display: block !important;
  order: 2 !important;
  width: 100% !important;
  max-width: none !important;
  min-height: var(--ifp-cf-swatch-name-height) !important;
  margin: 0 !important;
  padding-top: 2px !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
}

.single-product .ifp-cf-product-swatch__sr{
  order: 3 !important;
}

@media (max-width: 767px){
  .single-product .ifp-cf-product-swatches{
    --ifp-cf-swatch-name-height: 2.6em;
  }
}


/* === Product Swatches Dot-Only Click + Name Below (v0.1.175) === */
.single-product .ifp-cf-product-swatches__list{
  align-items: start;
}

.single-product .ifp-cf-product-swatch-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:6px;
  width:100%;
  min-width:0;
  min-height: calc(var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) + var(--ifp-cf-swatch-name-height, 2.8em));
  padding: 8px 4px 6px;
  border-radius: 12px;
  box-sizing: border-box;
}

.single-product .ifp-cf-product-swatch{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  width: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  height: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  min-width: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  min-height: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  box-shadow: none !important;
}

.single-product .ifp-cf-product-swatch:hover,
.single-product .ifp-cf-product-swatch:focus{
  transform: none !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.single-product .ifp-cf-product-swatch:focus-visible .ifp-cf-product-swatch__dot{
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.28), 0 0 0 3px rgba(29,78,216,0.22), 0 2px 6px rgba(0,0,0,0.12) !important;
}

.single-product .ifp-cf-product-swatch__dot{
  display:block !important;
  width: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  height: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  min-width: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  min-height: var(--ifp-cf-swatch-dot-size, var(--ifp-cf-swatch-size, 40px)) !important;
  margin: 0 auto !important;
}

.single-product .ifp-cf-product-swatch__label{
  display:block !important;
  width:100% !important;
  min-height: var(--ifp-cf-swatch-name-height, 2.8em) !important;
  margin: 0 !important;
  font-size: 11px !important;
  line-height: 1.2 !important;
  text-align:center !important;
  white-space:normal !important;
  word-break:break-word !important;
  overflow-wrap:anywhere !important;
  pointer-events:none !important;
}

.single-product .ifp-cf-product-swatch-item.is-selected .ifp-cf-product-swatch__dot{
  box-shadow: inset 0 0 0 1px rgba(15,23,42,0.28), 0 0 0 3px rgba(29,78,216,0.18), 0 2px 8px rgba(0,0,0,0.12) !important;
}

.single-product .ifp-cf-product-swatch-item.is-selected .ifp-cf-product-swatch__label{
  font-weight: 600;
}

.single-product .ifp-cf-product-swatch.is-selected::after{
  display:none !important;
}


/* === Product Swatches Hide Selected Grid Label (v0.1.176) === */
.single-product .ifp-cf-product-swatch-item.is-selected .ifp-cf-product-swatch__label{
  display:none !important;
}


/* Finder toolbar additions: sort + per-page */
.ifp-cf-frontend .ifp-cf-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.ifp-cf-frontend .ifp-cf-summary-count {
  font-size: 13px;
  color: var(--ifp-cf-muted);
}

/* Detail modal in frontend listing */
.ifp-cf-modal-open {
  overflow: hidden;
}
.ifp-cf-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}
.ifp-cf-detail-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}
.ifp-cf-detail-modal__dialog {
  position: relative;
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.28);
  padding: 22px;
}
.ifp-cf-detail-modal__close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
.ifp-cf-detail-modal__grid {
  display: grid;
  grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}
@media (max-width: 720px) {
  .ifp-cf-detail-modal__grid {
    grid-template-columns: 1fr;
  }
}
.ifp-cf-detail-modal__media {
  min-height: 260px;
  border-radius: 16px;
  background: #f3f4f6;
  overflow: hidden;
  border: 1px solid rgba(15,23,42,.08);
}
.ifp-cf-detail-modal__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ifp-cf-detail-modal__media--swatch {
  min-height: 220px;
}
.ifp-cf-detail-modal__top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
}
.ifp-cf-detail-modal__logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex: 0 0 auto;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.08);
  background: #fff;
  padding: 6px;
}
.ifp-cf-detail-modal__title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  color: #111827;
}
.ifp-cf-detail-modal__meta {
  display: grid;
  gap: 8px;
}
.ifp-cf-detail-modal__meta-row {
  display: flex;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: #1f2937;
}
.ifp-cf-detail-modal__meta-row strong {
  min-width: 96px;
}
.ifp-cf-detail-modal__desc {
  margin-top: 14px;
  color: #374151;
  font-size: 14px;
  line-height: 1.6;
}
.ifp-cf-detail-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

/* Woo product swatches: labels configurable below the dots */
.ifp-cf-frontend .ifp-cf-product-swatches {
  --ifp-cf-item-label-size: 11px;
}
.ifp-cf-frontend .ifp-cf-product-swatch-item {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-width: calc(var(--ifp-cf-swatch-size) + 14px);
}
.ifp-cf-frontend .ifp-cf-product-swatch__label {
  display: block;
  max-width: 72px;
  text-align: center;
  font-size: var(--ifp-cf-item-label-size);
  line-height: 1.2;
  color: var(--ifp-cf-label-color, #374151);
  white-space: normal;
  word-break: break-word;
}
.ifp-cf-frontend .ifp-cf-product-swatches[data-show-item-labels="0"] .ifp-cf-product-swatch__label {
  display: none;
}
.ifp-cf-frontend .ifp-cf-product-swatch__dot {
  width: var(--ifp-cf-swatch-size);
  height: var(--ifp-cf-swatch-size);
}


/* === v0.1.186: Single swatches expand readability + preview hide === */
.single-product .ifp-cf-is-expanded .ifp-cf-product-swatches__list--preview,
.single-product .ifp-cf-product-swatches__list--preview[hidden]{
  display:none !important;
}

.single-product .ifp-cf-product-swatches__toggle{
  min-width: 134px;
  white-space: nowrap;
  color: var(--ifp-cf-text, #17232f);
}

.single-product .ifp-cf-product-swatches__toggle[aria-expanded="true"]{
  background: rgba(255,255,255,0.98);
  color: var(--ifp-cf-text, #17232f);
  border-color: rgba(15,23,42,0.24);
}


/* === v0.1.187: Expanded single swatches sorting === */
.single-product .ifp-cf-product-swatches__expand-toolbar{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  margin: 2px 0 8px;
}

.single-product .ifp-cf-product-swatches__sort-label{
  font-size:12px;
  line-height:1.2;
  color: var(--ifp-cf-muted, #516173);
}


.single-product .ifp-cf-product-swatches__group-label{
  font-size:12px;
  line-height:1.2;
  color: var(--ifp-cf-muted, #516173);
}

.single-product .ifp-cf-product-swatches__group{
  appearance:none;
  min-height:34px;
  padding: 6px 30px 6px 10px;
  border:1px solid rgba(15,23,42,0.16);
  border-radius:10px;
  background:#fff;
  color: var(--ifp-cf-text, #17232f);
  font-size:12px;
  line-height:1.2;
  max-width: 220px;
}

.single-product .ifp-cf-product-swatches__sort{
  appearance:none;
  min-height:34px;
  padding: 6px 30px 6px 10px;
  border:1px solid rgba(15,23,42,0.16);
  border-radius:10px;
  background:#fff;
  color: var(--ifp-cf-text, #17232f);
  font-size:12px;
  line-height:1.2;
  max-width: 220px;
}

@media (max-width: 767px){
  .single-product .ifp-cf-product-swatches__expand-toolbar{
    justify-content:flex-start;
    flex-wrap:wrap;
  }

  .single-product .ifp-cf-product-swatches__group,
  .single-product .ifp-cf-product-swatches__sort{
    width:100%;
    max-width:none;
  }
}


/* Robust group filter: ensure theme CSS cannot override hiding */
.ifp-cf-product-swatches .ifp-cf-product-swatch-item.ifp-cf-swatch-hidden-by-group{
  display: none !important;
}


.ifp-cf-detail-modal__products {
  margin-top: 18px;
}
.ifp-cf-detail-modal__products-title {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.3;
  color: #111827;
}
.ifp-cf-detail-modal__products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.ifp-cf-detail-modal__product-card {
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.ifp-cf-detail-modal__product-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: #f3f4f6;
}
.ifp-cf-detail-modal__product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ifp-cf-detail-modal__product-image--placeholder {
  background: linear-gradient(180deg, #f9fafb 0%, #eef2f7 100%);
}
.ifp-cf-detail-modal__product-body {
  padding: 10px 12px 12px;
}
.ifp-cf-detail-modal__product-link {
  color: #111827;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}
.ifp-cf-detail-modal__product-link:hover {
  text-decoration: underline;
}


.ifp-cf-detail-modal__products-grid {
  max-height: min(52vh, 560px);
  overflow: auto;
  padding-right: 4px;
  align-content: start;
}
.ifp-cf-detail-modal__product-price {
  margin-top: 6px;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
}
.ifp-cf-detail-modal__product-price .amount {
  font-weight: 700;
  color: #111827;
}

.ifp-cf-detail-modal__logo-wrap{display:inline-flex;align-items:center;justify-content:center;}
.ifp-cf-detail-modal__logo-wrap img{display:block;max-width:100%;max-height:100%;}
