:root {
  color: #1c2825;
  background: #f4f1e9;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(222, 156, 99, 0.14), transparent 27rem),
    #f4f1e9;
}

.site-header {
  width: min(1120px, calc(100% - 48px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(28, 40, 37, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #f9f6ef;
  background: #1f4b43;
  font-family: Georgia, serif;
}

.secure-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66726e;
  font-size: 13px;
  font-weight: 600;
}

.secure-label svg {
  width: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.checkout-shell {
  width: min(1040px, calc(100% - 48px));
  margin: 70px auto 90px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
  gap: clamp(48px, 8vw, 100px);
  align-items: start;
}

.order-panel { padding-top: 28px; }

.mode-tabs {
  margin-bottom: 34px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(28, 40, 37, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.mode-tab {
  padding: 9px 16px;
  display: grid;
  gap: 2px;
  justify-items: start;
  border: 0;
  border-radius: 9px;
  color: #66726e;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease;
}

.mode-tab strong { font-size: 14px; font-weight: 700; }
.mode-tab span { font-size: 11px; letter-spacing: 0.02em; }

.mode-tab:hover:not([aria-selected="true"]) { color: #1c2825; }

.mode-tab[aria-selected="true"] {
  color: #1f4b43;
  background: #fff;
  box-shadow: 0 2px 8px rgba(38, 51, 47, 0.1);
}

.mode-tab:disabled { opacity: 0.5; cursor: progress; }

.eyebrow, .step-label {
  margin-bottom: 13px;
  color: #b25731;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

h1 {
  max-width: 600px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.intro {
  max-width: 500px;
  margin: 22px 0 40px;
  color: #64706c;
  font-size: 16px;
  line-height: 1.65;
}

.product-card {
  padding: 22px 0;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 18px;
  align-items: center;
  border-top: 1px solid rgba(28, 40, 37, 0.14);
  border-bottom: 1px solid rgba(28, 40, 37, 0.14);
}

.product-art {
  width: 80px;
  height: 88px;
  position: relative;
  display: grid;
  place-items: end center;
  overflow: hidden;
  border-radius: 8px;
  background: #dfb384;
}

.tote-handle {
  width: 34px;
  height: 34px;
  position: absolute;
  top: 15px;
  border: 5px solid #83502e;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
}

.tote-body {
  width: 56px;
  height: 57px;
  z-index: 1;
  display: grid;
  place-items: center;
  color: #83502e;
  background: #e9c59f;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  clip-path: polygon(9% 0, 91% 0, 100% 100%, 0 100%);
}

.product-copy { display: grid; gap: 5px; }
.product-copy strong { font-size: 14px; }
.product-copy span { color: #77817e; font-size: 12px; }
.product-card > strong { font-size: 14px; }

.totals { margin: 22px 0 0; }
.totals div { display: flex; justify-content: space-between; padding: 8px 0; }
.totals dt, .totals dd { margin: 0; font-size: 14px; }
.totals dt { color: #66726e; }
.totals dd { font-weight: 650; }
.totals .grand-total { margin-top: 8px; padding-top: 18px; border-top: 1px solid rgba(28, 40, 37, 0.14); }
.totals .grand-total dt, .totals .grand-total dd { color: #1c2825; font-size: 18px; }

.payment-card {
  min-height: 560px;
  padding: clamp(28px, 4vw, 42px);
  border: 1px solid rgba(28, 40, 37, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 70px rgba(38, 51, 47, 0.11);
  backdrop-filter: blur(10px);
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 29px;
  font-weight: 500;
  letter-spacing: -0.025em;
}

.payment-intro {
  margin: 9px 0 30px;
  color: #74807c;
  font-size: 13px;
}

#payment-element { min-height: 210px; }

.loading-placeholder { display: grid; gap: 14px; }
.loading-placeholder span {
  height: 46px;
  border-radius: 9px;
  background: linear-gradient(90deg, #f0f0ee 25%, #fafaf9 50%, #f0f0ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
.loading-placeholder span:first-child { height: 54px; }

@keyframes shimmer { to { background-position: -200% 0; } }

.payment-message {
  margin-top: 18px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #8f271f;
  background: #fff0ee;
  font-size: 13px;
  line-height: 1.45;
}

#submit-button, .secondary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 25px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background: #1f4b43;
  box-shadow: 0 8px 20px rgba(31, 75, 67, 0.2);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

#submit-button:hover:not(:disabled), .secondary-button:hover { background: #173b35; transform: translateY(-1px); }
#submit-button:disabled { opacity: 0.58; cursor: not-allowed; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

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

.stripe-footer {
  margin-top: 30px;
  color: #9aa19f;
  font-size: 11px;
  text-align: center;
}
.stripe-footer strong { color: #696f7c; font-size: 14px; letter-spacing: -0.04em; }

.result-view {
  padding: 38px 4px 20px;
  text-align: center;
}
.result-view .step-label { margin-top: 25px; }
.result-view p { color: #66726e; font-size: 14px; line-height: 1.6; }
.result-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1f4b43;
  font-size: 28px;
  font-weight: 700;
}

[hidden] { display: none !important; }

@media (max-width: 820px) {
  .checkout-shell {
    max-width: 560px;
    margin-top: 40px;
    grid-template-columns: 1fr;
    gap: 45px;
  }
  .order-panel { padding-top: 0; }
  h1 { font-size: clamp(39px, 11vw, 54px); }
}

@media (max-width: 520px) {
  .site-header, .checkout-shell { width: min(100% - 28px, 560px); }
  .site-header { height: 72px; }
  .secure-label { font-size: 0; }
  .secure-label svg { width: 18px; }
  .checkout-shell { margin-top: 30px; }
  .payment-card { min-height: 520px; padding: 26px 20px; border-radius: 14px; }
  .product-card { grid-template-columns: 68px 1fr auto; gap: 13px; }
  .product-art { width: 68px; height: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; }
}
