:root {
  --brand: #72574d;
  --brand-dark: #5c453d;
  --accent: #f5861f;
  --teal: #34d1bf;
  --ink: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --card: #fff;
  --ops-bg: #0f172a;
  --ops-panel: #1e293b;
  --ops-border: #334155;
  --success: #16a34a;
  --warn: #d97706;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--brand);
}

/* —— Top nav —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-tabs {
  display: flex;
  gap: 4px;
  flex: 1;
}

.nav-tab {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.nav-tab:hover {
  background: #f1f5f9;
  color: var(--ink);
}

.nav-tab.is-active {
  background: #fef3e8;
  color: var(--brand-dark);
}

.header-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

/* —— Views —— */
.view {
  display: none;
  animation: fade 0.2s ease;
}

.view.is-active {
  display: block;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 100px;
}

.hero {
  margin-bottom: 28px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

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

.compare-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
}

.compare-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.compare-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 14px;
}

.compare-card--widget {
  border-top: 3px solid var(--accent);
}

.compare-card--api {
  border-top: 3px solid var(--teal);
}

/* —— Store —— */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-card__img {
  height: 160px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.product-card__body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.product-card .price {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 8px;
}

.product-card .desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
}

.product-card .warehouse-meta,
.product-card .dest-meta {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px;
}

.product-card .warehouse-meta span {
  font-weight: 600;
  color: var(--brand);
}

.delivery-chip {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  margin-bottom: 10px;
  display: none;
}

.delivery-chip.is-visible {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

.btn--primary {
  background: var(--brand);
  color: #fff;
}

.btn--primary:hover {
  filter: brightness(1.05);
}

.btn--outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--ink);
}

.btn--teal {
  background: #0d9488;
  color: #fff;
}

.widget-callout {
  margin-top: 32px;
  padding: 18px;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 14px;
}

.widget-callout code {
  font-size: 12px;
  background: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

/* —— Logistics / Partner API —— */
.ops-view {
  background: var(--ops-bg);
  color: #e2e8f0;
  min-height: calc(100vh - 57px);
}

.ops-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
}

@media (max-width: 900px) {
  .ops-layout {
    grid-template-columns: 1fr;
  }
}

.ops-sidebar {
  background: var(--ops-panel);
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  padding: 16px;
  height: fit-content;
}

.ops-sidebar h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #fff;
}

.ops-sidebar p {
  margin: 0 0 16px;
  font-size: 12px;
  color: #94a3b8;
}

.ops-step {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  font-size: 13px;
  color: #cbd5e1;
}

.ops-step__num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #334155;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ops-step.is-done .ops-step__num {
  background: var(--teal);
}

.ops-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ops-panel {
  background: var(--ops-panel);
  border: 1px solid var(--ops-border);
  border-radius: 12px;
  padding: 18px;
}

.ops-panel h3 {
  margin: 0 0 12px;
  font-size: 15px;
  color: #fff;
}

.ops-form label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin: 10px 0 4px;
}

.ops-form input,
.ops-form select,
.ops-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--ops-border);
  background: #0f172a;
  color: #e2e8f0;
  font: inherit;
  font-size: 14px;
}

.ops-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.api-log {
  background: #020617;
  border: 1px solid var(--ops-border);
  border-radius: 8px;
  padding: 12px;
  font: 12px/1.45 ui-monospace, "SF Mono", Menlo, monospace;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: #a5f3fc;
}

.api-log .err {
  color: #fca5a5;
}

.api-log .ok {
  color: #86efac;
}

.api-log .meta {
  color: #94a3b8;
}

.status-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.status-table th,
.status-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ops-border);
}

.status-table th {
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
}

.status-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill--quoted {
  background: #1e3a5f;
  color: #93c5fd;
}

.status-pill--booked {
  background: #14532d;
  color: #86efac;
}

.hint-box {
  font-size: 13px;
  color: #94a3b8;
  margin: 0 0 12px;
  line-height: 1.45;
}

.hint-box strong {
  color: #e2e8f0;
}
