.clps-page {
  --sale-orange: #fd5c05;
  --sale-ink: #182230;
  --sale-muted: #536075;
  --sale-border: #dfe5ed;
  --sale-field: #f7f9fb;
  --sale-tint: #fff3ec;
  --ceplink-focus-ring: #fd5c0545;
  --ceplink-focus-border: var(--sale-orange);
  width: 100%;
  min-width: 0;
  color: var(--sale-ink);
}

.clps-page :where(*, *::before, *::after) { box-sizing: border-box; }
.clps-page :where(h1, h2, h3, p) { margin: 0; }

.clps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.clps-header h1 { font-size: 24px; line-height: 1.2; letter-spacing: -.025em; }
.clps-page h2 { font-size: 16px; line-height: 1.35; }

.clps-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(245px, 30%);
  align-items: start;
  gap: 16px;
}

.clps-fields { display: grid; gap: 14px; min-width: 0; }

.clps-card {
  background: #fff;
  border: 1px solid var(--sale-border);
  border-radius: 16px;
  box-shadow: 0 2px 6px #18223008;
  min-width: 0;
  padding: clamp(14px, 1.35vw, 20px);
}

.clps-section { display: grid; gap: 14px; }
.clps-section > h2 { display: flex; align-items: center; gap: 9px; }

.clps-section-icon {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--sale-orange);
  background: var(--sale-tint);
  border-radius: 9px;
}

.clps-two, .clps-shipping { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.clps-two > *, .clps-shipping > * { min-width: 0; }

.clps-page button { font: inherit; cursor: pointer; }
.clps-page button:focus-visible, .clps-manual summary:focus-visible {
  outline: 2px solid var(--sale-orange);
  outline-offset: 3px;
}

.clps-page .clps-source, .clps-page .clps-secondary, .clps-page .clps-publish {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  min-height: 42px;
  border: 1px solid var(--sale-border);
  border-radius: 10px;
  background: #fff;
  color: var(--sale-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.clps-page .clps-source { min-height: 50px; text-align: left; }
.clps-source > :first-child, .clps-secondary > :first-child { flex: none; color: var(--sale-orange); }
.clps-page .clps-source:hover, .clps-page .clps-secondary:hover { border-color: var(--sale-orange); }

.clps-page .clps-source[aria-pressed="true"] {
  background: var(--sale-tint);
  border-color: var(--sale-orange);
}

.clps-source-check { display: flex; margin-left: auto; flex: none; color: var(--sale-orange); }
.clps-picker { min-width: 0; }

.clps-field {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.clps-field > :is(input, select, textarea), .clps-money {
  width: 100%;
  min-height: 45px;
  min-width: 0;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  background: var(--sale-field);
  color: var(--sale-ink);
  padding: 9px 11px;
  font: inherit;
  font-weight: 500;
}

.clps-field > select { padding-right: 23px; }
.clps-field > input[readonly] { color: var(--sale-muted); }
.clps-field > textarea { resize: vertical; }
.clps-field small, .clps-status, .clps-upload > span { font-size: 12px; color: var(--sale-muted); font-weight: 500; }
.clps-money { display: block; padding: 0; }
.clps-money:focus-within { border-color: var(--sale-orange); }

.clps-barcode :is(input, [role="textbox"]), .clps-manual :is(input, [role="textbox"]) { width: 100%; }
.clps-barcode div:has(> input[aria-label="EAN / Barkod"]) {
  background: var(--sale-field);
  border-color: #d7dee8;
}
.clps-barcode div:has(> input[aria-label="EAN / Barkod"]):focus-within { border-color: var(--sale-orange); }
.clps-page .clps-picker input { min-width: 0; }

.clps-manual {
  margin-top: 10px;
  border: 1px solid var(--sale-border);
  border-radius: 10px;
  padding: 0 12px;
  min-width: 0;
}

.clps-manual > summary { cursor: pointer; padding: 11px 0; font-size: 13px; font-weight: 650; }
.clps-manual > summary::marker { color: var(--sale-orange); }
.clps-manual[open] { padding-bottom: 12px; }

.clps-selected-product, .clps-buybox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 11px;
  background: var(--sale-tint);
  color: var(--sale-ink);
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.clps-selected-product > :first-child, .clps-buybox > :first-child { flex: none; color: var(--sale-orange); }
.clps-picker > .clps-selected-product { margin-top: 8px; }
.clps-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.clps-existing-fields { align-items: end; }

.clps-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  align-self: end;
  border: 1px solid #d7dee8;
  border-radius: 9px;
  background: var(--sale-field);
  padding: 8px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
}

.clps-toggle:has(:checked) { border-color: var(--sale-orange); background: var(--sale-tint); }
.clps-toggle input { accent-color: var(--sale-orange); margin: 0; width: 16px; height: 16px; flex: none; }

.clps-preview { position: sticky; top: 12px; display: grid; gap: 13px; }

.clps-preview-image {
  display: grid;
  place-items: center;
  height: clamp(124px, 14vw, 198px);
  padding: 12px;
  border: 1px solid var(--sale-border);
  border-radius: 11px;
  background: var(--sale-field);
}

.clps-preview-image img { max-width: 100%; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.clps-image-placeholder { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: 12px; color: var(--sale-muted); }
.clps-image-placeholder > :first-child { color: var(--sale-orange); }
.clps-preview-details { display: grid; justify-items: start; gap: 7px; min-width: 0; }
.clps-preview-details > h3 { font-size: 17px; letter-spacing: -.015em; line-height: 1.3; overflow-wrap: anywhere; }
.clps-type { padding: 3px 7px; border-radius: 5px; background: var(--sale-tint); color: #893301; font-size: 12px; font-weight: 700; }
.clps-price { font-size: 22px; font-weight: 800; letter-spacing: -.03em; overflow-wrap: anywhere; }
.clps-preview-meta { display: grid; gap: 6px; font-size: 12px; color: var(--sale-muted); }
.clps-preview-meta > span { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.clps-preview-meta > span > :first-child { color: var(--sale-orange); }

.clps-page .clps-publish {
  justify-content: center;
  min-height: 45px;
  background: var(--sale-orange);
  border-color: var(--sale-orange);
  color: #17100b;
}

.clps-page .clps-publish:where(:hover, :focus-visible):not(:disabled) { box-shadow: 0 2px 10px #fd5c0545; }
.clps-page .clps-publish:disabled { cursor: default; background: var(--sale-tint); border-color: #f4c2a6; color: #733915; }
.clps-status { margin-top: -5px; text-align: center; line-height: 1.35; }
.clps-error { color: #a8281c; font-size: 12px; line-height: 1.4; }

@media (min-width: 1280px) {
  .clps-shipping { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
