:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-2: #eef3e7;
  --text: #20221f;
  --muted: #697062;
  --line: #dde3d7;
  --brand: #1d7a61;
  --brand-dark: #115442;
  --accent: #ef9a3a;
  --danger: #c5462f;
  --shadow: 0 14px 34px rgba(30, 45, 35, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 0%, rgba(239, 154, 58, 0.18), transparent 24rem),
    linear-gradient(180deg, #fbfbf7 0%, var(--bg) 100%);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 0 0 1px rgba(32, 34, 31, 0.04);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-btn {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
}

.icon-btn span {
  font-size: 24px;
  line-height: 1;
}

.cart-btn span {
  font-size: 20px;
}

.page {
  padding: 16px;
}

.hero {
  position: relative;
  display: grid;
  min-height: 168px;
  align-items: end;
  overflow: hidden;
  padding: 20px;
  border-radius: 8px;
  color: #fff;
  background: #155c49;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(11, 57, 44, 0.9), rgba(11, 57, 44, 0.38)),
    url("data:image/svg+xml,%3Csvg width='900' height='420' viewBox='0 0 900 420' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='900' height='420' fill='%231d7a61'/%3E%3Ccircle cx='700' cy='90' r='80' fill='%23ef9a3a'/%3E%3Ccircle cx='785' cy='210' r='46' fill='%23f6d365'/%3E%3Cg transform='translate(470 112)'%3E%3Crect x='0' y='42' width='170' height='210' rx='22' fill='%23ffffff'/%3E%3Crect x='20' y='0' width='130' height='78' rx='18' fill='%23f5c85d'/%3E%3Crect x='25' y='98' width='120' height='88' rx='14' fill='%23e85035'/%3E%3Ccircle cx='62' cy='142' r='18' fill='%23fff2cb'/%3E%3Ccircle cx='106' cy='142' r='18' fill='%23fff2cb'/%3E%3C/g%3E%3Cg transform='translate(640 176)'%3E%3Crect x='0' y='28' width='132' height='152' rx='18' fill='%23f9f6ed'/%3E%3Crect x='18' y='0' width='96' height='58' rx='16' fill='%2397cf6f'/%3E%3Cpath d='M28 78h76v54H28z' fill='%231d7a61'/%3E%3C/g%3E%3C/svg%3E") center / cover;
}

.hero > * {
  position: relative;
}

.hero h2 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.08;
}

.hero p {
  max-width: 280px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.6;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0 12px;
}

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

.section-title span {
  color: var(--muted);
  font-size: 13px;
}

.product-list {
  display: grid;
  gap: 12px;
}

.product-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 6px 20px rgba(26, 41, 32, 0.07);
}

.product-media {
  min-width: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-2);
  background-image: var(--art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.product-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

.product-info h2 {
  margin: 3px 0 6px;
  font-size: 16px;
  line-height: 1.25;
}

.subtitle,
.muted {
  color: var(--muted);
}

.subtitle {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-footer,
.detail-actions,
.order-row,
.success-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-footer strong,
.price {
  color: var(--danger);
  font-size: 18px;
}

.primary,
.secondary {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 16px;
  font-weight: 800;
}

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

.primary:active {
  background: var(--brand-dark);
}

.primary.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.secondary {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--surface);
}

.detail-visual {
  aspect-ratio: 1.35;
  border-radius: 8px;
  background: var(--surface-2);
  background-image: var(--art);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-shadow: var(--shadow);
}

.detail-body {
  padding: 18px 0 0;
}

.detail-body h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.tag {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: #dff0e6;
  font-size: 12px;
  font-weight: 700;
}

.panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.detail-actions {
  position: sticky;
  bottom: 0;
  margin: 18px -16px -16px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.page-order {
  display: grid;
  gap: 16px;
}

.detail-actions .primary {
  flex: 1;
}

.order-summary {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.order-summary .thumb {
  border-radius: 8px;
  background-image: var(--art);
  background-position: center;
  background-size: cover;
}

.order-summary h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.order-summary p {
  margin: 0;
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--text);
  background: var(--surface);
  outline: none;
}

.field textarea {
  min-height: 84px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(29, 122, 97, 0.12);
}

.qty-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  width: 156px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.qty-control button {
  border: 0;
  background: transparent;
  font-size: 20px;
}

.qty-control input {
  border: 0;
  padding: 10px 0;
  text-align: center;
  box-shadow: none;
}

.submit-bar {
  display: grid;
  grid-template-columns: 1fr 138px;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.total {
  font-size: 14px;
}

.total strong {
  display: block;
  color: var(--danger);
  font-size: 22px;
}

.success {
  display: grid;
  min-height: calc(100vh - 96px);
  align-content: center;
  gap: 18px;
  text-align: center;
}

.success-mark {
  display: grid;
  width: 76px;
  height: 76px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 42px;
  font-weight: 900;
}

.success h2 {
  margin: 0;
  font-size: 24px;
}

.success p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.success-actions {
  justify-content: center;
}

.empty {
  padding: 64px 10px;
  text-align: center;
}

.empty p {
  color: var(--muted);
}

@media (min-width: 720px) {
  body {
    padding: 0 24px;
  }

  .app-shell {
    background: rgba(255, 255, 255, 0.82);
  }

  .topbar {
    grid-template-columns: 48px 1fr 48px;
    padding: 18px 28px;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .page {
    padding: 28px;
  }

  .hero {
    min-height: 260px;
    padding: 34px;
  }

  .hero h2 {
    max-width: 520px;
    font-size: 42px;
  }

  .hero p {
    max-width: 430px;
    font-size: 16px;
  }

  .section-title {
    margin: 28px 0 16px;
  }

  .section-title h2 {
    font-size: 22px;
  }

  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .product-card {
    grid-template-columns: 150px 1fr;
    min-height: 168px;
    padding: 14px;
  }

  .product-info h2 {
    font-size: 18px;
  }

  .subtitle {
    font-size: 14px;
  }

  .page-detail {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1fr);
    align-items: start;
    gap: 28px;
  }

  .detail-visual {
    position: sticky;
    top: 96px;
    aspect-ratio: 1;
  }

  .detail-body {
    padding: 0;
  }

  .detail-body h2 {
    font-size: 34px;
  }

  .panel {
    padding: 18px;
  }

  .detail-actions {
    position: static;
    grid-column: 2;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(26, 41, 32, 0.07);
  }

  .detail-actions .primary {
    max-width: 220px;
  }

  .page-order {
    grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1fr);
    align-items: start;
    gap: 24px;
  }

  .order-summary {
    position: sticky;
    top: 96px;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .order-summary .thumb {
    aspect-ratio: 1.2;
  }

  .order-summary h2 {
    font-size: 24px;
  }

  .form {
    margin-top: 0;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .field textarea {
    min-height: 120px;
  }

  .success {
    min-height: 560px;
  }
}

@media (min-width: 1040px) {
  .product-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .product-media {
    aspect-ratio: 1.14;
  }

  .product-info {
    min-height: 132px;
  }
}

@media (max-width: 360px) {
  .page {
    padding: 12px;
  }

  .product-card {
    grid-template-columns: 96px 1fr;
  }

  .hero h2 {
    font-size: 24px;
  }

  .submit-bar {
    grid-template-columns: 1fr;
  }
}
