:root {
  --paper: #f6f5f3;
  --ink: #161616;
  --muted: #6d675f;
  --line: #e6e1da;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Manrope, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.45;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.topbar {
  background: #161616;
  color: #fff;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.03em;
  padding: 8px 16px;
}
.site-head {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.head-price {
  text-decoration: none;
  background: #161616;
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 700;
  font-size: 14px;
}
.product {
  max-width: 1100px;
  margin: 0 auto 24px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}
.stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.stage img { width: 100%; height: auto; }
.buy h1 {
  margin: 0;
  font-size: 36px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.price { margin: 8px 0 0; font-size: 28px; font-weight: 800; }
.sub { margin: 6px 0 0; color: var(--muted); }
.choice { margin: 16px 0 8px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 800; color: #8a847c; }
.colors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.swatch {
  border: 2px solid transparent;
  background: #fff;
  border-radius: 14px;
  padding: 6px 6px 8px;
  cursor: pointer;
  text-align: center;
}
.swatch img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #fff; border-radius: 10px; }
.swatch span { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; }
.swatch.is-on { border-color: #161616; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.size, .add {
  border: 1px solid #e4dfd7;
  background: #fff;
  border-radius: 12px;
  min-height: 44px;
  font-weight: 800;
  cursor: pointer;
}
.size.is-on { background: #161616; color: #fff; border-color: #161616; }
.add {
  margin-top: 12px;
  width: 100%;
  background: #161616;
  color: #fff;
  border: 0;
  min-height: 52px;
}
.checkout {
  margin-top: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.cartbox { border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.cart-head { display: flex; justify-content: space-between; align-items: center; }
.cartbox h2 { margin: 0; font-size: 18px; }
#cart-lines { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
#cart-lines li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button {
  width: 32px; height: 32px; border-radius: 10px;
  border: 1px solid #e4dfd7; background: #fff; font-weight: 800; cursor: pointer;
}
#cart-empty, .fine { color: var(--muted); margin: 8px 0 0; font-size: 14px; }
.fields { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #e4dfd7;
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  font-weight: 500;
}
textarea { resize: vertical; }
.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  background: #161616;
  color: #fff;
  border: 0;
  border-radius: 12px;
  min-height: 52px;
  padding: 12px 16px;
  font-weight: 800;
  cursor: pointer;
}
.errors { background: #fff1f1; color: #8d1420; border-radius: 10px; padding: 10px 12px; }
.errors p { margin: 0; }
.errors p + p { margin-top: 4px; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.perks { max-width: 1100px; margin: 0 auto 90px; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.perks article { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.perks strong { display: block; }
.perks span { color: var(--muted); font-size: 14px; }
.sticky {
  position: fixed; left: 12px; right: 12px; bottom: 12px;
  background: #e10613; color: #fff; text-decoration: none;
  border-radius: 14px; min-height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; font-weight: 800;
}
.thanks {
  max-width: 720px; margin: 24px auto 40px; padding: 28px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 20px;
}
.thanks h1 { margin: 0 0 8px; font-size: 40px; }
@media (min-width: 860px) {
  .product { grid-template-columns: 1.05fr 0.95fr; align-items: start; }
  .stage { position: sticky; top: 12px; }
  .colors { grid-template-columns: repeat(5, 1fr); }
  .sizes { grid-template-columns: repeat(6, 1fr); }
  .fields { grid-template-columns: 1fr 1fr; }
  .fields label:nth-child(1) { grid-column: 1 / -1; }
  .perks { grid-template-columns: repeat(4, 1fr); margin-bottom: 28px; }
  .sticky { display: none; }
}
