/* Cibo Mercato — statisk sajt */

:root {
  --cream-50: #fdfbf7;
  --cream-100: #f9f5ed;
  --cream-200: #f0e8da;
  --coffee-700: #3d2b1f;
  --coffee-800: #2a1d14;
  --coffee-900: #1a120c;
  --earth-400: #a69076;
  --earth-500: #8b7355;
  --earth-600: #6b5740;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  color: var(--coffee-900);
  background: var(--cream-50);
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.banner {
  border-bottom: 1px solid var(--cream-200);
  background: rgba(240, 232, 218, 0.8);
  padding: 0.625rem 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--earth-600);
}

.banner.hidden {
  display: none;
}

main {
  flex: 1;
}

.container {
  max-width: 32rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.container--narrow {
  padding-top: 2rem;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--earth-500);
  text-align: center;
}

.hero-title {
  margin: 0.75rem 0 0;
  font-size: 2.25rem;
  line-height: 1.15;
  text-align: center;
  color: var(--coffee-900);
}

.hero-text {
  margin: 1rem auto 0;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  text-align: center;
  color: var(--earth-600);
}

.header-block {
  margin-bottom: 3rem;
}

.card {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--cream-200);
  background: white;
  box-shadow: 0 1px 3px rgba(26, 18, 12, 0.04);
}

.card__image {
  aspect-ratio: 3 / 4;
  background: var(--cream-200);
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__body {
  padding: 1.5rem 2rem;
}

.card__title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--coffee-900);
}

.card__desc {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--earth-600);
}

.card__price {
  margin: 1rem 0 0;
  font-weight: 500;
  color: var(--coffee-800);
}

.card__actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 480px) {
  .hero-title {
    font-size: 3rem;
  }

  .card__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 9999px;
  border: 1px solid var(--cream-200);
  background: white;
  padding: 0.25rem;
}

.qty button {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--coffee-700);
  font-size: 1.125rem;
  cursor: pointer;
}

.qty button:hover {
  background: var(--cream-100);
}

.qty button:disabled {
  opacity: 0.3;
  cursor: default;
}

.qty span {
  min-width: 2ch;
  text-align: center;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3rem;
  padding: 0 2rem;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--coffee-800);
  color: var(--cream-50);
}

.btn--primary:hover {
  background: var(--coffee-700);
}

.btn--primary:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--coffee-800);
  color: var(--coffee-800);
}

.btn--outline:hover {
  background: var(--cream-100);
}

.btn--full {
  width: 100%;
}

.btn--swish {
  max-width: 20rem;
  width: 100%;
  margin-top: 1.5rem;
  gap: 0.5rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--earth-500);
  cursor: pointer;
}

.back:hover {
  color: var(--coffee-800);
}

.page-title {
  margin: 0;
  font-size: 1.875rem;
  color: var(--coffee-900);
}

.page-sub {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--earth-600);
}

.page-sub strong {
  color: var(--coffee-800);
}

.amount {
  margin: 0.5rem 0 0;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--coffee-800);
}

.form {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--earth-500);
}

.field input {
  margin-top: 0.25rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--cream-200);
  background: white;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--coffee-900);
}

.field input:focus {
  outline: none;
  border-color: var(--earth-500);
  box-shadow: 0 0 0 1px var(--earth-500);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.steps {
  margin: 1.5rem 0 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--earth-600);
}

.steps li + li {
  margin-top: 0.5rem;
}

.payment-box {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--cream-200);
  background: white;
}

.payment-page {
  padding-top: 2rem;
}

.status-steps {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}

.status-steps__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6875rem;
  text-align: center;
  color: var(--earth-400);
  line-height: 1.3;
}

.status-steps__item--active {
  color: var(--coffee-800);
  font-weight: 500;
}

.status-steps__item--done {
  color: var(--coffee-700);
}

