.ycpf-finder {
  --ycpf-radius: 18px;
  --ycpf-border: #e7eaf0;
  --ycpf-soft: #f7f8fb;
  --ycpf-text: #1f2937;
  --ycpf-muted: #667085;
  --ycpf-accent: #e11d48;
  background: #fff;
  border: 1px solid var(--ycpf-border);
  border-radius: var(--ycpf-radius);
  padding: 22px;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
  color: var(--ycpf-text);
}

.ycpf-header {
  margin-bottom: 18px;
  border-bottom: 1px solid var(--ycpf-border);
  padding-bottom: 14px;
}

.ycpf-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
}

.ycpf-description {
  margin: 0;
  color: var(--ycpf-muted);
  font-size: 14px;
  line-height: 1.8;
}

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

.ycpf-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ycpf-field span {
  font-size: 13px;
  font-weight: 800;
  color: var(--ycpf-text);
}

.ycpf-field select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--ycpf-border);
  border-radius: 14px;
  background: var(--ycpf-soft);
  color: var(--ycpf-text);
  font-size: 14px;
  padding: 0 12px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}



.ycpf-finder,
.ycpf-field,
.ycpf-field label,
.ycpf-field span,
.ycpf-field select,
.ycpf-field option,
.ycpf-field optgroup {
  direction: rtl;
  text-align: right;
}

.ycpf-code-list,
.ycpf-product-part-number strong,
.ycpf-debug-values {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  display: inline-block;
}

.ycpf-product-part-number {
  direction: rtl;
  text-align: right;
}

.ycpf-field select:focus {
  border-color: rgba(225, 29, 72, 0.5);
  box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.08);
  background: #fff;
}

.ycpf-is-disabled {
  opacity: .55;
}

.ycpf-is-disabled select {
  cursor: not-allowed;
}

.ycpf-status {
  margin-top: 14px;
  min-height: 22px;
  font-size: 13px;
  font-weight: 700;
}

.ycpf-status-loading { color: #6b7280; }
.ycpf-status-error { color: #b91c1c; }
.ycpf-status-success { color: #047857; }

.ycpf-results {
  margin-top: 14px;
}

.ycpf-alert {
  border-radius: 14px;
  padding: 13px 14px;
  font-weight: 700;
  line-height: 1.7;
}

.ycpf-alert-warning {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid #fed7aa;
}

.ycpf-alert-empty {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.ycpf-result-count {
  margin: 0 0 12px;
  color: #047857;
  font-weight: 800;
}

.ycpf-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.ycpf-product-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ycpf-border);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
  transition: transform .2s ease, box-shadow .2s ease;
}

.ycpf-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
}

.ycpf-product-image {
  display: block;
  background: #f8fafc;
  aspect-ratio: 1 / 0.78;
  overflow: hidden;
}

.ycpf-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.ycpf-product-body {
  padding: 13px;
}

.ycpf-product-title {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
}

.ycpf-product-title a {
  color: var(--ycpf-text);
  text-decoration: none;
}

.ycpf-product-part-number,
.ycpf-product-price {
  color: var(--ycpf-muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.ycpf-product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--ycpf-accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 800;
  font-size: 12px;
}

.ycpf-show-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.ycpf-show-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ycpf-text);
  color: #fff !important;
  text-decoration: none;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.ycpf-show-more:hover {
  transform: translateY(-1px);
}

@media (max-width: 800px) {
  .ycpf-fields {
    grid-template-columns: 1fr;
  }

  .ycpf-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .ycpf-product-body {
    padding: 10px;
  }

  .ycpf-product-title {
    font-size: 12px;
    line-height: 1.55;
  }

  .ycpf-product-part-number,
  .ycpf-product-price {
    font-size: 11px;
  }
}

.ycpf-debug-numbers {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed #f59e0b;
  background: #fffbeb;
  color: #78350f;
  font-size: 12px;
  line-height: 1.8;
}

.ycpf-debug-values {
  margin: 6px 0 10px;
  direction: ltr;
  text-align: left;
  word-break: break-word;
  font-family: monospace;
}
