* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; margin: 0;
       background: #f5f6f8; color: #1c2530; }
html { scroll-behavior: smooth; }
.wrap { max-width: 760px; margin: 0 auto; padding: 20px; }
h1 { margin: 0 0 4px; }
.club-name { font-size: 18px; font-weight: 700; text-align: center; overflow-wrap: anywhere; }

/* ГЕРОЙ */
.hero { display: flex; flex-direction: column; gap: 16px; background: #fff; border-radius: 14px;
       padding: 18px; margin: 14px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.hero-main { min-width: 0; }
.hero .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
       color: #7a8aa0; margin: 0 0 8px; text-align: center; }
.hero .eyebrow .x { color: #2255cc; margin: 0 3px; }
.hero-badges { margin: 0 0 10px; text-align: center; }
.hero h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; }
.hero .lead { color: #3a4654; margin: 0 0 10px; }
.hero .benefits { margin: 0 0 10px; padding-left: 0; list-style: none; }
.hero .benefits li { position: relative; padding-left: 24px; margin: 5px 0; }
.hero .benefits li::before { content: "✔"; position: absolute; left: 0; color: #1a7f37; font-weight: 700; }
.hero .price-hint { background: #f0f7ff; border-radius: 8px; padding: 8px 10px; font-size: 14px;
       color: #1c2530; margin: 0 0 12px; }
.hero .cta { display: inline-block; background: #2255cc; color: #fff; text-decoration: none;
       padding: 12px 20px; border-radius: 10px; font-weight: 600; }
/* фото сверху, крупно, в ряд; на белом фоне чёрный бэкграунд фото сливается с #111 */
.hero-img { object-fit: contain; background: #111; border-radius: 12px; }
.hero > .hero-img { width: 100%; height: 320px; }
.hero-media { display: flex; gap: 12px; width: 100%; }
.hero-media .hero-img { flex: 1 1 0; width: auto; height: 320px; min-width: 0; }
@media (max-width: 560px) {
  .hero > .hero-img,
  .hero-media .hero-img { height: 200px; }
  .hero h1 { font-size: 21px; }
  .hero .cta { display: block; text-align: center; }
}

/* КАК ЭТО РАБОТАЕТ */
.how .steps { margin: 6px 0 12px; padding-left: 22px; }
.how .steps li { margin: 6px 0; }
.order-title { margin: 18px 0 4px; }
.share-label { width: 100%; font-size: 14px; color: #5b6675; }
.club-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
       margin-bottom: 16px; }
.club-head .logo { width: 72px; height: 72px; object-fit: contain; background: #fff;
       border-radius: 12px; padding: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.mc-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #1c2530; }
.mc-brand .mc-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.mc-brand span { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; line-height: 1.1; }
.mc-brand small { font-weight: 400; color: #5b6675; font-size: 12px; }
@media (max-width: 520px) {
  .mc-brand span { display: none; }
  .wrap { padding: 14px; }
  h1 { font-size: 22px; }
  .club-head { gap: 10px; }
  .club-head .logo { width: 56px; height: 56px; }
  /* товар: иконка сверху, подпись под ней */
  .product { flex-direction: column; align-items: center; }
  .product > img { width: 130px; height: 130px; }
  .pinfo { width: 100%; }
  .pinfo h3, .pinfo .desc, .pinfo .hint { text-align: center; }
  .variants { justify-content: center; }
}
.badge { display: inline-block; background: #eef3ff; color: #2255cc; padding: 4px 12px;
       border-radius: 20px; font-size: 14px; font-weight: 600; margin: 0; }
/* объединённый виджет: оффер + даты */
.offer-head { background: #fff; border-radius: 12px; padding: 14px; margin: 14px 0;
       box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.offer-head .dates { margin: 10px 0 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.flash.ok { background: #e7f8ec; color: #1a7f37; }
.flash.err { background: #fdecec; color: #c0392b; }
section { background: #fff; border-radius: 12px; padding: 16px; margin: 14px 0;
       box-shadow: 0 1px 4px rgba(0,0,0,.06); }
/* таблица тиров скидок */
table.tiers { border-collapse: collapse; margin: 10px 0; }
table.tiers th, table.tiers td { padding: 6px 18px 6px 0; text-align: left; }
table.tiers th { color: #5b6675; font-weight: 600; border-bottom: 1px solid #e3e8ef; }
table.tiers td:last-child { font-weight: 700; color: #1a7f37; }

/* прогресс с контрольными точками */
.progress-box { background: #f0f7ff; }
.cur-discount { font-size: 16px; margin-bottom: 14px; }
.cur-discount b { color: #1a7f37; font-size: 20px; }
.bar { position: relative; height: 18px; background: #dbe7f5; border-radius: 9px;
       margin: 28px 6px 34px; }
.bar-fill { height: 100%; background: linear-gradient(90deg,#3b82f6,#22c55e);
       border-radius: 9px; transition: width .4s; }
.tick { position: absolute; top: -6px; width: 2px; height: 30px; background: #9bb0cc;
       transform: translateX(-50%); }
.tick.reached { background: #1a7f37; }
.tick-label { position: absolute; top: 32px; left: 50%; transform: translateX(-50%);
       font-size: 12px; color: #5b6675; white-space: nowrap; }
.tick.reached .tick-label { color: #1a7f37; font-weight: 700; }
.next { margin: 8px 0 0; font-size: 15px; }
.share { margin: 14px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.share button.copied { background: #e7f8ec; color: #1a7f37; }
.share button, .share .wa { border: 0; padding: 8px 14px; border-radius: 8px; cursor: pointer;
       text-decoration: none; font-size: 14px; }
.share button { background: #eef0f3; }
.share .wa { background: #25d366; color: #fff; }
.product { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid #eee; }
.product, .pinfo { min-width: 0; }            /* позволяем колонкам сжиматься на узких экранах */
.product:last-child { border-bottom: 0; }
.product img { width: 96px; height: 96px; object-fit: contain; background: #fafafa; border-radius: 8px; }
.pinfo { flex: 1; }
.pinfo h3 { margin: 0 0 4px; }
.desc { color: #5b6675; font-size: 14px; margin: 0 0 6px; }
.price { font-weight: 600; color: #2255cc; margin: 4px 0; }
.qty { width: 70px; padding: 6px; }
.hint { font-size: 14px; color: #5b6675; margin: 6px 0; }
/* галерея вариантов брелка */
.variants { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 4px; }
.variants figure { margin: 0; text-align: center; }
.variants img { width: 110px; height: 110px; object-fit: contain; background: #fafafa;
       border-radius: 8px; border: 1px solid #e3e8ef; }
.variants figcaption { font-size: 12px; color: #5b6675; margin-top: 2px; }
/* одиночное фото товара (без вариантов) — крупнее */
.variants.single img { width: 220px; height: 220px; cursor: zoom-in; }
.engrave-list { display: flex; flex-direction: column; gap: 10px; margin: 6px 0; }
/* каждый брелок — отдельная карточка-разделитель */
.engrave-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
       background: #f7f9fc; border: 1px solid #e6ebf2; border-radius: 10px; padding: 8px; }
.engrave-row .variant-sel { padding: 7px 34px 7px 10px; border: 1px solid #ccd2da; border-radius: 8px;
       flex: 1 1 120px; min-width: 0; background-color: #fff;
       -webkit-appearance: none; appearance: none;
       background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path d="M1 1l5 5 5-5" fill="none" stroke="%237a8aa0" stroke-width="2"/></svg>');
       background-repeat: no-repeat; background-position: right 12px center; }
.engrave-row .field { display: flex; flex-direction: column; flex: 2 1 150px; min-width: 0; }
.engrave-row .field input { padding: 6px 8px; font-size: 14px; border: 1px solid #ccd2da;
       border-radius: 8px; width: 100%; }
/* на узких экранах — текст гравировки на отдельную строку во всю ширину */
@media (max-width: 520px) {
  .engrave-row .field { flex-basis: 100%; order: 3; }
}
.engrave-warn { display: none; font-size: 12px; color: #b26a00; margin-top: 4px; }
.engrave-warn.show { display: block; }
.engrave-row .rm { background: #eef0f3; color: #c0392b; border: 0; border-radius: 6px;
       width: 24px; height: 24px; font-size: 16px; line-height: 1; cursor: pointer; padding: 0;
       flex: none; }
/* единственная строка → крестик не нужен (нечего удалять) */
.engrave-list .engrave-row:only-child .rm { display: none; }
.add-row { background: #eef3ff; color: #2255cc; border: 1px solid #cdddff; border-radius: 8px;
       padding: 6px 12px; font-size: 14px; cursor: pointer; margin-top: 4px; }
.checkout input { display: block; width: 100%; max-width: 340px; padding: 10px; margin: 8px 0;
       border: 1px solid #ccd2da; border-radius: 8px; }
.checkout button, form button { background: #2255cc; color: #fff; border: 0; padding: 12px 18px;
       border-radius: 8px; font-size: 16px; cursor: pointer; }
.checkout button:disabled { background: #9aa7bd; cursor: not-allowed; }
.total { font-size: 18px; margin-bottom: 8px; }
.total small { display: block; color: #5b6675; font-size: 13px; font-weight: 400; }
.note { color: #5b6675; font-size: 13px; }
table.admin { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table.admin th, table.admin td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; vertical-align: top; }
table.admin th { background: #f0f2f5; }
button.danger { background: #c0392b; }
img.zoomable { cursor: zoom-in; }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.8);
       align-items: center; justify-content: center; z-index: 50; cursor: zoom-out; }
.lightbox img { width: auto; height: auto; max-width: min(92vw, 640px); max-height: 88vh;
       border-radius: 10px; background: #111; padding: 8px; }
/* даты кампании + обратный отсчёт */
.dates { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: #5b6675;
       margin: 8px 0 4px; }
.dates .left b { color: #c0392b; }
/* баннер вернувшегося родителя */
.welcome-back { background: #fff7e6; border: 1px solid #ffe0a3; color: #8a6100;
       padding: 12px 14px; border-radius: 10px; margin: 12px 0; }
/* демо-плашка сверху */
.demo-ribbon { background: #1c2530; color: #fff; text-align: center; font-size: 14px;
       padding: 10px 14px; border-radius: 10px; margin-bottom: 14px; }
.my-items { margin: 8px 0 4px; padding-left: 18px; }
.my-items li { margin: 2px 0; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45;
       color: #5b6675; text-align: left; margin: 10px 0; max-width: 460px;
       background: #f7f9fc; border: 1px solid #e6ebf2; border-radius: 10px; padding: 10px 12px; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; flex: 0 0 auto; }
.consent span { flex: 1 1 auto; min-width: 0; }