.status-steps__dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: 1.5px solid var(--cream-200);
  background: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-steps__item--active .status-steps__dot {
  border-color: var(--coffee-800);
  background: var(--coffee-800);
  color: var(--cream-50);
}

.status-steps__item--done .status-steps__dot {
  border-color: var(--coffee-700);
  background: var(--cream-200);
  color: var(--coffee-700);
}

.hidden {
  display: none !important;
}

.payment-hint {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: var(--earth-500);
  text-align: center;
}

.payment-done-link {
  display: block;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.8125rem;
  color: var(--earth-500);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.payment-done-link:hover {
  color: var(--coffee-800);
}

.payment-complete {
  text-align: center;
  padding: 1rem 0 2rem;
}

.payment-complete__icon {
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: #e8f0e4;
  font-size: 1.75rem;
  color: #3d5c32;
}

.payment-complete__title {
  margin: 1.5rem 0 0;
  font-size: 2rem;
  color: var(--coffee-900);
}

.payment-complete__lead {
  margin: 1rem auto 0;
  max-width: 22rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--earth-600);
}

.payment-complete__list {
  margin: 1.5rem auto 0;
  max-width: 16rem;
  padding: 0;
  list-style: none;
  text-align: left;
  font-size: 0.875rem;
  color: var(--earth-600);
}

.payment-complete__list li {
  padding-left: 1.25rem;
  position: relative;
}

.payment-complete__list li + li {
  margin-top: 0.5rem;
}

.payment-complete__list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #3d5c32;
  font-size: 0.75rem;
}

.payment-complete__note {
  margin: 1.25rem auto 0;
  max-width: 20rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--earth-400);
}

.payment-complete .btn {
  margin-top: 2rem;
}

.btn--swish.btn--primary {
  max-width: 20rem;
  width: 100%;
  margin-top: 0.5rem;
}

.order-confirm {
  margin-bottom: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid var(--cream-200);
  background: var(--cream-100);
}

.order-confirm__title {
  margin: 0;
  font-weight: 600;
  color: var(--coffee-800);
}

.order-confirm__text {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--earth-600);
}

.payment-details {
  width: 100%;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cream-200);
}

.payment-details > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.payment-details > div + div {
  margin-top: 0.625rem;
}

.payment-details dt {
  font-size: 0.75rem;
  color: var(--earth-500);
}

.payment-details dd {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--coffee-800);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.payment-note {
  margin: 0.75rem auto 0;
  max-width: 24rem;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
  color: var(--earth-500);
}

#qrcode img,
#qrcode canvas {
  display: block;
}

.error {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: #b91c1c;
}

.error.hidden {
  display: none;
}

.thanks {
  text-align: center;
  padding-top: 5rem;
}

.check-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--cream-200);
  font-size: 1.5rem;
  color: var(--coffee-700);
}

.thanks h1 {
  margin: 2rem 0 0;
  font-size: 2.25rem;
  color: var(--coffee-900);
}

.thanks p {
  margin: 1rem auto 0;
  max-width: 20rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--earth-600);
}

.thanks .thanks-note {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--earth-500);
}

.thanks .btn {
  margin-top: 2.5rem;
}

footer {
  border-top: 1px solid var(--cream-200);
  background: rgba(249, 245, 237, 0.8);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

footer .brand {
  margin: 0;
  font-size: 1.125rem;
  color: var(--coffee-800);
}

footer .copy {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--earth-500);
}

footer .memorial {
  margin: 1.5rem auto 0;
  max-width: 20rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--cream-200);
}

footer .memorial__text {
  margin: 0;
  font-size: 1.0625rem;
  font-style: italic;
  line-height: 1.65;
  color: var(--coffee-700);
}

footer .memorial__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  padding: 0.625rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--coffee-700);
  font-size: 0.8125rem;
  font-weight: 500;
  font-style: normal;
  text-decoration: none;
  color: var(--coffee-800);
  transition: background 0.15s;
}

footer .memorial__link:hover {
  background: var(--cream-200);
}
