/* Checkout Page Styles - Shopify Style */

.checkout-page {
  background-color: #f6f6f7;
  min-height: 100vh;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.checkout-main {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.checkout-container {
  background-color: #fff;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.checkout-header {
  padding: 20px 40px;
  border-bottom: 1px solid #e1e3e5;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.checkout-logo {
  display: inline-block;
}

.logo-image {
  height: 40px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-contact {
  text-align: right;
}

.header-contact p {
  font-size: 14px;
  color: #6b7280;
  margin: 2px 0;
}

.header-contact a {
  color: #1990c6;
  text-decoration: none;
}

.header-contact a:hover {
  text-decoration: underline;
}

.cart-icon {
  color: #202223;
  cursor: pointer;
}

/* Main Content */
.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 0;
  max-width: 1400px;
  margin: 0 auto;
  background: #f6f6f7;
}

/* Left Column - Form */
.checkout-form-section {
  padding: 40px;
  background: #fff;
  border-right: 1px solid #e1e3e5;
}

.checkout-section {
  margin-bottom: 32px;
}

.checkout-section:last-child {
  margin-bottom: 0;
}

/* Express Checkout */
.express-checkout-section {
  text-align: center;
}

.section-title-center {
  font-size: 18px;
  font-weight: 600;
  color: #202223;
  margin: 0 0 16px 0;
  text-align: center;
}

.express-checkout-buttons {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.express-btn {
  flex: 1;
  padding: 14px 20px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.shop-pay-btn {
  background: #5a31f4;
  color: #fff;
  border-color: #5a31f4;
}

.shop-pay-btn:hover {
  background: #4a28d4;
}

.paypal-btn {
  background: #ffc439;
  color: #000;
  border-color: #ffc439;
}

.paypal-btn:hover {
  background: #ffb800;
}

.gpay-btn {
  background: #000;
  color: #fff;
  border-color: #000;
}

.gpay-btn:hover {
  background: #333;
}

.divider {
  position: relative;
  text-align: center;
  margin: 24px 0;
}

.divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #e1e3e5;
}

.divider span {
  position: relative;
  background: #fff;
  padding: 0 16px;
  color: #6b7280;
  font-size: 14px;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #202223;
  margin: 0;
}

.sign-in-link {
  font-size: 14px;
  color: #1990c6;
  text-decoration: none;
}

.sign-in-link:hover {
  text-decoration: underline;
}

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

.form-group-third {
  width: calc(33.333% - 11px);
  display: inline-block;
}

.form-group-two-thirds {
  width: calc(66.666% - 5px);
  display: inline-block;
  margin-left: 16px;
}

.form-group-half {
  width: calc(50% - 8px);
  display: inline-block;
}

.form-group-half:first-child {
  margin-right: 16px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #202223;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #1990c6;
  box-shadow: 0 0 0 1px #1990c6;
}

.form-input::placeholder {
  color: #9ca3af;
}

.form-input.field-error {
  border-color: #d32f2f;
  box-shadow: 0 0 0 1px #d32f2f;
}

.form-input.field-error:focus {
  border-color: #d32f2f;
  box-shadow: 0 0 0 1px #d32f2f;
}

.error-message {
  display: block;
  color: #d32f2f;
  font-size: 12px;
  margin-top: 4px;
  line-height: 1.4;
}

.form-input-disabled {
  background: #f6f6f7;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Input with Icon */
.input-with-icon {
  position: relative;
}

.input-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon .form-input {
  padding-right: 40px;
}

/* Input with Prefix */
.input-with-prefix {
  position: relative;
}

.input-prefix {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 16px;
  pointer-events: none;
}

.input-with-prefix .form-input {
  padding-left: 40px;
}

/* Secure Note */
.secure-note {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

/* Payment Logos Header */
.payment-logos-header {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
  padding: 12px 0;
}

.payment-logos {
  display: flex;
  gap: 8px;
  align-items: center;
}

.payment-logo {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 2px;
  background: #f6f6f7;
  color: #202223;
}

.payment-logo.visa {
  background: #1a1f71;
  color: #fff;
}

.payment-logo.mastercard {
  background: #000;
  color: #fff;
}

.payment-logo.amex {
  background: #006fcf;
  color: #fff;
}

.payment-logo.unionpay {
  background: #e21836;
  color: #fff;
}

.payment-logo.paypal {
  background: #1b9bd7;
  color: #fff;
}

/* Card Form */
.card-form {
  margin-top: 16px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 4px;
}

/* Checkbox */
.checkbox-group {
  margin-top: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #202223;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Remember Section */
.remember-section {
  background: #f9fafb;
  padding: 24px;
  border-radius: 4px;
}

/* Complete Purchase Section */
.complete-section {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid #e1e3e5;
}

.complete-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.secure-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.secure-badge svg {
  width: 16px;
  height: 16px;
}

.shop-badge {
  font-size: 14px;
  font-weight: 500;
  color: #5a31f4;
}

.complete-purchase-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #1990c6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 12px;
}

.complete-purchase-btn:hover {
  background: #1478a0;
}

.complete-purchase-btn:active {
  background: #0f5f7a;
}

.complete-footer {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  line-height: 1.5;
  margin: 0;
}

.complete-footer a {
  color: #1990c6;
  text-decoration: none;
}

.complete-footer a:hover {
  text-decoration: underline;
}

/* Right Column - Summary */
.checkout-summary {
  padding: 40px;
  background: #f6f6f7;
  position: sticky;
  top: 0;
  height: fit-content;
  max-height: 100vh;
  overflow-y: auto;
}

.summary-content {
  background: #fff;
  border-radius: 4px;
  padding: 24px;
}

/* Product Summary */
.summary-product {
  display: flex;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e1e3e5;
  margin-bottom: 24px;
}

.product-image-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.product-quantity {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #000;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.product-details {
  flex: 1;
}

.product-name {
  font-size: 14px;
  font-weight: 500;
  color: #202223;
  margin: 0 0 8px 0;
}

.product-price {
  font-size: 16px;
  font-weight: 600;
  color: #202223;
  margin: 0;
}

/* Summary Totals */
.summary-totals {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #202223;
}

.summary-total {
  font-size: 18px;
  font-weight: 600;
  padding-top: 12px;
  border-top: 1px solid #e1e3e5;
  margin-top: 12px;
}

.summary-value {
  font-weight: 500;
}

.summary-total .summary-value {
  font-weight: 600;
}

.shipping-placeholder {
  color: #9ca3af;
  font-weight: 400;
}

/* Footer */
.checkout-footer {
  padding: 32px 40px;
  background: #fff;
  border-top: 1px solid #e1e3e5;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
}

.footer-link:hover {
  color: #1990c6;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .checkout-content {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: relative;
    border-top: 1px solid #e1e3e5;
  }

  .checkout-form-section {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .checkout-header {
    padding: 16px 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .header-left {
    width: 100%;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .checkout-form-section,
  .checkout-summary {
    padding: 24px 20px;
  }

  .form-group-third,
  .form-group-two-thirds,
  .form-group-half {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .express-checkout-buttons {
    flex-direction: column;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .section-title {
    font-size: 16px;
  }

  .complete-purchase-btn {
    padding: 14px;
    font-size: 15px;
  }

  .summary-content {
    padding: 16px;
  }
}
