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

:root {
  --bg: #F4DE3B;
  --ink: #14140F;
  --font-serif: 'Fraunces', serif;
  --font-sans: 'Public Sans', sans-serif;
  --radius: 12px;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  min-width: 0;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px;
}

.text-center {
  text-align: center;
}
.mt-4 {
  margin-top: 24px;
}
.mb-4 {
  margin-bottom: 24px;
}

/* Typography */
.event-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 8px 0;
}

.event-meta {
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
  margin-bottom: 32px;
}

/* Steps */
.step-section {
  margin-bottom: 40px;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  background-color: var(--ink);
  color: var(--bg);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
}

/* Offers */
.offer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 16px;
}

.offer-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: #FFFFFF;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .offer-card:hover {
    transform: none;
    box-shadow: none;
  }
}

.offer-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-bottom: 2px solid var(--ink);
  display: block;
}

.offer-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.offer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.offer-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.offer-price {
  font-weight: 800;
  font-size: 1.25rem;
  white-space: nowrap;
}

.offer-desc {
  margin: 0 0 16px 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #444;
}

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 9999px;
  border: 1px solid var(--ink);
  background-color: #FFF;
}
.badge-online {
  background-color: #FFF;
  border-color: var(--ink);
  color: var(--ink);
}
.badge-stock {
  background-color: #FFF;
  border-color: var(--ink);
  color: var(--ink);
}
.badge-soldout {
  background-color: var(--ink);
  color: var(--bg);
}

.offer-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid rgba(20,20,15,0.1);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qty-btn {
  background-color: var(--ink);
  color: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}

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

.qty-val {
  font-weight: 700;
  font-size: 1.2rem;
  min-width: 32px;
  text-align: center;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: #FFF;
  color: var(--ink);
  transition: box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20,20,15,0.2);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  appearance: none;
  background-color: #fff;
  margin: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
}

.checkbox-label input[type="checkbox"]:checked {
  background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23F4DE3B' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 80%;
  background-position: center;
  background-repeat: no-repeat;
}

/* Summary */
.summary-box {
  background-color: #FFF;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.95rem;
  font-weight: 500;
}

.summary-total {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  font-size: 1.1rem;
  text-align: right;
}

.btn-submit {
  width: 100%;
  background-color: var(--ink);
  color: var(--bg);
  border: none;
  border-radius: 9999px;
  padding: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 24px;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-submit:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Alerts */
.alert {
  padding: 16px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  font-weight: 600;
}

.alert-error {
  background-color: #FFEBEE;
}

.alert-info {
  background-color: #E3F2FD;
}

.embed-footer {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 500;
  opacity: 0.6;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 2px solid rgba(20,20,15,0.1);
}

[hidden] { display: none !important; }

.text-link {
  display: inline-flex;
  align-items: center;
  background: none;
  border: 0;
  border-radius: 0;
  padding: 8px 0;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.text-link:hover { text-decoration: underline; }
.text-link:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.interests-toggle, .back-link { margin-top: 12px; }
.payment-heading { margin: 24px 0 12px; font-size: 1.1rem; }
.payment-note { font-size: .85rem; line-height: 1.5; color: #555; }
#stripe-payment-element { width: 100%; min-width: 0; margin: 16px 0; }
.stripe-total { text-align: right; font-weight: 700; }
.summary-line { gap: 16px; overflow-wrap: anywhere; }
.summary-line > :last-child { flex-shrink: 0; }
.form-control[readonly] { background: #fffdf0; }
#step-2-wrapper > .step-section:first-child { min-width: 0; }

@media (min-width: 760px) {
  .container { padding: 40px 32px; }
  .event-title { font-size: 3rem; }
  #step-2-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 1fr);
    gap: 0 40px;
    align-items: start;
  }
  #step-2-wrapper[style*="display: none"] { display: none !important; }
  .back-link { grid-column: 1 / -1; justify-self: start; }
  #continue-btn { display: block; max-width: 400px; margin-left: auto; }
  .checkbox-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}