/* Compact Catalogue workflow; operational POS styling is preserved. */
.cat {
  --ink: #0c2d4f;
  --muted: #183c59;
  --line: #d6e3ec;
  --paper: #fff;
  --blue: #0c2d4f;
  max-width: 1040px;
  margin: auto;
  color: var(--ink);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  padding: 8px 0 40px;
}
.cat * {
  box-sizing: border-box;
}
.cat [hidden] {
  display: none !important;
}
.cat-heading {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 4px 0 16px;
}
.cat h1 {
  font-size: clamp(27px, 4vw, 36px);
  letter-spacing: -0.6px;
  line-height: 1.15;
  margin: 0 0 5px;
}
.cat h2 {
  font-size: 20px;
  line-height: 1.25;
  margin: 0 0 6px;
  scroll-margin-top: 20px;
}
.cat h3 {
  font-size: 15px;
  margin: 0 0 4px;
}
.cat p {
  line-height: 1.5;
}
.cat-pill {
  white-space: nowrap;
  background: #e7f1f8;
  border: 1px solid #d6e3ec;
  color: #0b426d;
  border-radius: 30px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  display: inline-block;
}
.cat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin: 0 0 14px;
  box-shadow: 0 6px 22px #0c2d4f0a;
}
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
  margin: 18px 0;
}
.cat-grid-one {
  grid-template-columns: 1fr;
  margin-bottom: 0;
}
.cat-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}
.cat-field input,
.cat-field select,
.cat-field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid #a9bfd0;
  border-radius: 8px;
  background: white;
  color: #0c2d4f;
  padding: 11px 12px;
  font:
    400 16px/1.4 Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  box-shadow: none;
}
.cat-field textarea {
  resize: vertical;
}
.cat input:focus-visible,
.cat select:focus-visible,
.cat textarea:focus-visible,
.cat button:focus-visible,
.cat a:focus-visible,
.cat summary:focus-visible {
  outline: 3px solid #008ce2;
  outline-offset: 2px;
}
.cat input[readonly],
.cat-readonly {
  background: #eef4f8;
  color: var(--muted);
}
.cat-readonly {
  min-height: 46px;
  padding: 14px 12px;
  border-radius: 8px;
  font-weight: 400;
}
.cat-wide {
  grid-column: 1/-1;
}
.cat-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
  padding: 12px 0;
  font-size: 14px;
}
.cat-check input {
  flex-shrink: 0;
  width: 21px;
  height: 21px;
  accent-color: var(--blue);
  margin: 0;
}
.cat-check small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.cat-category,
.cat-spec-block {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 15px;
  margin: 0;
}
.cat-category legend,
.cat-spec-block legend {
  padding: 0 6px;
  font-size: 14px;
  font-weight: 750;
}
.cat-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.cat-choice-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #a9bfd0;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
  font-weight: 650;
}
.cat-choice-row input {
  width: 19px;
  height: 19px;
  accent-color: var(--blue);
}
.cat-category > .cat-field,
.cat-category > div > .cat-field {
  max-width: 520px;
}
.cat-specifications {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}
.cat-specifications > .cat-grid {
  margin-bottom: 8px;
}
.cat-custom-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 8px;
}
.cat-button,
.cat-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 8px;
  font:
    700 13px/1.4 Inter,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.cat-button {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
}
.cat-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #a9bfd0;
}
.cat button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.cat-footer {
  position: sticky;
  bottom: 0;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  background: #f3f5f7f2;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
}
.cat-footer > span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}
.cat-footer .cat-button {
  min-width: 180px;
}
.cat-error {
  border: 1px solid #e1b9a8;
  background: #fff3eb;
  padding: 14px;
  border-radius: 8px;
  color: #7c3424;
  margin: 12px 0;
  line-height: 1.5;
}
.cat-custom {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  background: #eef4f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 10px 0;
}
.cat-remove {
  min-width: 0;
}
.cat-photo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.cat-photo-actions label {
  position: relative;
  overflow: hidden;
}
.cat-photo-actions .cat-photo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 10px;
  cursor: pointer;
}
.cat-photo-action svg {
  display: block;
  width: 26px;
  height: 26px;
  pointer-events: none;
}
.cat-photo-action-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.cat-photo-actions .cat-photo-action:focus-within {
  outline: 3px solid #287bb6;
  outline-offset: 3px;
}
.cat-photo-actions input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  cursor: pointer;
}
.cat-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.cat-ai {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}
.cat-ai > .cat-button {
  width: auto;
  min-width: 220px;
  max-width: 100%;
}
.cat-ai > p {
  font-size: 13px;
  color: var(--muted);
  margin: 9px 0;
}
.cat-ai-result {
  background: #e7f1f8;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.cat-ai-result p {
  margin: 7px 0;
}
.cat-ai-result ul {
  padding-left: 20px;
}
.cat-ai-result small {
  color: var(--muted);
}
.cat-photo {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: white;
}
.cat-photo-image {
  position: relative;
  aspect-ratio: 4/3;
  background: #eef4f8;
}
.cat-photo-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.cat-photo-remove {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 42px;
  height: 42px;
  border: 1px solid #fff9;
  border-radius: 999px;
  background: #0c2d4fe6;
  color: #fff;
  font:
    500 26px/1 Arial,
    sans-serif;
  display: grid;
  place-items: center;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px #0c2d4f40;
}
.cat-photo-body {
  padding: 14px;
  display: grid;
  gap: 11px;
}
.cat-photo-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.cat-photo-body > [data-primary],
.cat-photo-tools button {
  background: #eef4f8;
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 42px;
  padding: 8px;
  font: inherit;
  font-size: 11px;
  color: var(--ink);
  cursor: pointer;
}
.cat-optional {
  padding: 0;
  overflow: hidden;
}
.cat-optional > summary {
  cursor: pointer;
  min-height: 58px;
  padding: 17px 22px;
  font-size: 15px;
  font-weight: 750;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cat-optional > summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}
