:root {
  color-scheme: light;
  --bg: #f7f9fb;
  --surface: #ffffff;
  --ink: #10213d;
  --muted: #637083;
  --line: #dce3ec;
  --blue: #123b73;
  --orange: #f16a2d;
  --green: #19a974;
  --yellow: #ffd166;
  --shadow: 0 18px 48px rgba(16, 33, 61, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 18px 18px 110px;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
  gap: 28px;
  align-items: center;
  padding: 30px;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(18, 59, 115, 0.94), rgba(20, 48, 84, 0.86)),
    radial-gradient(circle at 82% 18%, rgba(255, 209, 102, 0.45), transparent 32%);
  overflow: hidden;
}

.hero-copy {
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 18px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffe4b0;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  max-width: 8em;
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 560px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-button,
.ghost-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 8px;
  border: 0;
  text-decoration: none;
  font-weight: 900;
}

.hero-button {
  background: var(--orange);
  color: #fff;
}

.ghost-button {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-image {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.notice div {
  min-height: 92px;
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.notice strong {
  color: var(--blue);
  font-size: 17px;
}

.notice span {
  color: var(--muted);
  line-height: 1.55;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  gap: 12px;
  padding: 14px 0;
  background: rgba(247, 249, 251, 0.94);
  backdrop-filter: blur(12px);
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  background: #fff;
}

.mode-tabs button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.mode-tabs button.active {
  background: var(--blue);
  color: #fff;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.search-box span {
  color: var(--muted);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: none;
  color: var(--ink);
  background: transparent;
}

.category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.category-tabs button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.category-tabs button.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

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

.product-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.product-art {
  min-height: 154px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 209, 102, 0.8), transparent 28%),
    linear-gradient(135deg, var(--art-a), var(--art-b));
  color: #fff;
  font-size: 62px;
}

.product-art img {
  width: 100%;
  height: 100%;
  min-height: 154px;
  object-fit: cover;
  display: block;
}

.product-body {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.product-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.product-tag {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.product-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.price {
  display: grid;
  gap: 2px;
}

.price strong {
  color: var(--orange);
  font-size: 20px;
}

.price span {
  color: var(--muted);
  font-size: 12px;
}

.add-button {
  min-height: 40px;
  padding: 0 13px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 900;
}

.stepper {
  display: inline-grid;
  grid-template-columns: 38px 34px 38px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stepper button {
  height: 38px;
  border: 0;
  background: #f3f6fa;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
}

.stepper span {
  text-align: center;
  font-weight: 900;
}

.cart-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 900;
}

.cart-fab strong {
  min-width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: var(--orange);
}

.cart-panel {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  visibility: hidden;
}

.cart-panel.open {
  pointer-events: auto;
  visibility: visible;
}

.cart-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 33, 61, 0.42);
  opacity: 0;
  transition: opacity 180ms ease;
}

.cart-panel.open .cart-backdrop {
  opacity: 1;
}

.cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto auto auto;
  gap: 14px;
  padding: 18px;
  background: #fff;
  transform: translateX(100%);
  transition: transform 220ms ease;
  box-shadow: var(--shadow);
}

.cart-panel.open .cart-drawer {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cart-header p,
.cart-header h2 {
  margin: 0;
}

.cart-header p {
  color: var(--muted);
  font-weight: 800;
}

.cart-header h2 {
  font-size: 24px;
}

.icon-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 26px;
}

.cart-items {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
}

.empty-cart {
  padding: 26px;
  border: 1px dashed var(--line);
  color: var(--muted);
  text-align: center;
  line-height: 1.7;
}

.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
}

.cart-item h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.cart-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.note-field {
  display: grid;
  gap: 8px;
}

.note-field span {
  font-weight: 900;
}

.note-field textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid var(--line);
  padding: 12px;
  outline: none;
  line-height: 1.6;
}

.cart-summary {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f7f9fb;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.cart-summary strong {
  color: var(--orange);
  font-size: 24px;
}

.cart-summary p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.cart-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.copy-button,
.clear-button {
  min-height: 48px;
  border-radius: 8px;
  font-weight: 900;
}

.copy-button {
  border: 0;
  background: var(--orange);
  color: #fff;
}

.clear-button {
  padding: 0 18px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.copy-status {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-weight: 800;
}

@media (max-width: 860px) {
  .app-shell {
    padding: 10px 10px 96px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .hero h1 {
    font-size: 48px;
  }

  .hero-image {
    max-height: 430px;
    object-position: center top;
  }

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

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

  .product-card {
    grid-template-columns: 122px minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .product-art {
    min-height: 100%;
    font-size: 42px;
  }

  .product-bottom {
    align-items: end;
  }
}
