:root {
  --purple: #9989A4;
  --dark-purple: #545166;
  --footer-bg: #5B5968;
  --page-bg: #f4f3f6;
  --card-bg: #ffffff;
  --text: #333333;
  --text-muted: #666666;
  --error: #b00020;
  --success: #1b5e20;
  --shadow: 0 2px 12px rgba(84, 81, 102, 0.12);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--page-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--purple);
  text-decoration: none;
}

a:hover {
  color: var(--dark-purple);
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: var(--shadow);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

@media (min-width: 768px) {
  .site-header__inner {
    padding: 0.5rem 2.5rem;
  }
}

.site-header__logo img {
  display: block;
  height: 40px;
  width: auto;
}

.site-header__nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-header__nav a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark-purple);
  text-decoration: none;
  position: relative;
  padding-bottom: 0.25rem;
}

.site-header__nav a:hover {
  color: var(--purple);
}

.site-header__nav li.active a {
  color: var(--purple);
}

.site-header__nav li.active a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--purple);
}

/* Checkout main */
.checkout-page {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.checkout-card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: 1rem;
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem 2rem;
}

.checkout-card__title {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark-purple);
}

.checkout-card__product {
  margin: 0 0 0.25rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.checkout-card__amount {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  color: var(--purple);
  font-weight: 700;
}

.checkout-card__status {
  margin: 0 0 1rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: pre-line;
  line-height: 1.5;
}

.checkout-card__status.error {
  color: var(--error);
}

.checkout-card__status.success {
  color: var(--success);
}

.checkout-card__spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--purple);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.checkout-card__hint {
  margin: 1.25rem 0 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.checkout-card__terms {
  margin: 0;
  font-size: 0.8125rem;
}

.hidden {
  display: none !important;
}

#paypal-buttons {
  min-height: 2.5rem;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.site-footer a {
  color: #fff;
  text-decoration: none;
}

.site-footer a:hover {
  opacity: 0.8;
  text-decoration: none;
}

.site-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .site-footer__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
  }

  .site-footer__brand,
  .site-footer__nav,
  .site-footer__contacts,
  .site-footer__legal,
  .site-footer__partners {
    flex: 0 0 auto;
  }
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer__logo {
  width: 100px;
  height: auto;
}

@media (min-width: 1280px) {
  .site-footer__logo {
    width: 120px;
  }
}

.site-footer__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.3;
  max-width: 240px;
}

.site-footer__nav ul,
.site-footer__contacts,
.site-footer__legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) and (max-width: 1279px) {
  .site-footer__nav ul {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
  }
}

.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer__contacts a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-footer__contacts svg {
  flex-shrink: 0;
}

.site-footer__legal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__legal li:last-child {
  font-size: 0.625rem;
}

.site-footer__partners h3 {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.site-footer__partner-logos {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-footer__partner-logos img:first-child {
  width: 60px;
}

.site-footer__partner-logos img:last-child {
  width: 110px;
}

@media (min-width: 1280px) {
  .site-footer__partner-logos {
    flex-direction: column;
    align-items: flex-start;
  }
}
