/* Checkout Page Specific Styles — Wyatt Rhodes (Exactly matching reference design) */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(170deg, #060810 0%, #0a1018 30%, #10141e 60%, #060810 100%);
  color: #e8ddd0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: hidden;
}

/* Header */
.header {
  width: 100%;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(6, 8, 16, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201, 168, 76, 0.08);
  z-index: 100;
}

.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  color: #c9a84c;
  letter-spacing: 2px;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.logo:hover {
  opacity: 0.8;
}

.secure-badge {
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8a7a6a;
  display: flex;
  align-items: center;
  gap: 6px;
}

.secure-badge svg {
  width: 14px;
  height: 14px;
  fill: #c9a84c;
}

/* Main Content Container */
.checkout-wrapper {
  width: 100%;
  max-width: 560px;
  margin: 40px auto;
  padding: 0 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Luxury Light Card (Ivory) */
.checkout-card {
  width: 100%;
  background: #fbfaf7;
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  min-height: 650px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #1a1612;
}

/* Product Header Styling */
.checkout-product-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(201, 168, 76, 0.1);
}

.product-info {
  flex: 1;
  text-align: left;
}

.product-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a7a6a;
  display: block;
  margin-bottom: 4px;
}

.product-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-weight: 600;
  color: #1a1612;
  line-height: 1.2;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: #a0802e;
  margin-left: 16px;
}

/* Order Bump Styling (Light mode with cover image & scarcity) */
.order-bump {
  background: #f4f0e6;
  border: 1px dashed rgba(201, 168, 76, 0.5);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.order-bump:hover {
  background: #ede8dc;
  border-color: rgba(201, 168, 76, 0.7);
}

.order-bump.active {
  background: #eae3d2;
  border: 1px solid #c9a84c;
}

.order-bump-image {
  width: 48px;
  height: 62px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(201, 168, 76, 0.15);
  flex-shrink: 0;
}

.order-bump-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-bump-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(201, 168, 76, 0.6);
  border-radius: 4px;
  background: transparent;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.order-bump-checkbox:checked {
  background: #c9a84c;
  border-color: #c9a84c;
}

.order-bump-checkbox::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.order-bump-checkbox:checked::after {
  opacity: 1;
}

.order-bump-content {
  flex: 1;
  text-align: left;
}

.order-bump-badge {
  display: inline-block;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: #c9a84c;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.order-bump-title {
  font-size: 14px;
  font-weight: 600;
  color: #1a1612;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.order-bump-price-tag {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.price-old {
  color: #8a7a6a;
  text-decoration: line-through;
  opacity: 0.6;
  font-weight: 500;
}

.price-new {
  color: #a0802e;
  font-weight: 700;
}

.order-bump-description {
  font-size: 11px;
  color: #5a4a3a;
  line-height: 1.4;
}

/* Embedded checkout container */
.embed-container {
  width: 100%;
  flex: 1;
  min-height: 480px;
  position: relative;
}

/* Loading skeleton while embed initializes */
.checkout-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  z-index: 5;
  background: #fbfaf7;
  transition: opacity 0.4s ease;
}

.checkout-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(201, 168, 76, 0.15);
  border-top-color: #c9a84c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-text {
  font-size: 13px;
  color: #8a7a6a;
  letter-spacing: 1px;
}

/* Success overlay */
.checkout-success {
  display: none;
  position: absolute;
  inset: 0;
  background: #fbfaf7;
  border-radius: 16px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 10;
  animation: fadeIn 0.5s ease;
}

.checkout-success.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #c9a84c, #a0802e);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}

.success-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  color: #1a1612;
}

.success-text {
  font-size: 14px;
  color: #5a4a3a;
  text-align: center;
  max-width: 300px;
  line-height: 1.6;
}

.success-redirect {
  font-size: 12px;
  color: #8a7a6a;
  margin-top: 8px;
}

/* Trust Section under checkout */
.trust-footer {
  width: 100%;
  max-width: 560px;
  padding: 40px 20px;
  text-align: center;
  margin-top: auto;
}

.trust-items {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  color: #8a7a6a;
  font-size: 13px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-item svg {
  width: 16px;
  height: 16px;
  fill: #c9a84c;
  opacity: 0.7;
}

.payment-methods {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.payment-methods span {
  font-size: 12px;
  color: #5a4a3a;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.copyright {
  font-size: 11px;
  color: #5a4a3a;
  letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header {
    padding: 16px 20px;
  }

  .checkout-wrapper {
    margin: 20px auto;
    padding: 0 12px;
  }

  .checkout-card {
    padding: 20px 16px;
    min-height: 600px;
    border-radius: 16px;
  }

  .trust-items {
    gap: 16px;
    flex-direction: column;
    align-items: center;
  }

  .payment-methods {
    gap: 12px;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .checkout-wrapper {
    margin: 0 auto;
    padding: 0;
    max-width: 100%;
  }

  .checkout-card {
    border: none;
    border-radius: 0;
    padding: 16px 12px;
    box-shadow: none;
    min-height: 100vh;
  }

  .order-bump {
    padding: 12px;
    gap: 12px;
  }

  .order-bump-image {
    width: 40px;
    height: 52px;
  }

  .checkout-product-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .product-name {
    font-size: 18px;
  }

  .product-price {
    font-size: 18px;
  }
}