.cat-optional-body {
  padding: 0 22px 20px;
}
.cat-checklist {
  list-style: none;
  padding: 15px;
  background: #e7f1f8;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.85;
}
.cat-preview {
  padding: 18px 0;
  overflow-wrap: anywhere;
}
.cat-review-photo img {
  width: 100%;
  max-height: 380px;
  aspect-ratio: 4/3;
  object-fit: contain;
  background: #eef4f8;
  border-radius: 10px;
  display: block;
}
.cat-review-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.cat-review-photo { margin: 0; min-width: 0; }
.cat-review-photo figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; }
.cat-review-photo figcaption > span:not(.cat-photo-primary) { flex-basis: 100%; }
.cat-photo-primary { font-size: 12px; border-radius: 20px; padding: 3px 9px; background: #e6f2f7; color: #103453; }
.cat-preview dl > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  gap: 12px;
}
.cat-preview dt {
  color: var(--muted);
}
.cat-preview dd {
  margin: 0;
}
.cat-eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 750;
}
.cat-seo {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.cat-seo summary {
  cursor: pointer;
  min-height: 30px;
  font-weight: 700;
}
.cat-success {
  padding: 42px;
  text-align: center;
}
.cat-success .cat-button,
.cat-success .cat-secondary {
  margin: 7px;
}
.cat form {
  margin: 0;
}
@media (max-width: 700px) {
  .cat {
    padding: 0 0 16px;
  }
  .cat-heading {
    align-items: flex-start;
    margin-bottom: 12px;
  }
  .cat-heading p {
    max-width: 260px;
  }
  .cat-card {
    padding: 16px 13px;
    border-radius: 11px;
    margin-bottom: 10px;
  }
  .cat-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px 0;
  }
  .cat-wide {
    grid-column: auto;
  }
  .cat-category {
    padding: 12px;
  }
  .cat-choice-row {
    display: grid;
    grid-template-columns: 1fr;
    margin: 9px 0;
  }
  .cat-custom-heading {
    align-items: center;
  }
  .cat-custom {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .cat-custom .cat-remove {
    justify-self: start;
  }
  .cat-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .cat-photo-remove {
    top: 5px;
    right: 5px;
    width: 44px;
    height: 44px;
  }
  .cat-photo-body {
    padding: 8px;
    gap: 7px;
  }
  .cat-photo-body .cat-field {
    gap: 4px;
    font-size: 10px;
  }
  .cat-photo-body .cat-field select,
  .cat-photo-body .cat-field input {
    min-height: 40px;
    padding: 7px 6px;
    font-size: 13px;
  }
  .cat-photo-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }
  .cat-photo-tools button {
    min-width: 0;
    min-height: 40px;
    padding: 5px 3px;
    font-size: 10px;
  }
  .cat-footer {
    gap: 8px;
  }
  .cat-footer > span {
    display: none;
  }
  .cat-footer .cat-button {
    flex: 1;
    min-width: 0;
  }
  .cat-footer .cat-secondary {
    padding-inline: 13px;
  }
  .cat-photo-actions > * {
    flex: 1;
  }
  .cat-optional > summary {
    padding: 15px 13px;
  }
  .cat-optional-body {
    padding: 0 13px 16px;
  }
  .cat-preview dl > div {
    grid-template-columns: 42% 1fr;
  }
  .cat-success {
    padding: 28px 16px;
  }
}
@media (max-width: 340px) {
  .cat-gallery {
    grid-template-columns: 1fr;
  }
  .cat-photo-body {
    padding: 10px;
  }
  .cat-photo-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (prefers-reduced-motion: reduce) {
  .cat * {
    scroll-behavior: auto !important;
  }
}

.cat-condition {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.cat-condition legend { font-weight: 600; margin-bottom: 8px; }
.cat-condition-options { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-condition-options label { position: relative; cursor: pointer; }
.cat-condition-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat-condition-options span {
  display: block;
  padding: 12px 18px;
  border: 2px solid #b7c9d9;
  border-radius: 8px;
  background: #fff;
  color: #103453;
  font-weight: 600;
}
.cat-condition-options input:checked + span { background: #103453; border-color: #103453; color: #fff; }
.cat-condition-options input:focus-visible + span { outline: 3px solid #008ce2; outline-offset: 2px; }

.cat-photo-body > [data-primary] { font-size: 12px; min-height: 44px; }
.cat-photo-body > [data-primary][aria-pressed="true"] { background: #103453; color: #fff; border-color: #103453; }

.cat-field [aria-invalid="true"] { border-color: #b33b28; outline: 1px solid #b33b28; }

.cat-heat-source { display: flex; width: 100%; min-width: 0; }
.cat-heat-source input { flex: 1; min-width: 0; border-radius: 8px 0 0 8px; }
.cat-heat-source select { flex: 0 0 48px; width: 48px; min-width: 48px; border-left: 0; border-radius: 0 8px 8px 0; padding-inline: 8px; }

#cat-generate-copy,
#cat-research {
  background: var(--cw-blue);
  border-color: var(--cw-blue);
  color: #fff;
}
#cat-generate-copy:hover,
#cat-research:hover {
  background: var(--cw-blue-2);
  border-color: var(--cw-blue-2);
}

/* Compact product-editor pricing and variant content. */
.pe-sale { align-self: end; }
.pe-sale [hidden] { display: none !important; }
.pe-variant-description { font-size: 1rem; font-weight: 400; line-height: 1.5; min-height: 100px; border: 1px solid #cbdde7; border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
.pe-variant-description:focus-visible { outline: 2px solid #104e78; outline-offset: 2px; }
.pe-variant-description p:first-child { margin-top: 0; }
.pe-variant-description p:last-child { margin-bottom: 0; }
.pe-variant-documents { display: grid; gap: 8px; margin: 12px 0; overflow-wrap: anywhere; }
.pe-variant-documents:empty { display: none; }
