/* ==========================================================
   TOH SHOES — страница за поръчка
   Наследява темата и шрифтовете от style.css.
   ========================================================== */

.checkout { max-width: var(--max); margin: 0 auto; padding: 40px var(--pad) 90px; }

/* ---------- Стъпки ---------- */
.steps {
  list-style: none;
  display: flex;
  gap: 0;
  margin: 0 0 40px;
  padding: 0;
  border: 2px solid var(--ink);
}

.step {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mute);
  border-right: 2px solid var(--ink);
}
.step:last-child { border-right: none; }

.step span {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border: 2px solid var(--rule);
  border-radius: 50%;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.step.is-active { background: var(--ink); color: var(--paper); }
.step.is-active span { border-color: var(--paper); }
.step.is-done { color: var(--ink); }
.step.is-done span { background: var(--signal); border-color: var(--signal); color: #fff; }

.step-panel { display: none; }
.step-panel.is-open { display: block; }

/* ---------- Оформление ---------- */
.checkout-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 34px;
  align-items: start;
}

.col-main h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 22px; }

.side-box {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 22px;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.side-box h2 { font-size: 1.15rem; }
.side-hint { font-size: 0.85rem; color: var(--mute); margin: 0; }

/* ---------- Ред в количката ---------- */
.review { display: grid; gap: 2px; }

.rline {
  display: grid;
  grid-template-columns: 68px 1fr auto auto 28px;
  gap: 14px;
  align-items: center;
  border: 2px solid var(--ink);
  padding: 12px;
}

.rthumb {
  width: 68px; height: 68px;
  object-fit: cover;
  border: 2px solid var(--ink);
  background: var(--invert-bg);
}

.rinfo { min-width: 0; }
.rname { font-weight: 600; font-size: 0.96rem; line-height: 1.3; }
.rmeta { font-size: 0.82rem; color: var(--mute); margin-top: 3px; }
.reta { font-size: 0.79rem; font-weight: 600; margin-top: 3px; }
.reta.fast { color: var(--ink); }
.reta.slow { color: var(--signal); }

.rqty { display: flex; align-items: center; border: 2px solid var(--ink); }
.rqty button {
  width: 30px; height: 30px;
  background: none; border: none; cursor: pointer;
  font-size: 1rem; line-height: 1; color: var(--ink);
  font-family: var(--font-body);
}
.rqty button:hover { background: var(--haze); }
.rqty span { min-width: 26px; text-align: center; font-weight: 600; font-size: 0.9rem; }

.rsum {
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.1rem;
  white-space: nowrap;
}

.rdel {
  background: none; border: none; cursor: pointer;
  color: var(--mute); font-size: 1.2rem; line-height: 1; padding: 4px;
}
.rdel:hover { color: var(--bad); }

.empty-cart {
  border: 2px dashed var(--rule);
  padding: 40px 20px;
  text-align: center;
  display: grid;
  gap: 16px;
  justify-items: center;
}
.empty-cart p { color: var(--mute); margin: 0; }

/* ---------- Промо код ---------- */
.promo-row { display: flex; gap: 8px; }
.promo-row input {
  flex: 1; min-width: 0;
  font-family: var(--font-body); font-size: 0.94rem;
  padding: 11px 12px;
  border: 2px solid var(--rule);
  background: var(--paper); color: var(--ink);
  text-transform: uppercase;
}
.promo-row input:focus { border-color: var(--ink); outline: none; }
.promo-row .btn { padding: 11px 16px; width: auto; }

.promo-msg { font-size: 0.83rem; margin: 0; min-height: 1.2em; color: var(--mute); }
.promo-msg.good { color: var(--good); font-weight: 600; }
.promo-msg.bad { color: var(--bad); font-weight: 600; }

/* ---------- Суми ---------- */
.totals {
  border-top: 2px solid var(--ink);
  padding-top: 12px;
  margin-top: 4px;
  display: grid;
  gap: 7px;
}
.trow { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--mute); }
.trow b { color: var(--ink); font-weight: 600; }
.trow.good, .trow.good b { color: var(--good); }
.trow.total {
  border-top: 1px solid var(--rule);
  padding-top: 9px;
  margin-top: 3px;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--ink);
}
.trow.total b { font-weight: 900; }

