:root {
  --bg: #f6f2ef;
  --panel: #ffffff;
  --text: #241d1a;
  --muted: #6e625c;
  --accent: #8a5c4a;
  --accent-2: #d9c2b7;
  --border: #eadfd8;
  --shadow: 0 10px 30px rgba(36, 29, 26, 0.08);
}

* {
  box-sizing: border-box;
}

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

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.search-panel,
.results-header,
.card,
.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  padding: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 34px;
}

.subtitle {
  color: var(--muted);
  max-width: 700px;
  line-height: 1.5;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.chips span {
  background: #fbf8f6;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
}

.stats {
  display: grid;
  gap: 14px;
}

.stat-card {
  background: #fbf8f6;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 28px;
}

.stat-value.small {
  font-size: 18px;
  line-height: 1.4;
}

.search-panel {
  margin-top: 20px;
  padding: 20px;
}

.search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.search-form input {
  flex: 1 1 420px;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 16px;
  font-size: 16px;
}

.search-form button {
  min-height: 52px;
  border: none;
  border-radius: 14px;
  padding: 0 22px;
  background: var(--accent);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.update-note {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.admin-panel {
  margin-top: 18px;
  padding: 18px;
  background: #fbf8f6;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.admin-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-form {
  margin-top: 14px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-form input {
  flex: 1 1 320px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0 16px;
  font-size: 15px;
}

.admin-form button {
  min-height: 48px;
  border: none;
  border-radius: 14px;
  padding: 0 20px;
  background: #241d1a;
  color: white;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.admin-form button:disabled,
.admin-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.admin-meta {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--border);
  background: white;
}

.status-running {
  color: #8a5c4a;
  background: #fff4ed;
}

.status-success {
  color: #1f6b45;
  background: #edf8f1;
}

.status-error,
.status-unauthorized {
  color: #9d2f2f;
  background: #fff0f0;
}

.status-disabled {
  color: var(--muted);
  background: #f2efec;
}

.status-idle {
  color: #5c4d46;
  background: #f7f2ef;
}

.results-header {
  margin-top: 20px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.cards {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  overflow: hidden;
}

.image-wrap {
  background: #f3ece8;
  aspect-ratio: 4 / 3;
}

.image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.card-body {
  padding: 18px;
}

.card-body h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.meta-grid div,
.variations {
  background: #fbf8f6;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.meta-grid span,
.variations h3 {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.meta-grid strong {
  line-height: 1.4;
}

.variations {
  margin-top: 12px;
}

.variations h3 {
  margin-top: 0;
}

.variations ul {
  margin: 0;
  padding-left: 18px;
}

.variations li {
  margin-bottom: 8px;
}

.variations li span {
  display: inline;
  color: var(--text);
  margin-right: 8px;
}

.product-link,
.inline-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.product-link {
  display: inline-block;
  margin-top: 14px;
}

.description-block {
  margin-top: 12px;
  background: #fbf8f6;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}

.description-block h3 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.description-block p {
  margin: 0;
  line-height: 1.5;
}

.empty-state {
  margin-top: 20px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}
