/* Checkout Page Styles - Shopify-like Design */

.checkout-page {
  min-height: 100vh;
  background-color: #fff;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.checkout-container {
  display: flex;
  min-height: 100vh;
}

/* Main Content Area */
.checkout-main {
  flex: 1;
  max-width: 660px;
  margin-left: auto;
  padding: 40px 50px;
  box-sizing: border-box;
}

/* Sidebar */
.checkout-sidebar {
  width: 42%;
  min-width: 400px;
  background-color: #fafafa;
  border-left: 1px solid #e1e1e1;
  padding: 40px 50px;
  box-sizing: border-box;
}

/* Logo */
.checkout-header {
  margin-bottom: 24px;
}

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

.checkout-logo-img {
  height: 32px;
  width: auto;
}

/* Breadcrumb */
.checkout-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 12px;
}

.breadcrumb-link {
  color: #1773b0;
  text-decoration: none;
}

.breadcrumb-link:hover {
  text-decoration: underline;
}

.breadcrumb-active {
  color: #333;
  font-weight: 500;
}

.breadcrumb-inactive {
  color: #999;
}

.breadcrumb-separator {
  color: #999;
}

/* Express Checkout */
.express-checkout {
  margin-bottom: 24px;
}

.express-label {
  text-align: center;
  color: #737373;
  margin-bottom: 12px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.paypal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  background-color: #ffc439;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.paypal-btn:hover {
  background-color: #f0b700;
}

.paypal-logo {
  height: 24px;
}

.checkout-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
}

.checkout-divider::before,
.checkout-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background-color: #e1e1e1;
}

.checkout-divider span {
  padding: 0 16px;
  color: #737373;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.checkout-section-title {
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 16px;
  color: #333;
}

.checkout-section-desc {
  color: #737373;
  font-size: 13px;
  margin: -8px 0 16px;
}

.checkout-login-link {
  font-size: 13px;
  color: #737373;
}

.checkout-login-link a {
  color: #1773b0;
  text-decoration: none;
}

.checkout-login-link a:hover {
  text-decoration: underline;
}

/* Form Fields */
.checkout-field {
  position: relative;
  margin-bottom: 16px;
}

.checkout-input {
  width: 100%;
  height: 54px;
  padding: 20px 12px 8px;
  font-size: 16px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-input:focus {
  outline: none;
  border-color: #1773b0;
  box-shadow: 0 0 0 1px #1773b0;
}

.checkout-input:focus + .checkout-label,
.checkout-input:not(:placeholder-shown) + .checkout-label {
  top: 8px;
  font-size: 12px;
  color: #737373;
}

.checkout-label {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #737373;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.15s ease;
  background: #fff;
  padding: 0 4px;
}

.checkout-label-select {
  top: 8px;
  font-size: 12px;
}

.checkout-select {
  width: 100%;
  height: 54px;
  padding: 20px 12px 8px;
  font-size: 16px;
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M2 4l4 4 4-4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none;
  cursor: pointer;
  box-sizing: border-box;
}

.checkout-select:focus {
  outline: none;
  border-color: #1773b0;
  box-shadow: 0 0 0 1px #1773b0;
}

.checkout-row {
  display: flex;
  gap: 12px;
}

.checkout-row .checkout-field {
  flex: 1;
}

.checkout-field-hint,
.checkout-field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #737373;
}

/* Checkbox */
.checkout-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.checkout-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: #1773b0;
}

.checkout-checkbox label {
  font-size: 14px;
  color: #545454;
  cursor: pointer;
}

/* Shipping Options */
.shipping-options-checkout,
.payment-options-checkout {
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  overflow: hidden;
}

.shipping-option-checkout,
.payment-option-checkout {
  display: flex;
  align-items: center;
  padding: 16px;
  cursor: pointer;
  border-bottom: 1px solid #d9d9d9;
  transition: background-color 0.15s;
}

.shipping-option-checkout:last-child,
.payment-option-checkout:last-child {
  border-bottom: none;
}

.shipping-option-checkout:hover,
.payment-option-checkout:hover {
  background-color: #fafafa;
}

.shipping-option-checkout.is-selected,
.payment-option-checkout.is-selected {
  background-color: #f0f9ff;
}

.shipping-option-checkout input,
.payment-option-checkout input {
  display: none;
}

.radio-custom {
  width: 18px;
  height: 18px;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  margin-right: 12px;
  position: relative;
  flex-shrink: 0;
}

.shipping-option-checkout.is-selected .radio-custom,
.payment-option-checkout.is-selected .radio-custom {
  border-color: #1773b0;
}

.shipping-option-checkout.is-selected .radio-custom::after,
.payment-option-checkout.is-selected .radio-custom::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  background: #1773b0;
  border-radius: 50%;
}

.option-label {
  flex: 1;
}

