:root {
  --bg: #faf7f2;
  --bg-soft: #f4f7fa;
  --text: #2d2a26;
  --muted: #6b6560;
  --accent: #b85c4a;
  --accent-hover: #a45242;
  --stripe: #635bff;
  --stripe-hover: #5851d6;
  --stripe-glow: rgba(99, 91, 255, 0.45);
  --accent-secondary: #7a9eb8;
  --border: #e8e2d9;
  --shadow-sm: 0 2px 8px rgba(45, 42, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(45, 42, 38, 0.09);
  --font-title: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-body: "Lora", Georgia, "Times New Roman", serif;
  --radius-pill: 9999px;
  --radius-card: 1rem;
  --max-width: 40rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

.shop {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.shop--narrow {
  max-width: 32rem;
  text-align: center;
}

.shop__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
}

.shop__eyebrow a {
  color: var(--accent-secondary);
  text-decoration: none;
}

.shop__eyebrow a:hover {
  text-decoration: underline;
}

.shop__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-title);
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

.shop__lead {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

.shop-notice {
  margin: 0 0 1.25rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  color: var(--accent);
  background: rgba(184, 92, 74, 0.1);
  border: 1px solid var(--accent);
  border-radius: 0.65rem;
}

.shop-notice:not([hidden]) {
  display: block;
}

.catalog {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 640px) {
  .catalog {
    grid-template-columns: 1fr 1fr;
  }
}

.product-card {
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.product-card__name {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
}

.product-card__desc {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.9375rem;
}

.product-card__price {
  margin: 0.25rem 0 0.5rem;
  font-weight: 600;
  font-size: 1.125rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.35rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  color: #fff;
  background-color: var(--stripe);
  box-shadow: var(--shadow-sm);
}

.btn__label,
.btn--primary #button-text {
  position: relative;
  z-index: 2;
  color: #fff;
}

.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 62%,
    transparent 100%
  );
  transform: translateX(-120%) skewX(-12deg);
  pointer-events: none;
  z-index: 1;
}

.btn--primary::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(
    90deg,
    var(--stripe),
    #a89bff,
    #7e73ff,
    var(--stripe)
  );
  background-size: 300% 100%;
  z-index: -1;
  opacity: 0;
  filter: blur(8px);
  transition: opacity 0.3s ease;
}

.btn--primary:hover:not(:disabled) {
  background-color: var(--stripe-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 4px 14px rgba(99, 91, 255, 0.35),
    0 0 24px var(--stripe-glow);
  animation: btn-magic-glow 1.4s ease-in-out infinite alternate;
}

.btn--primary:hover:not(:disabled)::before {
  animation: btn-shimmer 0.75s ease forwards;
}

.btn--primary:hover:not(:disabled)::after {
  opacity: 0.7;
  animation: btn-aura 2s linear infinite;
}

@keyframes btn-shimmer {
  to {
    transform: translateX(120%) skewX(-12deg);
  }
}

@keyframes btn-magic-glow {
  from {
    box-shadow:
      0 4px 14px rgba(99, 91, 255, 0.35),
      0 0 20px var(--stripe-glow);
  }
  to {
    box-shadow:
      0 6px 20px rgba(99, 91, 255, 0.45),
      0 0 32px rgba(99, 91, 255, 0.55),
      0 0 48px rgba(168, 155, 255, 0.35);
  }
}

@keyframes btn-aura {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 300% 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn--primary:hover:not(:disabled) {
    animation: none;
  }

  .btn--primary:hover:not(:disabled)::before,
  .btn--primary:hover:not(:disabled)::after {
    animation: none;
  }

  .btn--primary:hover:not(:disabled) {
    transform: translateY(-1px);
  }
}

.btn--ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--accent-secondary);
}

.product-card__buy {
  width: 100%;
}

.checkout {
  margin-top: 2rem;
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
}

.checkout--hidden {
  display: none;
}

.checkout:not(.checkout--hidden) {
  display: block;
}

.checkout__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.checkout__title {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.35rem;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: 0.875rem;
  font-weight: 500;
}

.field input {
  padding: 0.75rem 1rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  background: var(--bg);
}

.field input.error {
  border-color: var(--accent);
}

.field__error {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.875rem;
  color: var(--accent);
}

.payment-element {
  min-height: 120px;
}

.payment-message {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.9375rem;
  color: var(--accent);
}

.btn--pay {
  width: 100%;
  margin-top: 0.5rem;
}

.btn__spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

.complete__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2rem;
}

.catalog--hidden {
  display: none;
}
