:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #697386;
  --line: #d8dde6;
  --accent: #1570ef;
  --success: #12b76a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  padding: 18px;
  background: #101828;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #ffffff;
  color: #101828;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #a9b4c7;
  font-size: 12px;
  margin-top: 2px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  color: #c9d4e7;
  text-decoration: none;
  border-radius: 7px;
  padding: 10px 12px;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, .1);
  color: #ffffff;
}

.shell {
  margin-left: 236px;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 22px;
}

.eyebrow,
.section-title p,
.preview-toolbar p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  overflow-wrap: anywhere;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: #344054;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.status-pill span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--success);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 14px;
}

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

.metric strong {
  font-size: 26px;
  line-height: 1;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 18px;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 18px;
  margin: 0;
}

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

label {
  color: #344054;
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 11px;
}

input[type="color"] {
  padding: 3px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

#publish-button,
.fake-cart,
.offer-product button,
.segmented button {
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 800;
}

#publish-button {
  min-height: 44px;
  background: var(--accent);
  color: #ffffff;
  margin-top: 4px;
}

.preview-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.preview-toolbar strong {
  font-size: 18px;
}

.segmented {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.segmented button {
  min-height: 36px;
  background: #ffffff;
  color: #344054;
  padding: 0 12px;
}

.segmented button.selected {
  background: #101828;
  color: #ffffff;
}

.device {
  margin: 0 auto;
  transition: max-width .2s ease;
}

.device.desktop {
  max-width: 880px;
}

.device.mobile {
  max-width: 390px;
}

.store-frame {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fafafa;
  padding: 18px;
}

.device.mobile .store-frame {
  grid-template-columns: 1fr;
}

.product-media {
  min-height: 320px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(21, 112, 239, .15), rgba(18, 183, 106, .16)),
    #edf2f7;
}

.product-info {
  min-width: 0;
}

.store-tag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.product-info h3 {
  font-size: 25px;
  margin: 8px 0 6px;
}

.price {
  color: #344054;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 14px;
}

.fake-cart {
  width: 100%;
  min-height: 46px;
  background: #111827;
  color: #ffffff;
  margin-bottom: 14px;
}

.offer-preview {
  --accent: #1570ef;
  --button: #111827;
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 35px rgba(17, 24, 39, .08);
  padding: 14px;
}

.offer-badge {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.offer-preview h4 {
  font-size: 17px;
  margin: 8px 0 5px;
}

.offer-preview p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 12px;
}

.offer-product {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.offer-product img {
  width: 52px;
  height: 52px;
}

.offer-product strong,
.offer-product span {
  display: block;
}

.offer-product span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.offer-product button {
  min-height: 40px;
  background: var(--button);
  color: #ffffff;
  padding: 0 12px;
}

@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
  }

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

  .metrics,
  .workbench {
    grid-template-columns: 1fr;
  }

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

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

  .metrics {
    gap: 10px;
  }

  .split,
  .store-frame,
  .offer-product {
    grid-template-columns: 1fr;
  }

  .product-media {
    min-height: 220px;
  }

  .offer-product button {
    width: 100%;
  }
}
