/* ============================================================
   AGROTEC EXPO 2026 — Modulo de Compras & Checkout
   Fully responsive: desktop → tablet → mobile
   ============================================================ */

/* ── Page Hero Banner ────────────────────────────────────── */

.compras-hero {
  background: linear-gradient(135deg, #163323 0%, #1e6637 50%, #2f8a4b 100%);
  padding: 56px 20px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.compras-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.compras-hero h1 {
  color: #fff;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 700;
  margin: 0 0 8px;
  position: relative;
}

.compras-hero h1 span { color: #c9aa34; }

.compras-hero p {
  color: rgba(255,255,255,.75);
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  max-width: 520px;
  margin: 0 auto;
  position: relative;
}

/* ── Tabs toggle Boletos / Patrocinios ───────────────────── */

.compras-nav {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 24px auto 0;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 4px;
  max-width: 320px;
  position: relative;
}

.compras-nav a {
  flex: 1;
  text-align: center;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255,255,255,.7);
  transition: background .2s, color .2s;
}

.compras-nav a.active {
  background: #fff;
  color: #163323;
}

.compras-nav a:not(.active):hover {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* ── Ticket Cards ────────────────────────────────────────── */

.tickets-section {
  padding: 0 20px 64px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.tickets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.ticket-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7e5;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
  display: flex;
  flex-direction: column;
}

.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.1);
}

.ticket-card.featured {
  border: 2px solid var(--card-color, #2f8a4b);
  position: relative;
}

.ticket-featured-tag {
  position: absolute;
  top: 0;
  right: 20px;
  background: var(--card-color, #2f8a4b);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 12px 6px;
  border-radius: 0 0 8px 8px;
}

.ticket-header {
  padding: 28px 24px 20px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
}

.ticket-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.4rem;
  background: var(--card-bg, #e8f5e9);
}

.ticket-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #163323;
  margin: 0;
}

.ticket-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ticket-price {
  text-align: center;
  margin-bottom: 16px;
}

.ticket-price .amount {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: #163323;
  line-height: 1;
}

.ticket-price .currency {
  font-size: 1rem;
  font-weight: 600;
  color: #888;
  vertical-align: super;
}

.ticket-price .period {
  display: block;
  font-size: .78rem;
  color: #aaa;
  margin-top: 4px;
}

.ticket-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.ticket-features li {
  padding: 7px 0;
  font-size: .85rem;
  color: #555;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.ticket-features li::before {
  content: "\2713";
  color: #2f8a4b;
  font-weight: 700;
  flex-shrink: 0;
}

.ticket-card .btn-ticket {
  display: block;
  text-align: center;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s, transform .1s;
  border: none;
  cursor: pointer;
}

.ticket-card .btn-ticket {
  background: var(--card-color, #2f8a4b);
  color: #fff;
}
.ticket-card .btn-ticket:hover {
  filter: brightness(0.9);
}

/* ── Checkout Layout ─────────────────────────────────────── */

.checkout-section {
  padding: 0 20px 64px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.checkout-container {
  max-width: 960px;
  margin: 0 auto;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  align-items: start;
}

/* ── Summary Panel ───────────────────────────────────────── */

.checkout-summary { position: sticky; top: 90px; }

.summary-card {
  background: #fff;
  border: 1px solid #e5e7e5;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}

.summary-card .summary-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  font-weight: 600;
  margin-bottom: 8px;
}

.summary-card h3 {
  font-size: 1.3rem;
  color: #163323;
  margin: 0 0 6px;
  font-weight: 700;
}

.summary-desc {
  color: #666;
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.summary-divider {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 16px 0;
}

.summary-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: .9rem;
  color: #555;
}

.summary-price-row.total {
  padding-top: 12px;
  border-top: 2px solid #e5e7e5;
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #163323;
}

.summary-price-row.total .price-val {
  color: #2f8a4b;
  font-size: 1.3rem;
}

.summary-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 14px;
  background: #f8faf8;
  border-radius: 10px;
  font-size: .78rem;
  color: #666;
  line-height: 1.4;
}

.summary-secure svg { flex-shrink: 0; color: #2f8a4b; }

/* ── Checkout Form ───────────────────────────────────────── */

.checkout-form {
  background: #fff;
  border: 1px solid #e5e7e5;
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.05);
}

.checkout-form .form-title {
  font-size: 1.15rem;
  color: #163323;
  margin: 0 0 20px;
  font-weight: 700;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: #444;
  margin-bottom: 6px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-family: "Quicksand", system-ui, sans-serif;
  font-size: .92rem;
  color: #333;
  background: #fafafa;
  transition: border-color .2s, background .2s, box-shadow .2s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2f8a4b;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(47,138,75,.1);
}

.form-group input::placeholder { color: #bbb; }

.form-separator {
  border: none;
  border-top: 1px solid #f0f0f0;
  margin: 24px 0;
}

.form-section-title {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-error {
  background: #fef2f2;
  color: #b91c1c;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .85rem;
  margin-bottom: 16px;
  border: 1px solid #fecaca;
}

#paypal-button-container { min-height: 55px; margin-top: 4px; }

/* PayPal fallback when SDK fails to load */
.paypal-fallback {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  color: #92400e;
  font-size: .88rem;
  line-height: 1.5;
  margin-top: 8px;
}
.paypal-fallback svg { flex-shrink: 0; color: #d97706; margin-top: 2px; }
.paypal-fallback p { margin: 0; }

/* ── Sponsor Cards ───────────────────────────────────────── */

.sponsors-section {
  padding: 0 20px 64px;
  margin-top: -36px;
  position: relative;
  z-index: 2;
}

.sponsors-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.sponsor-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e5e7e5;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}

.sponsor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.1);
}

.sponsor-card-header {
  padding: 28px 24px 20px;
  text-align: center;
  background: linear-gradient(135deg, var(--card-bg, rgba(47,138,75,.08)), var(--card-bg-light, rgba(47,138,75,.15)));
}

.sponsor-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
  background: var(--card-color, #2f8a4b);
  color: #fff;
}

.sponsor-price {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  color: #163323;
  line-height: 1;
}

.sponsor-price .currency { font-size: .9rem; font-weight: 600; color: #888; }

.sponsor-card-body {
  padding: 20px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sponsor-benefits {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.sponsor-benefits li {
  padding: 8px 0;
  font-size: .84rem;
  color: #555;
  border-bottom: 1px solid #f5f5f5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.sponsor-benefits li:last-child { border-bottom: none; }

.sponsor-benefits li::before {
  content: "\2713";
  color: #2f8a4b;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.sponsor-card .btn-sponsor {
  display: block;
  text-align: center;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s;
}

.sponsor-card .btn-sponsor {
  background: var(--card-color, #2f8a4b);
  color: #fff;
}
.sponsor-card .btn-sponsor:hover {
  filter: brightness(0.85);
}

/* ── Confirmation ────────────────────────────────────────── */

.confirm-section {
  padding: 80px 20px;
  text-align: center;
}

.confirm-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #d4edda;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-size: 2.4rem;
  color: #2f8a4b;
}

.confirm-section h1 {
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  color: #163323;
  margin-bottom: 12px;
}

.confirm-section p {
  color: #666;
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ── Bottom Links ────────────────────────────────────────── */

.compras-bottom-links {
  text-align: center;
  padding: 0 20px 48px;
}

.compras-bottom-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 8px;
  color: #2f8a4b;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
}

.compras-bottom-links a:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────── */

/* Tablet landscape → single-column checkout */
@media (max-width: 860px) {
  .checkout-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }
  .checkout-summary {
    position: static;
    order: -1;
  }
}

/* Tablet portrait → ticket/sponsor cards 2 columns */
@media (max-width: 768px) {
  .tickets-grid,
  .sponsors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .compras-hero {
    padding: 40px 16px 36px;
  }
}

/* Phone → everything stacked */
@media (max-width: 520px) {
  .tickets-section,
  .sponsors-section,
  .checkout-section {
    margin-top: -24px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .tickets-grid,
  .sponsors-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .compras-hero {
    padding: 32px 14px 28px;
  }

  .checkout-form {
    padding: 20px 16px;
  }

  .summary-card {
    padding: 20px 16px;
  }

  .ticket-header {
    padding: 20px 16px 14px;
  }

  .ticket-body {
    padding: 16px;
  }

  .sponsor-card-header {
    padding: 20px 16px 14px;
  }

  .sponsor-card-body {
    padding: 16px;
  }

  .confirm-section {
    padding: 48px 16px;
  }

  .compras-bottom-links {
    padding: 0 12px 32px;
  }

  .compras-bottom-links a {
    display: block;
    margin: 8px 0;
  }
}