.back-link {
  font-size: 0.86rem;
  color: var(--mute);
  text-decoration: none;
  text-align: center;
}
.back-link:hover { color: var(--ink); }

/* ---------- Форма ---------- */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { width: 100%; }
.field > span { font-size: 0.82rem; font-weight: 600; color: var(--mute); }

.field input, .field textarea {
  font-family: var(--font-body); font-size: 0.95rem;
  padding: 11px 12px;
  border: 2px solid var(--rule);
  background: var(--paper); color: var(--ink);
  width: 100%;
  resize: vertical;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: none; }

.form-msg { font-size: 0.87rem; margin: 14px 0 0; min-height: 1.2em; }
.form-msg.bad { color: var(--bad); font-weight: 600; }

/* ---------- Начин на доставка ---------- */
.ship-list { display: grid; gap: 8px; }

.ship {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  border: 2px solid var(--rule);
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.ship:hover { border-color: var(--ink); }
.ship.selected { border-color: var(--ink); background: var(--haze); }

.ship input { margin: 0; accent-color: var(--signal); width: 17px; height: 17px; }

.ship-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ship-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ship-label { font-weight: 600; font-size: 0.88rem; line-height: 1.3; }
.ship-note { font-size: 0.78rem; color: var(--mute); }

.ship-logo {
  height: 17px; width: auto;
  flex-shrink: 0;
  background: #fff;
  padding: 1px 3px;
  border: 1px solid var(--rule);
}

.ship-price {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.98rem;
  white-space: nowrap;
}

/* ---------- Съгласие ---------- */
.consent {
  border: 2px solid var(--ink);
  padding: 14px 16px;
  margin-top: 18px;
  background: var(--haze);
}

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
}
.consent-row input {
  width: 20px; height: 20px;
  margin: 1px 0 0;
  flex-shrink: 0;
  accent-color: var(--signal);
  cursor: pointer;
}
.consent-row a { font-weight: 600; }

.consent-note {
  font-size: 0.8rem;
  color: var(--mute);
  margin: 10px 0 0 31px;
}

@media (max-width: 620px) {
  .consent-note { margin-left: 0; }
}

/* ---------- Готово ---------- */
.done-box {
  border: 2px solid var(--ink);
  padding: 50px 30px;
  text-align: center;
  max-width: 620px;
  margin: 0 auto;
}
.done-mark {
  width: 62px; height: 62px;
  margin: 0 auto 22px;
  display: grid; place-items: center;
  background: var(--signal);
  color: #fff;
  font-size: 1.9rem;
  border-radius: 50%;
}
.done-box h1 { font-size: 1.9rem; margin-bottom: 14px; }
.done-box p { color: var(--mute); margin: 0 auto 12px; max-width: 46ch; }
.done-ref { font-size: 1.05rem; color: var(--ink) !important; }
.done-sub { font-size: 0.88rem; }
.done-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.done-actions .btn { width: auto; }

/* ---------- Адаптивност ---------- */
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .side-box { position: static; }
}

@media (max-width: 620px) {
  .steps { font-size: 0.8rem; }
  .step { flex-direction: column; gap: 4px; padding: 10px 6px; text-align: center; }
  .field-grid { grid-template-columns: 1fr; }
  .rline { grid-template-columns: 56px 1fr 28px; row-gap: 10px; }
  .rthumb { width: 56px; height: 56px; }
  .rqty { grid-column: 2; }
  .rsum { grid-column: 3 / -1; text-align: right; }
  .rdel { grid-row: 1; grid-column: 3; }
}
