:root {
  --ink: #111;
  --muted: #6b6b6b;
  --line: #e6e6e6;
  --bg: #fff;
  --soft: #f6f6f4;
  --accent: #111;
  --ok: #1a7f4b;
  --bad: #c0392b;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.topbar { padding: 14px 16px; text-align: center; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; letter-spacing: .35em; font-weight: 600; font-size: 15px; }
.announce { background: var(--ink); color: #fff; text-align: center; font-size: 13px; padding: 7px 12px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.product { display: grid; gap: 24px; padding: 20px 0 8px; }
@media (min-width: 860px) { .product { grid-template-columns: 1.1fr 1fr; gap: 40px; padding-top: 36px; } }
.gallery img#main-img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--soft); display: block;
}
.gallery img.missing { min-height: 280px; }
.gallery { position: relative; }
.thumbs { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; background: var(--soft); flex: none; }

h1 { font-size: 28px; line-height: 1.15; margin: 0 0 4px; font-weight: 600; }
.subtitle { color: var(--muted); margin: 0 0 12px; }
.price { display: flex; gap: 10px; align-items: baseline; margin-bottom: 20px; }
.price span { font-size: 24px; font-weight: 600; }
.price s { color: var(--muted); }

.field { margin-bottom: 18px; }
.label { font-size: 14px; margin-bottom: 8px; }
.swatches { display: flex; gap: 10px; }
.swatch {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid #fff; background: var(--c);
  box-shadow: 0 0 0 1px var(--line); cursor: pointer;
}
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.sizes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.size {
  padding: 10px 0; border: 1px solid var(--line); background: #fff; border-radius: 8px; font-size: 15px; cursor: pointer; color: var(--ink);
}
.size.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.size:disabled { color: #bbb; text-decoration: line-through; cursor: not-allowed; background: var(--soft); }

.btn {
  display: block; width: 100%; text-align: center; background: var(--accent); color: #fff; border: 0;
  padding: 16px; border-radius: var(--radius); font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:disabled { opacity: .6; cursor: wait; }
.trust { list-style: none; padding: 0; margin: 18px 0 0; font-size: 14px; color: #333; display: grid; gap: 6px; }

.details { border-top: 1px solid var(--line); margin-top: 28px; padding: 24px 0; }
.details h2, .order h2 { font-size: 20px; margin: 0 0 10px; }
.details ul { padding-left: 18px; }
.details li { margin-bottom: 6px; }

.order { background: var(--soft); border-radius: var(--radius); padding: 20px 16px; margin: 8px 0 40px; }
@media (min-width: 860px) { .order { max-width: 560px; margin: 8px auto 60px; padding: 28px; } }
.muted { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
form label { display: block; font-size: 14px; margin-bottom: 12px; }
form input, form select {
  display: block; width: 100%; margin-top: 4px; padding: 12px; font-size: 16px; border: 1px solid #d5d5d5; border-radius: 8px; background: #fff; color: var(--ink);
}
form .invalid { border-color: var(--bad); }
.err { display: block; color: var(--bad); font-size: 13px; margin-top: 4px; }
.summary { display: flex; flex-direction: column; background: #fff; border-radius: 8px; padding: 12px; margin-bottom: 12px; font-size: 14px; }
.summary .warn { color: var(--bad); }
.row label { max-width: 120px; }
.totals { background: #fff; border-radius: 8px; padding: 12px; margin: 16px 0; font-size: 14px; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals .grand { font-weight: 600; font-size: 16px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.form-error { color: var(--bad); background: #fdecea; padding: 10px 12px; border-radius: 8px; font-size: 14px; }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 24px 16px 40px; border-top: 1px solid var(--line); }

.thanks { max-width: 560px; margin: 0 auto; padding: 32px 16px; text-align: center; }
.thanks .icon { font-size: 44px; }
.thanks h1 { margin: 8px 0; }
.thanks .card { text-align: left; background: var(--soft); border-radius: var(--radius); padding: 16px; margin: 20px 0; }
.thanks .card div { display: flex; justify-content: space-between; padding: 4px 0; gap: 12px; }
.thanks .steps { text-align: left; padding-left: 20px; }
.thanks .steps li { margin-bottom: 8px; }

.hero { text-align: center; padding: 40px 0 24px; }
.hero h1 { font-size: 30px; }
.hero p { color: var(--muted); margin: 6px 0 0; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; padding-bottom: 48px; }
@media (min-width: 860px) { .grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.card { color: inherit; text-decoration: none; display: block; }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); background: var(--soft); display: block; }
.card h3 { font-size: 15px; font-weight: 600; margin: 10px 0 2px; }
.card .pr { font-size: 14px; }
.card .pr s { color: var(--muted); margin-left: 6px; }
