/* =====================================================================
   TTF | Purchase form (/buy/<product>) — page styles only.
   Summary card on one side, the buyer form on the other.
   Phones ≤600 · tablets ≤1023 · desktop ≥1024
   ===================================================================== */

.buy-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }

/* Order summary */
.buy-sum {
  position: sticky; top: calc(var(--nav-h) + var(--hero-min) + 16px);
  display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015)), var(--bg-2);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.buy-sum::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 3px; background: var(--stripe); border-radius: 20px 20px 0 0; }
.buy-sum-top { display: flex; align-items: center; gap: 14px; }
.buy-ico {
  flex: none; display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
  background: var(--green-soft); border: 1px solid rgba(93, 187, 70, .3); color: var(--g-bright);
}
.buy-ico svg, .buy-notes svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.buy-ico svg { width: 28px; height: 28px; }
.buy-cat { margin: 0; color: var(--yellow); font-size: 13.5px; font-weight: 600; }
.buy-sum h2 { margin: 0; font-size: 24px; }
.buy-line {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
}
.buy-line span { color: var(--muted); }
.buy-price { color: var(--yellow); font-size: 24px; }
.buy-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.buy-notes li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.7; color: var(--muted); }
.buy-notes svg { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--g-bright); }
.buy-demo { align-self: flex-start; }

/* Form */
.buy-box { padding: 26px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.buy-box h2 { margin: 0 0 4px; font-size: 22px; }
.buy-req, .buy-hint { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.buy-hint { margin: 10px 0 18px; }
.buy-unavail { font-size: 17px; margin-bottom: 18px; }

.buy-errors {
  margin: 0 0 18px; padding: 14px 16px; border-radius: 14px; background: var(--red-soft);
  border: 1px solid rgba(255, 107, 107, .35); font-size: 14.5px;
}
.buy-errors ul { margin: 6px 0 0; padding-inline-start: 20px; }

.buy-type { border: 0; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.buy-type legend { float: inline-start; margin-inline-end: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.buy-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.buy-type label {
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: 14.5px;
  color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); transition: background .2s, color .2s;
}
.buy-type input:checked + label { color: var(--g-bright); background: var(--green-soft); border-color: rgba(93, 187, 70, .45); }
.buy-type input:focus-visible + label { outline: 3px solid var(--yellow); outline-offset: 2px; }

.buy-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.buy-f label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.buy-f input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); transition: border-color .2s, background .2s;
}
.buy-f input:focus { outline: none; border-color: var(--g-bright); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 3px rgba(93, 187, 70, .2); }
.buy-f input[aria-invalid="true"] { border-color: var(--red); }
.buy-f input[dir="ltr"] { text-align: left; }
.buy-org { display: none; grid-column: 1 / -1; }
.buy-form:has(#t-ent:checked) .buy-org { display: block; }

.buy-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; margin-bottom: 20px; cursor: pointer; }
.buy-agree input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--green); flex: none; }
.buy-agree a { color: var(--yellow); }
.buy-go { width: 100%; min-height: 54px; font-size: 17px; }

/* Request form (products sold by request): lists, choices, notes, thank-you box */
.buy-f label small, .buy-checks legend small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.buy-f select, .buy-f textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; font: inherit; color: var(--text);
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .16); transition: border-color .2s, background .2s;
}
.buy-f select { cursor: pointer; }
.buy-f select option { color: #131815; background: #fff; }
.buy-f textarea { min-height: 110px; resize: vertical; line-height: 1.8; }
.buy-f select:focus, .buy-f textarea:focus { outline: none; border-color: var(--g-bright); background: rgba(255, 255, 255, .07); box-shadow: 0 0 0 3px rgba(93, 187, 70, .2); }
.buy-f select[aria-invalid="true"] { border-color: var(--red); }
.buy-f input::placeholder, .buy-f textarea::placeholder { color: rgba(242, 240, 233, .34); opacity: 1; }   /* examples: faded */
.buy-f select:has(option[value=""]:checked) { color: rgba(242, 240, 233, .5); }
.buy-wide { grid-column: 1 / -1; }
.buy-notes-f { margin-bottom: 18px; }
.buy-price-text { font-size: 17px; text-align: end; }

.buy-checks { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.buy-checks legend { width: 100%; padding: 0; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.buy-checks input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.buy-checks label {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; cursor: pointer;
  font-weight: 500; font-size: 14px; color: var(--muted); background: rgba(255, 255, 255, .04); border: 1px solid var(--line);
  transition: background .2s, color .2s, border-color .2s;
}
.buy-checks label::before { content: ""; width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid currentColor; flex: none; }
.buy-checks input:checked + label { color: var(--g-bright); background: var(--green-soft); border-color: rgba(93, 187, 70, .45); }
.buy-checks input:checked + label::before { background: var(--g-bright); border-color: var(--g-bright); box-shadow: inset 0 0 0 2.5px var(--bg-2); }
.buy-checks input:focus-visible + label { outline: 3px solid var(--yellow); outline-offset: 2px; }
.buy-trap { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }

.buy-done { text-align: center; padding: 36px 26px 30px; }
.buy-done-ico {
  display: inline-grid; place-items: center; width: 78px; height: 78px; border-radius: 50%; margin-bottom: 14px;
  background: var(--green-soft); border: 2px solid rgba(93, 187, 70, .5); color: var(--g-bright);
}
.buy-done-ico svg { width: 38px; height: 38px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.buy-done h2 { font-size: clamp(22px, 2.6vw, 28px); margin-bottom: 12px; }
.buy-done p { color: var(--muted); font-size: 16px; line-height: 1.9; max-width: 520px; margin: 0 auto; }
.buy-ref {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px; margin: 0 0 14px; padding: 12px 26px;
  border-radius: 16px; background: rgba(255, 206, 57, .08); border: 1px dashed rgba(255, 206, 57, .45);
}
.buy-ref span { font-size: 13.5px; color: var(--muted); }
.buy-ref strong { font-size: clamp(20px, 3vw, 26px); color: var(--yellow); letter-spacing: .06em; user-select: all; }
.buy-done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (max-width: 1023px) {
  .buy-grid { grid-template-columns: minmax(0, 1fr); }
  .buy-sum { position: relative; top: 0; }
}
@media (max-width: 600px) {
  .buy-fields { grid-template-columns: minmax(0, 1fr); }
  .buy-checks label { flex: 1 1 calc(50% - 8px); justify-content: flex-start; }
  .buy-done-actions .btn { flex: 1 1 100%; }
  .buy-box, .buy-sum { padding: 18px; }
}
