@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  src: url("/fonts/Barlow-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  src: url("/fonts/Barlow-SemiBold.ttf") format("truetype");
}

:root {
  --yellow: #f7c600;
  --blue: #1a2547;
  --ink: #172033;
  --muted: #667085;
  --line: #d9deea;
  --panel: #ffffff;
  --page: #f3f5f8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Barlow, Arial, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.hero {
  align-items: center;
  background: var(--blue);
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 26px;
}

.eyebrow {
  color: var(--yellow);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(300px, 420px) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.input-panel,
.preview-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 20px;
}

label {
  color: var(--blue);
  display: grid;
  font-weight: 600;
  gap: 7px;
}

textarea,
input {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  padding: 10px 11px;
  width: 100%;
}

textarea:focus,
input:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(247, 198, 0, 0.4);
}

.actions,
.card-actions,
.preview-header {
  align-items: center;
  display: flex;
  gap: 10px;
}

.actions {
  margin-top: 14px;
}

button {
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
  min-height: 40px;
  padding: 9px 14px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.primary {
  background: var(--yellow);
  color: var(--blue);
  font-weight: 600;
}

.secondary,
.card-actions button {
  background: white;
  border-color: var(--line);
  color: var(--blue);
}

.hint,
.status,
#counter {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.preview-header {
  justify-content: space-between;
  margin-bottom: 12px;
}

.status {
  min-height: 20px;
}

.status.error {
  color: #b42318;
}

.product-list {
  display: grid;
  gap: 14px;
}

.product-card {
  border: 1px solid var(--line);
  display: grid;
  gap: 18px;
  grid-template-columns: 180px minmax(0, 1fr);
  padding: 14px;
}

.image-wrap {
  align-items: center;
  background: #f6f7f8;
  display: flex;
  min-height: 180px;
  justify-content: center;
}

.image-wrap img {
  max-height: 170px;
  max-width: 170px;
  object-fit: contain;
}

.fields {
  display: grid;
  gap: 10px;
}

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

.warnings {
  color: #b54708;
  font-size: 13px;
  min-height: 18px;
}

@media (max-width: 900px) {
  .app-shell {
    padding: 14px;
  }

  .workspace,
  .product-card,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
  }
}
