/* Shop-only additions on top of the website's site.css (same tokens, same header/footer/buttons/cards). */
:root { --danger: #B23A3A; --field: #F0F5FA; }

/* The shop's header carries two links more than the website (Renew, Upgrade): keep every item on one
   line instead of letting "Editions & Price" and "Free trial" wrap at laptop widths. */
header.site .brand { font-size: 1rem; flex: 0 0 auto; }
header.site .brand span { white-space: nowrap; }
header.site nav.main { gap: 2px; flex: 0 1 auto; min-width: 0; }
header.site nav.main a { white-space: nowrap; font-size: .88rem; padding: 6px 9px; }
header.site nav.main a.btn.sm { padding: 8px 14px; }
@media (max-width: 1400px) and (min-width: 1001px) {
  header.site nav.main { gap: 0; }
  header.site nav.main a { font-size: .83rem; padding: 6px 7px; }
  header.site .brand { font-size: .95rem; }
  header.site .brand img { width: 38px; height: 38px; }
}
/* below 1000px the nine links no longer fit beside the name: use the website's hamburger menu earlier */
@media (max-width: 1000px) and (min-width: 861px) {
  header.site nav.main { display: none; position: absolute; top: 66px; left: 0; right: 0; background: var(--ground); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 14px 20px; gap: 14px; }
  header.site nav.main.open { display: flex; }
  header.site .menu-btn { display: inline-block; }
}
main.shop { min-height: 60vh; padding-block: 36px 64px; }
main.shop .intro { text-align: center; max-width: 700px; margin: 0 auto 10px; }
/* page titles: the website's 3.2rem hero size is too loud for shop/admin pages */
main.shop h1 { font-size: clamp(1.45rem, 2.6vw, 1.9rem); }
main.shop .intro h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--blue-ink); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.note { font-size: .88rem; color: var(--muted); }

/* forms */
label { display: block; font-size: .92rem; color: var(--ink); margin: 14px 0 6px; font-weight: 500; }
label .req { color: #D64545; margin-left: 2px; }
input, select, textarea {
  width: 100%; padding: 13px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 1rem;
  background: var(--field); color: var(--ink); font-family: inherit;
}
input::placeholder, textarea::placeholder { color: #8AA3BE; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-3); background: #fff; }
textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; font-size: .95rem; color: var(--ink); }
.check input { width: 18px; height: 18px; padding: 0; margin: 3px 0 0; accent-color: var(--blue); flex: 0 0 auto; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; margin: 0; font-weight: 500; }
.switch input { display: none; }
.switch i { width: 56px; height: 30px; border-radius: 999px; background: #C9D6E4; position: relative; transition: background .15s; }
.switch i::after { content: "No"; position: absolute; right: 9px; top: 0; line-height: 30px; font-size: .72rem; font-weight: 700; color: #fff; font-style: normal; }
.switch i::before { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch input:checked + i { background: var(--blue-2); }
.switch input:checked + i::after { content: "Yes"; right: auto; left: 9px; }
.switch input:checked + i::before { left: 30px; }

/* legal pages (Terms, Privacy, Refund): a document, not a landing page - modest headings, readable measure */
.card.legal h1 { font-size: 1.7rem; margin: 0 0 6px; }
.card.legal h2 { font-size: 1.08rem; margin: 22px 0 6px; color: var(--blue-ink); }
.card.legal p { margin: 0 0 8px; line-height: 1.6; }

/* key boxes on the success page (site.css uses .kv for a definition list) */
div.kv { display: block; font-family: ui-monospace, Consolas, monospace; background: var(--sand); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-size: 1.05rem; word-break: break-all; }

/* admin table */
table.orders { width: 100%; border-collapse: collapse; font-size: .85rem; }
table.orders th, table.orders td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
table.orders th { color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; background: var(--sand); }

/* editions page: the website's .plans/.plan styles do the cards; the compare note sits under them */
.plans-page .plans { margin-top: 26px; }
.plans-page .pricenote { text-align: center; }

/* checkout page */
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; margin-top: 10px; }
.checkout > * { min-width: 0; }
.product { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; }
.product h2 { margin: 0; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.product .badge { background: #E8445A; color: #fff; font-size: .7rem; font-weight: 700; letter-spacing: .04em; padding: 3px 9px; border-radius: 6px; }
.product .sub { color: var(--muted); font-size: .9rem; margin: 2px 0 0; }
.product .amt { font-size: 1.6rem; font-weight: 700; color: var(--blue); white-space: nowrap; font-variant-numeric: tabular-nums; }
.product .amt small { display: block; font-size: .75rem; font-weight: 500; color: var(--muted); text-align: right; }
.sec-head { background: var(--sand); color: var(--ink); font-weight: 700; padding: 12px 24px; border-radius: 10px; margin: 18px 0 2px; font-size: 1.05rem; }
.billing { padding: 6px 24px 22px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.gstrow { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 14px; }
.gstrow label { margin: 0; }
.summary { padding: 0 0 24px; position: sticky; top: 84px; }
.summary h3 { margin: 0; padding: 16px 24px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
.summary .row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 24px; font-size: .98rem; }
.summary .row + .row { border-top: 1px solid var(--line); }
.summary .total { background: var(--sand); font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); }
.summary .actions { padding: 18px 24px 0; display: grid; gap: 10px; }
.summary .btn.ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.summary .btn.ghost:hover { background: var(--ground); }
.err { color: var(--danger); font-size: .9rem; margin-top: 10px; min-height: 1.2em; }

/* pay page */
.pay-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.pay-grid > * { min-width: 0; }
.qr { width: 260px; max-width: 100%; margin: 6px auto; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }

@media (max-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .grid2 { grid-template-columns: 1fr; }
  .summary { position: static; }
  .gstrow { grid-template-columns: auto auto; }
  .gstrow input { grid-column: 1 / -1; }
}
