/* ========================================
   SashiiTours — Cart & Checkout Styles
   Design System: Playfair + Inter, --accent-orange, 20px cards
   ======================================== */

/* --- Layout --- */
.page-cart-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 80vh;
}

.payment-page {
  padding: 80px 0;
  background: var(--bg-light, #fcfcfc);
  min-height: 90vh;
}

.payment-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: start;
}

/* --- Empty State --- */
.cart-empty-state {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
  padding: 40px 20px;
}

.empty-state-card {
  text-align: center;
  max-width: 480px;
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #e5e5e5);
  padding: 60px 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.empty-state-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-orange, #d97706);
}

.empty-state-icon.error {
  background: #fef3c7;
  color: #b45309;
}

.empty-state-card h2 {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin: 0 0 14px 0;
}

.empty-state-card p {
  color: var(--text-muted, #666);
  line-height: 1.7;
  font-size: 1rem;
  margin: 0 0 32px 0;
}

.empty-state-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--text-dark, #111);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.empty-state-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* --- Headings (Playfair Display) --- */
.cart-heading {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin-bottom: 25px;
}

.cart-heading-sm {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin: 0 0 8px 0;
}

.section-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 25px;
  color: var(--text-dark, #111);
}

/* --- Summary Card --- */
.summary-card {
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.summary-header {
  display: flex;
  gap: 25px;
  padding-bottom: 30px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 30px;
}

.summary-image {
  width: 120px;
  height: 120px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
}

.summary-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.summary-product-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.3rem;
  margin: 0 0 10px;
  color: var(--text-dark, #111);
}

.summary-dates {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted, #717171);
  font-size: 15px;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  color: #484848;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.detail-value {
  font-weight: 600;
  color: var(--text-dark, #111);
}

.summary-disclaimer {
  display: block;
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted, #999);
  line-height: 1.5;
}

/* --- Checkout Tabs --- */
.checkout-tabs-wrapper {
  margin-top: 30px;
}

.checkout-tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border-color, #e2e8f0);
  padding-bottom: 10px;
}

.tab-trigger {
  background: none;
  border: none;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  padding: 8px 14px;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  border-radius: 8px 8px 0 0;
  transition: all 0.2s;
  position: relative;
}

.tab-trigger.active {
  color: var(--accent-orange, #d97706);
}

.tab-trigger.active::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-orange, #d97706);
  border-radius: 3px 3px 0 0;
}

.checkout-form-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark, #1a1a1a);
  margin-bottom: 15px;
}

.checkout-form-desc {
  margin-bottom: 15px;
  color: var(--text-muted, #64748b);
  font-family: var(--font-body, 'Inter', sans-serif);
}

/* --- Registration & Breakdown Cards --- */
.checkout-registration-card,
.price-breakdown-card {
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-dark, #444);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.form-group input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color, #ddd);
  font-size: 15px;
  font-family: var(--font-body, 'Inter', sans-serif);
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--accent-orange, #d97706);
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

/* --- Buttons --- */
.btn-register-action {
  width: 100%;
  background: var(--text-dark, #111);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 10px;
}

.btn-register-action:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.checkout-proceed-btn {
  width: 100%;
  margin-top: 20px;
  background: var(--text-dark, #000);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  transition: all 0.2s;
}

.checkout-proceed-btn:hover {
  background: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.checkout-cancel-btn {
  width: 100%;
  margin-top: 10px;
  background: transparent;
  color: #999;
  border: 1px solid #e0e0e0;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  transition: all 0.2s;
}

.checkout-cancel-btn:hover {
  color: #b32121;
  border-color: #b32121;
  background: #fff5f5;
}

.checkout-cancel-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Price Breakdown --- */
.breakdown-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 15px;
  color: var(--text-muted, #666);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.breakdown-row.total {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color, #eee);
  font-size: 20px;
  color: var(--text-dark, #111);
  font-weight: 700;
}

.total-amount {
  color: var(--accent-orange, #d97706);
}

/* --- Timer --- */
.cart-timer {
  font-size: 0.9rem;
  font-weight: 700;
  font-family: var(--font-body, 'Inter', sans-serif);
  color: #e11d48;
  margin-top: 5px;
}

.cart-timer #countdown-clock {
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}

/* --- Cart Header --- */
.cart-header {
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

/* --- Payment Areas --- */
.payment-methods-brick-area {
  margin-top: 30px;
}

.mercadopago-checkout-area,
.wompi-checkout-area,
.bold-checkout-area {
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  padding: 30px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.mp-info, .wompi-info, .bold-info {
  margin-bottom: 20px;
}

.mp-info p, .wompi-info p, .bold-info p {
  font-size: 14px;
  color: var(--text-muted, #444);
  font-family: var(--font-body, 'Inter', sans-serif);
  margin: 0;
}

#paymentBrick_container {
  border: 0;
  min-height: 600px;
  width: 100%;
  margin: 0 auto;
}

#wompi-checkout-widget,
#bold-checkout-widget {
  min-height: 100px;
  width: 100%;
  margin: 0 auto;
}

.no-gateway-notice {
  padding: 30px;
  text-align: center;
  background: #fef3c7;
  border-radius: var(--card-radius, 20px);
  border: 1px dashed var(--accent-orange, #d97706);
  color: #92400e;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.no-gateway-notice p {
  margin: 8px 0 0;
  font-size: 0.9rem;
}

.no-gateway-notice p:first-of-type {
  font-size: 1rem;
  margin-top: 12px;
}

.no-gateway-notice svg {
  color: var(--accent-orange, #d97706);
}

.payment-security-info {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-muted, #b0b0b0);
  text-align: center;
  font-family: var(--font-body, 'Inter', sans-serif);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

/* --- Result Views --- */
.result-view {
  padding: 60px 40px;
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
  animation: fadeIn 0.5s ease;
}

.result-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
}

.result-success .result-icon {
  background: #E6F7EE;
  color: #00A650;
}

.result-error .result-icon {
  background: #FDECEC;
  color: #F23D4F;
}

.result-pending .result-icon {
  background: #FFF4E6;
  color: #FF7733;
}

.result-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-dark, #111);
}

.result-msg {
  color: var(--text-muted, #666);
  margin-bottom: 35px;
  line-height: 1.6;
  font-size: 16px;
  font-family: var(--font-body, 'Inter', sans-serif);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Toast Notification --- */
.sashii-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 320px;
  z-index: 9999;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border-left: 5px solid #ccc;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.sashii-toast.visible { transform: translateX(0); }
.sashii-toast.processing { border-left-color: #009EE3; }
.sashii-toast.success { border-left-color: #00A650; }
.sashii-toast.error { border-left-color: #F23D4F; }
.sashii-toast.pending { border-left-color: #FF7733; }

.toast-content h4 { margin: 0 0 5px 0; font-size: 15px; color: var(--text-dark, #111); }
.toast-content p { margin: 0; font-size: 13px; color: var(--text-muted, #777); }

.toast-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #009EE3;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: none;
}

.sashii-toast.processing .toast-spinner { display: block; }

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- Guest Payment Notice --- */
.notice-card {
  background: #fdf6f2;
  border: 1px dashed var(--accent-orange, #FF6B35);
  border-radius: var(--card-radius, 20px);
  padding: 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  color: var(--accent-orange, #FF6B35);
}

/* --- Travelers (pasajeros) --- */
.travelers-section {
  margin-top: 25px;
}

.travelers-form-card,
.travelers-done-card {
  background: #fff;
  border-radius: var(--card-radius, 20px);
  border: 1px solid var(--border-color, #efefef);
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.travelers-form-card .checkout-form-title {
  margin-bottom: 6px;
}

.travelers-form-card .checkout-form-desc {
  margin-bottom: 18px;
}

.travelers-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 16px;
}

.traveler-item {
  background: #fafafa;
  border: 1px solid var(--border-color, #ececec);
  border-radius: 14px;
  padding: 18px;
}

.traveler-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.traveler-item-title {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-dark, #333);
}

.traveler-remove {
  background: none;
  border: none;
  color: #b3b3b3;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  transition: all 0.2s;
  line-height: 1;
}

.traveler-remove:hover {
  color: #b32121;
  background: #fff0f0;
}

.traveler-form-grid {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.2fr 1.4fr;
  gap: 12px;
}

.traveler-form-grid .form-group {
  margin-bottom: 0;
}

.traveler-form-grid select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border-color, #ddd);
  font-size: 15px;
  font-family: var(--font-body, 'Inter', sans-serif);
  background-color: #fff;
  transition: all 0.2s;
}

.traveler-form-grid select:focus {
  border-color: var(--accent-orange, #d97706);
  outline: none;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, 0.1);
}

.travelers-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px dashed var(--accent-orange, #d97706);
  color: var(--accent-orange, #d97706);
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.travelers-add-btn:hover {
  background: #fdf6f0;
  transform: translateY(-1px);
}

/* Done card */
.travelers-done-card {
  display: flex;
  align-items: center;
}

.travelers-done-head {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.travelers-done-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #E6F7EE;
  color: #00A650;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.travelers-done-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.travelers-done-text strong {
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 0.95rem;
  color: var(--text-dark, #222);
}

.travelers-done-text span {
  font-size: 0.82rem;
  color: var(--text-muted, #888);
  font-family: var(--font-body, 'Inter', sans-serif);
}

.travelers-edit-btn {
  background: none;
  border: 1px solid var(--border-color, #e0e0e0);
  color: var(--text-muted, #666);
  padding: 9px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.travelers-edit-btn:hover {
  color: var(--accent-orange, #d97706);
  border-color: var(--accent-orange, #d97706);
  background: #fdf6f0;
}

/* --- Responsive --- */
@media (max-width: 1100px) {
  .payment-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .payment-summary { order: 2; }
  .payment-methods { order: 1; }
  .cart-empty-state { grid-column: span 1; }
}

@media (max-width: 768px) {
  .traveler-form-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .payment-page { padding: 40px 0; }
  .empty-state-card { padding: 40px 24px; }
  .summary-card { padding: 20px; }
  .summary-header { flex-direction: column; gap: 15px; }
  .summary-image { width: 100%; height: 200px; }
  .empty-state-btn { width: 100%; justify-content: center; }
  .traveler-form-grid {
    grid-template-columns: 1fr;
  }
  .travelers-done-head {
    flex-wrap: wrap;
  }
}
