checkout.css 5.66 KB
.checkout-page {
  padding: 2rem 0;
  min-height: 80vh;
}

.checkout-header {
  margin-bottom: 2rem;
  text-align: center;
}

.checkout-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1rem;
}

.checkout-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: all 0.3s ease;
}

.step.active .step-number {
  background: #2c5aa0;
  color: white;
}

.step-name {
  font-size: 0.9rem;
  color: #6c757d;
  font-weight: 500;
}

.step.active .step-name {
  color: #2c5aa0;
}

.step-connector {
  width: 60px;
  height: 2px;
  background: #e9ecef;
  transition: all 0.3s ease;
}

.step-connector.active {
  background: #2c5aa0;
}

.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  align-items: start;
}

.checkout-main {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.checkout-sidebar {
  position: sticky;
  top: 2rem;
}

.order-summary {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.order-summary h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
}

.order-items {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 1.5rem;
}

.order-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #e9ecef;
}

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

.item-image {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

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

.item-details {
  flex: 1;
}

.item-details h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.25rem 0;
}

.item-details p {
  color: #6c757d;
  font-size: 0.9rem;
  margin: 0;
}

.item-price {
  font-weight: 600;
  color: #2c5aa0;
  font-size: 1.1rem;
}

.order-totals {
  border-top: 2px solid #e9ecef;
  padding-top: 1rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  color: #495057;
}

.total-row.grand-total {
  font-size: 1.2rem;
  font-weight: 700;
  color: #212529;
  border-top: 1px solid #e9ecef;
  margin-top: 0.5rem;
  padding-top: 1rem;
}

/* Form Styles */
.shipping-form,
.payment-form,
.order-review {
  max-width: 600px;
}

.shipping-form h2,
.payment-form h2,
.order-review h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: #212529;
  margin-bottom: 2rem;
}

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

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #495057;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2c5aa0;
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
}

.checkbox-group label {
  margin: 0;
  font-weight: 400;
}

.form-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.back-button {
  background: #6c757d;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 1;
}

.back-button:hover {
  background: #545b62;
}

.continue-button,
.place-order-button {
  background: #2c5aa0;
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  flex: 2;
}

.continue-button:hover,
.place-order-button:hover:not(:disabled) {
  background: #1e3d6f;
  transform: translateY(-1px);
}

.place-order-button:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

/* Review Styles */
.review-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.review-section {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.section-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #212529;
  margin: 0;
}

.edit-button {
  background: transparent;
  color: #2c5aa0;
  border: 1px solid #2c5aa0;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.edit-button:hover {
  background: #2c5aa0;
  color: white;
}

.section-content p {
  margin: 0.5rem 0;
  color: #495057;
}

.review-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #dee2e6;
}

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

.review-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #e9ecef;
}

@media (max-width: 768px) {
  .checkout-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .checkout-main {
    padding: 1.5rem;
  }

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

  .form-actions {
    flex-direction: column;
  }

  .checkout-steps {
    flex-wrap: wrap;
  }

  .step-connector {
    display: none;
  }
}