/* Checkout Page Styles */

.checkout-page {
  padding-top: 80px;
  min-height: 100vh;
  background: #fff;
}

.checkout-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 80px;
}

/* Steps */
.checkout-steps {
  display: flex;
  gap: 40px;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.4;
  transition: opacity 0.2s ease;
}

.step.active {
  opacity: 1;
}

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

.step.active .step-number {
  background: #000;
  color: #fff;
  border-color: #000;
}

.step-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* Form */
.form-section {
  display: none;
  margin-bottom: 60px;
}

.form-section.active {
  display: block;
}

.section-title {
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-input {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Checkboxes */
.checkbox-group {
  margin: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Payment Methods */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-option:hover {
  border-color: var(--text);
}

.payment-option input {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.payment-label {
  font-size: 14px;
  font-weight: 500;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 14px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: #000;
  color: #fff;
  margin-top: 32px;
}

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

.btn-secondary {
  background: #f5f5f5;
  color: #000;
  border: 1px solid #ddd;
}

.btn-secondary:hover {
  background: #e8e8e8;
  border-color: #bbb;
}

.btn-large {
  padding: 16px;
  font-size: 13px;
}

.form-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}

/* Sidebar */
.checkout-sidebar {
  height: fit-content;
  position: sticky;
  top: 120px;
}

.order-summary {
  background: #f5f5f5;
  padding: 32px;
  border-radius: 2px;
}

.summary-title {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.summary-items {
  margin-bottom: 24px;
  max-height: 400px;
  overflow-y: auto;
}

.summary-item {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.summary-item:last-child {
  border-bottom: none;
}

.summary-item-image {
  width: 50px;
  aspect-ratio: 3/4;
  background: #ddd;
  border-radius: 2px;
  overflow: hidden;
}

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

.summary-item-info {
  font-size: 12px;
}

.summary-item-name {
  font-weight: 500;
  margin-bottom: 4px;
  line-height: 1.4;
}

.summary-item-meta {
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 4px;
}

.summary-item-price {
  font-weight: 600;
}

.summary-divider {
  height: 1px;
  background: #ddd;
  margin: 16px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 12px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

.shipping-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #ddd;
}

.form-section-divider {
  height: 1px;
  background: #e0e0e0;
  margin: 32px 0 24px;
}

.section-subtitle {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Shipping Options */
.shipping-carrier-option {
  border: 2px solid #e0e0e0;
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.shipping-carrier-option:hover {
  border-color: #999;
  background: #f9f9f9;
}

.shipping-carrier-option.selected {
  border-color: #000;
  background: #f0f8ff;
}

.shipping-carrier-radio {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.shipping-carrier-details {
  flex: 1;
}

.shipping-carrier-name {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.shipping-carrier-info {
  font-size: 13px;
  color: #666;
}

.shipping-carrier-price {
  font-weight: 700;
  font-size: 16px;
  color: #000;
}

.shipping-carriers-loading {
  text-align: center;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 16px;
}

.spinner-border {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spinner-border 0.75s linear infinite;
}

.loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 12px;
}

/* Coupon */
.coupon-section {
  margin-bottom: 24px;
}

.coupon-input-group {
  display: flex;
  gap: 8px;
}

.coupon-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  font-size: 13px;
}

.coupon-button {
  padding: 10px 20px;
  background: #000;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.coupon-button:hover {
  background: #333;
}

.coupon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.coupon-message {
  margin-top: 8px;
  font-size: 12px;
}

.applied-coupon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  border-radius: 4px;
  margin-bottom: 16px;
}

.applied-coupon-code {
  font-weight: 600;
  color: #155724;
}

.remove-coupon-btn {
  background: transparent;
  border: none;
  color: #721c24;
  cursor: pointer;
  font-size: 18px;
}

/* Alert Messages */
.alert {
  padding: 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.alert-warning {
  background: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Animations */
@keyframes spinner-border {
  to { transform: rotate(360deg); }
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Notification Styles */
.checkout-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 400px;
  padding: 16px 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  animation: slideIn 0.3s ease;
}

.checkout-notification--warning {
  border-left: 4px solid #f59e0b;
}

.checkout-notification--info {
  border-left: 4px solid #3b82f6;
}

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

.checkout-notification__icon {
  font-size: 20px;
}

.checkout-notification__message {
  flex: 1;
  color: #1f2937;
  font-size: 14px;
  line-height: 1.5;
}

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

  .checkout-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .checkout-container {
    padding: 40px 16px;
  }

  .checkout-steps {
    gap: 20px;
    margin-bottom: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-buttons {
    grid-template-columns: 1fr;
  }

  .step-label {
    display: none;
  }
}
