:root {
  font-family: Inter, system-ui, sans-serif;
  color: #242424;
  background: #faf9f6;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px max(5%, calc((100% - 1100px) / 2));
  background: white;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 5;
}

.brand {
  font-size: 19px;
  font-weight: 800;
}

a {
  color: inherit;
  text-decoration: none;
}

.cart-link {
  background: #fff0e9;
  padding: 10px 14px;
  border-radius: 24px;
  font-weight: 700;
}

#cart-count {
  margin-left: 5px;
  color: #c74719;
}

main {
  max-width: 1100px;
  margin: auto;
  padding: 24px;
}

.hero {
  background: #fff0e9;
  border-radius: 24px;
  padding: clamp(24px, 6vw, 56px);
  margin: 12px 0 36px;
}

.hero h1 {
  max-width: 600px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.1;
  margin: 10px 0;
}

.hero p { color: #63534c; }

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
}

h2 { margin: 28px 0 18px; }

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

.product {
  background: white;
  border: 1px solid #eee;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.product-emoji {
  font-size: 54px;
  background: #fff7f1;
  border-radius: 12px;
  text-align: center;
  padding: 15px;
}

.product h3 { margin: 14px 0 6px; }

.product p {
  color: #666;
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.4;
}

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

.price { font-weight: 800; }

button {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  background: #d94f20;
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.checkout {
  margin-top: 36px;
  padding: 24px;
  border-radius: 20px;
  background: white;
  border: 1px solid #eee;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.cart-item button {
  padding: 5px 10px;
  margin-left: 6px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin: 22px 0;
  font-size: 20px;
}

#pay-button { width: 100%; }

.hint, footer {
  color: #777;
  font-size: 13px;
}

#payment-result { margin-top: 16px; }

footer {
  text-align: center;
  padding: 30px 12px;
}

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

@media (max-width: 420px) {
  main { padding: 16px; }
  .product { padding: 12px; }
  .product-bottom { align-items: flex-start; flex-direction: column; }
  .product-bottom button { width: 100%; }
  .checkout { padding: 16px; }
}