.option-name {
  display: block;
  font-weight: 500;
  color: #333;
}

.option-time {
  display: block;
  font-size: 13px;
  color: #737373;
}

.option-price {
  font-weight: 500;
  color: #333;
}

.payment-icons {
  display: flex;
  gap: 4px;
}

.payment-icons img {
  height: 24px;
  width: auto;
}

/* Card Form */
.card-form {
  background-color: #fafafa;
  padding: 16px;
  margin-top: -1px;
  border: 1px solid #d9d9d9;
  border-top: none;
  border-radius: 0 0 5px 5px;
}

.card-form .checkout-input {
  background: #fff;
}

/* Review Block */
.review-block {
  border: 1px solid #d9d9d9;
  border-radius: 5px;
  overflow: hidden;
}

.review-row {
  display: flex;
  padding: 12px 16px;
  border-bottom: 1px solid #d9d9d9;
  align-items: flex-start;
}

.review-row:last-child {
  border-bottom: none;
}

.review-label {
  width: 80px;
  color: #737373;
  font-size: 13px;
  flex-shrink: 0;
}

.review-value {
  flex: 1;
  font-size: 13px;
  color: #333;
}

.review-edit {
  background: none;
  border: none;
  color: #1773b0;
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  margin-left: 16px;
}

.review-edit:hover {
  text-decoration: underline;
}

/* Navigation */
.checkout-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e1e1e1;
}

.checkout-back {
  color: #1773b0;
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.checkout-back:hover {
  text-decoration: underline;
}

.checkout-btn {
  padding: 18px 28px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.checkout-btn-primary {
  background-color: #1773b0;
  color: #fff;
}

.checkout-btn-primary:hover {
  background-color: #155d8c;
}

.checkout-btn-primary:disabled {
  background-color: #c8c8c8;
  cursor: not-allowed;
}

.checkout-btn-secondary {
  background-color: #e1e1e1;
  color: #333;
}

.checkout-btn-secondary:hover {
  background-color: #d1d1d1;
}

/* Footer */
.checkout-footer {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid #e1e1e1;
}

.checkout-footer-links {
  display: flex;
  gap: 16px;
}

.checkout-footer-links a {
  color: #1773b0;
  font-size: 12px;
  text-decoration: none;
}

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

/* Sidebar - Order Summary */
.checkout-summary {
  position: sticky;
  top: 40px;
}

.checkout-items {
  padding-bottom: 24px;
  border-bottom: 1px solid #e1e1e1;
}

.checkout-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

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

.checkout-item-image {
  position: relative;
  width: 64px;
  height: 64px;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
}

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

.checkout-item-qty {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #737373;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-item-info {
  flex: 1;
  min-width: 0;
}

.checkout-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
  line-height: 1.3;
}

.checkout-item-variant {
  font-size: 12px;
  color: #737373;
}

.checkout-item-price {
  font-size: 14px;
  color: #333;
  flex-shrink: 0;
}

/* Discount */
.checkout-discount {
  display: flex;
  gap: 12px;
  padding: 24px 0;
  border-bottom: 1px solid #e1e1e1;
}

.checkout-discount .checkout-input {
  flex: 1;
  height: 48px;
  padding: 12px;
}

.checkout-discount .checkout-btn {
  padding: 12px 20px;
}

/* Totals */
.checkout-totals {
  padding-top: 24px;
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
  color: #545454;
}

.checkout-total-row .checkout-help {
  color: #999;
  margin-left: 4px;
  vertical-align: middle;
}

.checkout-total-final {
  padding-top: 16px;
  border-top: 1px solid #e1e1e1;
  font-size: 16px;
  color: #333;
}

.checkout-currency {
  font-size: 12px;
  color: #737373;
  margin-left: 4px;
}

.checkout-total-amount {
  font-size: 24px;
  font-weight: 500;
}

.checkout-vat {
  font-size: 12px;
  color: #737373;
  text-align: right;
  margin-top: 4px;
}

/* Empty State */
.checkout-empty {
  text-align: center;
  padding: 80px 20px;
}

.checkout-empty h2 {
  margin-bottom: 8px;
}

.checkout-empty p {
  color: #737373;
  margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 999px) {
  .checkout-container {
    flex-direction: column-reverse;
  }
  
  .checkout-main {
    max-width: none;
    margin: 0;
    padding: 24px;
  }
  
  .checkout-sidebar {
    width: 100%;
    min-width: auto;
    border-left: none;
    border-bottom: 1px solid #e1e1e1;
    padding: 24px;
  }
  
  .checkout-summary {
    position: static;
  }
  
  .checkout-nav {
    flex-direction: column-reverse;
    gap: 16px;
  }
  
  .checkout-btn-primary {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .checkout-row {
    flex-direction: column;
    gap: 0;
  }
}

