:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --border: #d9dee8;
  --brand: #ef6c00;
  --brand-dark: #c65300;
  --error: #b42318;
  --success: #027a48;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-shell {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
}

.hero {
  background: linear-gradient(135deg, #fff, #fff4eb);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 30px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 13px;
}

h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: 12px; }
.hero p:last-child { max-width: 760px; color: var(--muted); font-size: 18px; line-height: 1.55; margin-bottom: 0; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  resize: vertical;
  min-height: 170px;
}

textarea:focus {
  outline: 3px solid rgba(239, 108, 0, .18);
  border-color: var(--brand);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

button {
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 12px 20px;
  font-weight: 700;
  cursor: pointer;
}
button:hover { background: var(--brand-dark); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { background: #eef1f6; color: var(--text); }
button.secondary:hover { background: #dfe4ed; }

.hint { color: var(--muted); margin: 12px 0 0; }
.results-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.total { font-weight: 800; color: var(--success); }
.status { padding: 12px 14px; border-radius: 12px; background: #f2f4f7; color: var(--muted); margin-bottom: 14px; }
.status.loading { color: var(--brand-dark); background: #fff4eb; }
.status.success { color: var(--success); background: #ecfdf3; }
.status.error { color: var(--error); background: #fef3f2; }

.result-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.result-card:first-of-type { border-top: 0; }
.result-card img, .image-placeholder {
  width: 92px;
  height: 92px;
  object-fit: contain;
  background: #f7f8fb;
  border: 1px solid var(--border);
  border-radius: 14px;
}
.query { color: var(--muted); font-size: 14px; margin-bottom: 5px; }
.result-card h3 { margin-bottom: 6px; }
.price { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.unit { color: var(--muted); margin-bottom: 8px; }
.error { color: var(--error); margin-bottom: 0; }
a { color: var(--brand-dark); font-weight: 700; }

@media (max-width: 640px) {
  .app-shell { width: min(100% - 20px, 1100px); margin: 10px auto; }
  .hero, .panel { padding: 18px; border-radius: 16px; }
  .result-card { grid-template-columns: 1fr; }
}
