:root {
  --red: #9b1b2e;
  --red-deep: #6e1220;
  --ink: #141414;
  --muted: #5c564e;
  --paper: #f6f1e8;
  --ivory: #fffdf8;
  --line: #e4d8c8;
  --felt: #1e3d32;
  --felt-2: #163028;
  --gold: #c4a35a;
  --suit-red: #c41e3a;
  --sans: "Source Sans 3", "Segoe UI", sans-serif;
  --serif: "Fraunces", "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
}

a { color: var(--red); }
a:hover { color: var(--red-deep); }

h1, h2, h3 { font-family: var(--serif); color: var(--ink); margin: 0 0 .5em; }

.site-header {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  padding: .85rem 1.5rem;
}
.header-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.site-header .brand {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--red-deep);
  text-decoration: none;
}
.site-header .brand span { color: var(--muted); font-weight: 400; font-size: .85rem; display: block; }
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  align-items: center;
  font-size: .92rem;
  font-weight: 600;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: .1rem;
}
.site-nav a:hover {
  color: var(--red-deep);
  border-bottom-color: var(--gold);
}
.header-logo {
  flex-shrink: 0;
  display: block;
  line-height: 0;
  margin-left: auto;
}
.header-logo img {
  display: block;
  width: 56px;
  height: auto;
  border-radius: 6px;
}

.wrap { max-width: 880px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }

.card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.flash {
  border-radius: 10px;
  padding: .9rem 1.1rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}
.flash-success { background: #e7f3ea; color: #1e5c33; border: 1px solid #bfe0c8; }
.flash-error { background: #fbe9ea; color: var(--red-deep); border: 1px solid #f0c4c8; }

.btn {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 1px solid var(--red);
  border-radius: 999px;
  padding: .75rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); color: #fff; }
.btn-secondary {
  background: var(--ivory);
  color: var(--ink);
  border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--gold); color: var(--ink); }
.btn-block { display: block; width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"] {
  width: 100%;
  font: inherit;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
label { font-weight: 600; display: block; margin-bottom: .35rem; }
.field { margin-bottom: 1.1rem; }
.hint { color: var(--muted); font-size: .88rem; margin-top: .3rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .03em; }

.cart-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cart-row:last-child { border-bottom: none; }
.cart-total { display: flex; justify-content: space-between; font-family: var(--serif); font-size: 1.25rem; padding-top: .9rem; margin-top: .5rem; border-top: 2px solid var(--ink); }

.search-results { position: relative; }
.search-results .dropdown {
  position: absolute;
  z-index: 20;
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 4px;
  max-height: 320px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
}
.search-results .dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: .65rem .9rem;
  font: inherit;
  cursor: pointer;
  border-bottom: 1px solid var(--line);
}
.search-results .dropdown button:last-child { border-bottom: none; }
.search-results .dropdown button:hover { background: var(--paper); }
.search-results .dropdown button.is-blocked {
  opacity: .7;
  cursor: not-allowed;
  background: #f3eee6;
}
.search-results .dropdown button .result-label { display: block; }
.search-results .dropdown button .result-meta {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-top: .15rem;
}
.search-results .dropdown button.is-blocked .result-meta { color: var(--red-deep); font-weight: 600; }

.rates { margin: 0; }
.rates td:last-child { text-align: right; white-space: nowrap; }

.cart-fee-note { margin: .6rem 0 0; }

.checkbox-field { margin-bottom: 1rem; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-weight: 600;
  cursor: pointer;
}
.checkbox-label-wrap {
  align-items: flex-start;
  font-weight: 500;
  line-height: 1.45;
}
.checkbox-label-wrap input { margin-top: .25rem; flex-shrink: 0; }
.checkbox-label input { width: auto; margin: 0; }
.legal-doc .iban { word-break: break-all; font-family: ui-monospace, monospace; }
.invoice-fields {
  padding: 1rem;
  margin-bottom: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.invoice-fields input[readonly] {
  background: var(--paper);
  color: var(--ink);
}
#nip-status.is-error { color: var(--red-deep); font-weight: 600; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-paid { background: #e7f3ea; color: #1e5c33; }
.badge-pending { background: #fff3d6; color: #8a6100; }
.badge-failed { background: #fbe9ea; color: var(--red-deep); }

.status-hero { text-align: center; padding: 2.5rem 1rem; }
.status-hero .icon { font-size: 3rem; margin-bottom: .5rem; }

.site-footer {
  color: var(--muted);
  font-size: .9rem;
  padding: 2.5rem 1.5rem 3rem;
  border-top: 1px solid var(--line);
  background: var(--ivory);
}
.footer-inner { max-width: 880px; margin: 0 auto; text-align: left; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.footer-brand img {
  width: 48px;
  height: auto;
  border-radius: 4px;
}
.footer-brand strong {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.05rem;
}
.footer-brand p { margin: .15rem 0 0; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.footer-grid h3 {
  font-family: var(--sans);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.footer-grid p { margin: .2rem 0; }
.footer-grid .iban { word-break: break-all; }
.site-footer a { color: var(--red); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  margin: 0;
  font-size: .88rem;
}

.legal-doc h1 { margin-bottom: .35rem; }
.legal-doc h2 {
  font-size: 1.1rem;
  margin-top: 1.4rem;
  margin-bottom: .45rem;
}
.legal-doc ul { padding-left: 1.2rem; }
.legal-doc li { margin-bottom: .35rem; }

.spinner {
  width: 44px; height: 44px; margin: 0 auto 1rem;
  border: 4px solid var(--line); border-top-color: var(--red);
  border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .header-logo img { width: 48px; }
}

