/* Checkout Flow Styles (From UI 2 Showcase) */

.checkout-page-view {
  background-color: var(--bg-cream);
  padding: 40px 0 80px;
}

/* Single-Line Checkout Header Title */
.checkout-main-header {
  text-align: left !important;
  max-width: 100% !important;
  margin: 0 0 28px 0 !important;
}

.checkout-main-title {
  font-size: clamp(1.75rem, 2.7vw, 2.65rem) !important;
  white-space: nowrap !important;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin-bottom: 8px;
}

@media (max-width: 820px) {
  .checkout-main-title {
    white-space: normal !important;
    font-size: 1.65rem !important;
  }
}

.checkout-page-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 40px;
  align-items: start;
}

.checkout-form-container {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 36px;
  border: 1px solid var(--honey-border);
  box-shadow: var(--shadow-md);
}

/* Step Bar */
.checkout-steps-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  position: relative;
}

.checkout-steps-bar::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: #e5e7eb;
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-light);
  transition: all var(--transition-fast);
}

.step-node.active .step-circle {
  border-color: var(--honey-primary);
  background: var(--honey-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(229, 155, 32, 0.4);
}

.step-node.completed .step-circle {
  border-color: #10b981;
  background: #10b981;
  color: #ffffff;
}

.step-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-light);
}

.step-node.active .step-title {
  color: var(--forest-dark);
}

/* Form Sections */
.form-step-block {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-step-block h3 {
  font-size: 1.4rem;
  color: var(--forest-dark);
  margin-bottom: 4px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--forest-dark);
}

.form-input {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: var(--bg-cream);
  font-size: 0.95rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--honey-primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(229, 155, 20, 0.15);
}

select.form-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2318261e' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 13px 13px;
  cursor: pointer;
}

/* Shipping Method Selection Cards */
.shipping-options-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shipping-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.shipping-option-card.active, .shipping-option-card:hover {
  border-color: var(--honey-primary);
  background: var(--honey-light);
}

/* Payment Methods Grid */
.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.payment-method-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #ffffff;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-method-card:hover {
  border-color: var(--honey-primary);
  background: var(--honey-light);
}

.payment-method-card.active {
  border-color: var(--honey-primary);
  background: var(--honey-light);
  box-shadow: 0 6px 18px rgba(229, 155, 32, 0.2);
}

.payment-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--forest-dark);
}

.payment-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Checkout Live Summary Sidebar */
.checkout-summary-sidebar {
  position: sticky;
  top: 100px;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 32px;
  border: 1px solid var(--honey-border);
  box-shadow: var(--shadow-md);
}

.checkout-items-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 6px;
}

.checkout-item-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.checkout-item-thumb {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.checkout-item-info {
  flex-grow: 1;
}

.checkout-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--forest-dark);
}

.checkout-item-meta {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.checkout-item-price {
  font-family: var(--font-serif);
  font-weight: 800;
  color: var(--forest-dark);
  font-size: 0.95rem;
}

/* Order Confirmation Modal */
.order-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(13, 40, 26, 0.7);
  backdrop-filter: blur(8px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.order-confirm-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.order-receipt-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 560px;
  width: 100%;
  padding: 40px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  text-align: center;
  position: relative;
  border: 2px solid var(--honey-border);
  max-height: 90vh;
  overflow-y: auto;
}

.confirm-icon-hex {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

.confirm-icon-hex svg {
  width: 36px;
  height: 36px;
}

.receipt-details-table {
  width: 100%;
  margin: 24px 0;
  text-align: left;
  border-collapse: collapse;
}

.receipt-details-table td {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 0.92rem;
}

.receipt-details-table td:last-child {
  text-align: right;
  font-weight: 700;
  color: var(--forest-dark);
}

@media (max-width: 992px) {
  .checkout-page-grid {
    grid-template-columns: 1fr;
  }
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
  .payment-methods-grid {
    grid-template-columns: 1fr;
  }
}

/* Checkout Authentication Gate Card */
.checkout-auth-gate-card {
  background: linear-gradient(180deg, #ffffff 0%, #fffdfa 100%);
  border-radius: var(--radius-xl);
  padding: 44px 36px;
  border: 1.5px solid var(--honey-border);
  box-shadow: 0 15px 40px rgba(180, 83, 9, 0.08);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.checkout-auth-gate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #d97706, #10b981);
}

.checkout-gate-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b45309;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.2);
}

.checkout-gate-icon svg {
  width: 32px;
  height: 32px;
}

.checkout-gate-actions {
  display: flex;
  gap: 14px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .checkout-gate-actions {
    flex-direction: column;
  }
}

.checkout-demo-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.checkout-gate-perks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 640px) {
  .checkout-gate-perks {
    grid-template-columns: 1fr;
  }
}

.checkout-perk-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--forest-dark);
  text-align: center;
}

.checkout-perk-item .perk-icon {
  font-size: 1.35rem;
}

/* Logged-In User Banner on Checkout */
.checkout-user-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fdfaf3;
  border: 1px solid #fed7aa;
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.user-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.3);
  flex-shrink: 0;
}
