/* ==========================================================================
   Oura-inspired design: warm earth tones, premium minimalism, generous spacing
   ========================================================================== */

/* Reset and base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.65;
  color: #2c2c2c;
  background-color: #f4f6f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 48px;
}

header h1 {
  font-size: 2rem;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.subtitle {
  color: #5a6478;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Form sections */
.form-section {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.form-section h2 {
  font-size: 0.8rem;
  font-weight: 600;
  color: #5a6478;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e6ed;
}

.section-note {
  font-size: 0.85rem;
  color: #7a8090;
  margin-top: -12px;
  margin-bottom: 20px;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-card {
  border: 2px solid #e2e6ed;
  border-radius: 12px;
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.25s ease;
  background: #ffffff;
  text-align: center;
}

.product-card:hover {
  border-color: #b7bfcc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.product-card.selected {
  border-color: #2a6496;
  box-shadow: 0 0 0 1px #2a6496;
  background: #f5f7fb;
}

.product-card .product-name {
  font-weight: 500;
  font-size: 0.85rem;
  color: #2c2c2c;
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.product-card .product-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: #2a6496;
}

.product-card .product-total {
  font-size: 0.75rem;
  color: #7a8090;
  margin-top: 4px;
}

/* Radio group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e2e6ed;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-option:hover {
  border-color: #b7bfcc;
  background: #f5f7fb;
}

.radio-option input[type="radio"] {
  margin-top: 3px;
  accent-color: #2a6496;
  width: 16px;
  height: 16px;
}

.radio-option input[type="radio"]:checked + .radio-label {
  color: #2c2c2c;
  font-weight: 500;
}

.radio-label {
  font-size: 0.9rem;
  color: #3d4256;
}

/* Sizing Kit Panel */
.sizing-kit-panel {
  margin-top: 20px;
  padding: 28px;
  background: #f5f7fb;
  border-radius: 12px;
  border: 1px solid #e2e6ed;
}

.sizing-kit-panel h3 {
  font-size: 1.3rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 8px;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.sizing-kit-image {
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.sizing-kit-image img {
  width: 100%;
  height: auto;
  display: block;
}

.sizing-steps {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.sizing-step {
  flex: 1;
  text-align: center;
  position: relative;
}

.sizing-step-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #e2e6ed;
}

.sizing-step-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: #fff;
  background: #7a8090;
  border-radius: 12px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #3d4256;
  color: #fff;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.sizing-step p {
  font-size: 0.78rem;
  color: #3d4256;
  line-height: 1.45;
  font-weight: 500;
}

.sizing-pricing {
  max-width: 220px;
  margin: 0 auto 12px;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: #3d4256;
  padding: 3px 0;
}

.pricing-total {
  font-weight: 700;
  color: #1a1a1a;
  border-top: 1px solid #cdd2dc;
  padding-top: 8px;
  margin-top: 6px;
}

.tax-note {
  text-align: center;
  font-size: 0.75rem;
  color: #7a8090;
  font-style: italic;
  margin-bottom: 24px;
}

.sizing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.btn-sizing-kit {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s;
  letter-spacing: 0.02em;
}

.btn-sizing-kit:hover {
  background: #333;
}

.btn-continue-ring {
  width: 100%;
  padding: 14px 24px;
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  color: #3d4256;
  background: transparent;
  border: 1.5px solid #b7bfcc;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.btn-continue-ring:hover {
  border-color: #2a6496;
  color: #2a6496;
}

@media (max-width: 500px) {
  .sizing-steps {
    flex-direction: column;
    gap: 20px;
  }

  .sizing-step-img {
    max-width: 200px;
    margin: 0 auto 8px;
  }
}

/* Form fields */
.form-row {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-field.full-width {
  flex-basis: 100%;
}

.form-field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #5a6478;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.required {
  color: #c0392b;
}

.form-field input,
.form-field select {
  padding: 12px 14px;
  border: 1.5px solid #cdd2dc;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  color: #2c2c2c;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input::placeholder {
  color: #aab0bc;
}

.form-field input:focus,
.form-field select:focus {
  outline: none;
  border-color: #2a6496;
  box-shadow: 0 0 0 3px rgba(128, 70, 33, 0.1);
}

.form-field input.invalid,
.form-field select.invalid {
  border-color: #c0392b;
}

.form-field input.invalid:focus,
.form-field select.invalid:focus {
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.1);
}

.field-error {
  font-size: 0.78rem;
  color: #c0392b;
  margin-top: 4px;
  min-height: 0;
}

.field-error:empty {
  display: none;
}

.international-note {
  font-size: 0.8rem;
  color: #7a8090;
  text-align: center;
  margin-top: 16px;
}

.international-note a {
  color: #2a6496;
  text-decoration: none;
}

.international-note a:hover {
  text-decoration: underline;
}

/* Form actions */
.form-actions {
  margin-top: 32px;
  text-align: center;
}

.form-actions .field-error {
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 32px;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: #1a1a1a;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.2s, opacity 0.2s;
  letter-spacing: 0.02em;
}

.submit-btn:hover:not(:disabled) {
  background: #333;
}

.submit-btn:disabled {
  background: #b7bfcc;
  cursor: not-allowed;
}

.submit-btn .btn-spinner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.submit-btn .btn-spinner[hidden] {
  display: none;
}

.spinner {
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (max-width: 500px) {
  .container {
    padding: 24px 16px 40px;
  }

  header h1 {
    font-size: 1.6rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    flex-direction: column;
    gap: 14px;
  }

  .form-section {
    padding: 24px 20px;
    border-radius: 12px;
  }
}

/* Success page */
.success-container {
  text-align: center;
  padding: 80px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 28px;
  background: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.success-container h1 {
  font-size: 1.6rem;
  font-weight: 300;
  color: #1a1a1a;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.success-container p {
  color: #5a6478;
  font-size: 0.95rem;
  margin-bottom: 12px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.success-container .email-highlight {
  font-weight: 600;
  color: #2c2c2c;
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  color: #2a6496;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.back-link:hover {
  text-decoration: underline;
}
