@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&display=swap");

:root {
  --black: #0b0b0b;
  --white: #f4f4f2;
  --off-white: #fafafa;
  --brown: #8b5a3c;
  --brown-dark: #5f3b26;
  --brown-light: #b87c57;
  --shadow: rgba(12, 12, 12, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at top, #f9f9f9, #e8e8e5 55%, #d8d8d6 100%);
  color: var(--black);
  min-height: 100vh;
}

.page {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 48px;
  padding: 48px clamp(24px, 6vw, 80px) 64px;
  align-items: center;
  justify-items: center;
  min-height: 100vh;
  align-content: center;
  width: 100%;
}

.hero {
  display: grid;
  gap: 12px;
  width: min(520px, 100%);
  text-align: center;
  justify-items: center;
  align-items: center;
}

.logo {
  width: 160px;
  height: 160px;
  object-fit: contain;
  margin-top: -42px;
  margin-bottom: -6px;
}

#bags-meta {
  display: none;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  letter-spacing: -0.04em;
}

.subtitle {
  font-size: 1.6rem;
  line-height: 1.6;
  max-width: 420px;
  margin-top: 2px;
  text-align: center;
}

.price-row {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.price {
  font-size: 2rem;
  font-weight: 600;
  min-width: 0;
  line-height: 1.2;
  padding-bottom: 2px;
  margin-top: 8px;
}

.chip {
  border: 1px solid var(--black);
  padding: 6px 12px;
  font-size: 0.8rem;
  max-width: 320px;
  text-align: center;
  white-space: nowrap;
}

.bag-stage {
  height: 360px;
  display: grid;
  place-items: center;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.bag-subtext {
  font-size: 1.35rem;
  line-height: 1.5;
  max-width: 520px;
  color: #3a3a3a;
  text-align: center;
  margin-top: -8px;
}

.bag-subtext__emphasis {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}

.bag-image {
  width: 192px;
  height: 192px;
  object-fit: contain;
  background-color: transparent;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.18));
  animation: float 6s ease-in-out infinite;
  --bag-shift: -14px;
}

.bag-spec {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #3a3a3a;
  margin-top: -10px;
}

.bag-spec--checkout {
  text-align: center;
  margin-top: 4px;
}

.checkout-link {
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  text-decoration: none;
  color: #1f5eff;
}

.page--checkout {
  grid-template-columns: 1fr;
  justify-items: center;
}

.checkout--solo {
  max-width: 560px;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 50;
}

.modal.is-open {
  display: grid;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.modal__content {
  position: relative;
  background: #ffffff;
  padding: 32px;
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  max-width: 420px;
  width: calc(100% - 48px);
}

.modal__content h3 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.modal__content p {
  color: #444;
  margin-bottom: 18px;
}

.modal__close {
  width: 100%;
}

.not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  gap: 12px;
  color: #7a7a7a;
  background: #f1f1f1;
  font-family: "Space Grotesk", sans-serif;
}

.not-found__face {
  font-size: 6rem;
}

.not-found__text {
  font-size: 1.2rem;
  letter-spacing: 0.4em;
}

.bags-progress {
  width: min(360px, 90%);
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.bags-progress__label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #2a2a2a;
}

.bags-progress__track {
  height: 10px;
  background: rgba(16, 16, 16, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.bags-progress__fill {
  height: 100%;
  width: 0%;
  background: #0f9d58;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.checkout {
  background: var(--off-white);
  border: 1px solid rgba(17, 17, 17, 0.25);
  padding: 28px 28px 32px;
  display: grid;
  gap: 20px;
  border-radius: 24px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.12);
  width: min(520px, 100%);
  text-align: center;
}

.checkout h2 {
  font-size: 1.6rem;
}

.subtext {
  color: #333;
  font-size: 0.95rem;
}

.payment-form {
  display: grid;
  gap: 16px;
  text-align: left;
  width: 100%;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field-error {
  display: none;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: #b00020;
}

.field-hint {
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  color: #555;
  padding-bottom: 6px;
}


.field-error.is-visible {
  display: block;
}

input.input-error {
  border-color: #b00020;
}

input {
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.3);
  background: var(--white);
  font-size: 1rem;
  border-radius: 14px;
}

img,
svg,
iframe {
  max-width: 100%;
}

select[name="quantity"] {
  max-width: 140px;
  text-align: center;
  padding: 10px 12px;
  border: 1px solid rgba(17, 17, 17, 0.3);
  background: var(--white);
  font-size: 1rem;
  border-radius: 14px;
}

.payment-method {
  display: grid;
  gap: 6px;
}

.payment-method__label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #444;
}

.wallet-button {
  width: 100%;
  min-height: 44px;
  border-radius: 6px;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  margin: 0 0 8px 0;
  display: block;
}

#google-pay-button,
#apple-pay-button {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  margin: 0 0 8px 0;
  padding: 0;
  border: 1px dashed rgba(17, 17, 17, 0.2);
  min-height: 44px;
}

.apple-pay-button {
  display: none;
  border: none;
  background: transparent;
  min-height: 44px;
  -webkit-appearance: -apple-pay-button;
  -apple-pay-button-type: buy;
  -apple-pay-button-style: black;
}

#google-pay-button > * {
  width: 100% !important;
  max-width: 100% !important;
  display: block !important;
}


.card-container {
  padding: 12px;
  border: 1px solid rgba(17, 17, 17, 0.3);
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.pay-button {
  background: #1f5eff;
  color: var(--white);
  border: none;
  padding: 18px 26px;
  font-size: 1.02rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  margin-top: 10px;
}

.pay-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}


.status {
  min-height: 20px;
  font-size: 0.9rem;
}

.env-note {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(var(--bag-shift));
  }
  50% {
    transform: translateY(calc(var(--bag-shift) - 8px));
  }
}

@media (max-width: 820px) {
  .page {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .price-row {
    justify-content: center;
  }

  .bag-stage {
    height: 320px;
  }

  .checkout {
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.12);
  }

  label {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 32px 16px 48px;
  }

  .chip {
    white-space: normal;
  }
}
.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.2);
  border-radius: 14px;
  background: #f7f7f4;
  font-size: 0.95rem;
  text-align: left;
}

.totals div:nth-child(even) {
  text-align: right;
  font-weight: 700;
}
