/* Page Checkout */
.checkout-page {
  min-height: 100vh;
  background-color: var(--neutral-cream, #faf8f5);
  padding: 40px 0;
}

.checkout-header {
  text-align: center;
  margin-bottom: 40px;
}

.checkout-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 2.5rem;
  color: var(--primary-gold, #d4a574);
  margin-bottom: 10px;
}

.checkout-subtitle {
  color: var(--text-primary, #0f0f0f);
  font-size: 1.1rem;
}

.checkout-content {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Formulaire de facturation */
.billing-section {
  background: var(--neutral-white, #ffffff);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 1.8rem;
  color: var(--primary-gold, #d4a574);
  margin-bottom: 25px;
  border-bottom: 2px solid var(--primary-gold, #d4a574);
  padding-bottom: 12px;
}

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

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

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary, #0f0f0f);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e8d4cc;
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-primary, #0f0f0f);
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-gold, #d4a574);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.1);
}

.form-input.error {
  border-color: #e74c3c;
}

.form-input[type="textarea"],
.form-input {
  resize: vertical;
}

.error-message {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-top: 5px;
  display: block;
}

/* Fix address field overflow - add word-wrap */
.form-input[type="text_area"],
textarea.form-input {
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* Résumé de commande */
.order-summary {
  background: var(--neutral-white, #ffffff);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.order-items {
  margin-bottom: 25px;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #e8d4cc;
}

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

.order-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

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

.order-item-name {
  font-weight: 600;
  color: var(--text-primary, #0f0f0f);
  margin-bottom: 5px;
  word-wrap: break-word;
}

.order-item-details {
  color: var(--text-secondary, #a0908a);
  font-size: 0.9rem;
  margin: 0;
}

.order-item-total {
  font-weight: 600;
  color: var(--primary-gold, #d4a574);
  flex-shrink: 0;
}

/* Totaux */
.order-totals {
  border-top: 2px solid #e8d4cc;
  padding-top: 20px;
  margin-bottom: 25px;
}

.total-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--text-primary, #0f0f0f);
}

.total-final {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-gold, #d4a574);
  border-top: 1px solid #e8d4cc;
  padding-top: 15px;
  margin-top: 15px;
}

/* Méthode de paiement */
.payment-method {
  margin-bottom: 30px;
}

.payment-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary, #0f0f0f);
  margin-bottom: 15px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 2px solid #e8d4cc;
  border-radius: 8px;
  background: #faf8f5;
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

.payment-option input:checked + .payment-label {
  color: var(--primary-gold, #d4a574);
}

.payment-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--text-primary, #0f0f0f);
  cursor: pointer;
}

.payment-label svg {
  width: 20px;
  height: 20px;
  color: var(--primary-gold, #d4a574);
}

/* Texte informatif */
.checkout-info-text {
  background: #f5f1ed;
  border: 1px solid #e8d4cc;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
}

.checkout-info-text p {
  margin: 0;
  color: var(--text-primary, #0f0f0f);
  font-size: 0.95rem;
}

/* Bouton de commande */
.checkout-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary-gold, #d4a574), var(--secondary-gold, #b8956a));
  color: var(--neutral-white, #ffffff);
  border: none;
  padding: 16px 24px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.checkout-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 165, 116, 0.3);
}

.checkout-submit-btn svg {
  width: 20px;
  height: 20px;
  color: var(--neutral-white, #ffffff);
}

/* Page de confirmation */
.order-confirmation-page {
  min-height: 100vh;
  background-color: var(--neutral-cream, #faf8f5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.confirmation-content {
  background: var(--neutral-white, #ffffff);
  padding: 50px;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  text-align: center;
  max-width: 700px;
  width: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-gold, #d4a574), var(--secondary-gold, #b8956a));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  color: var(--neutral-white, #ffffff);
}

/* Info de livraison */
.delivery-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  background: #f5f1ed;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
  border: 2px solid #e8d4cc;
}

.delivery-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-gold, #d4a574), var(--secondary-gold, #b8956a));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.delivery-icon svg {
  width: 24px;
  height: 24px;
  color: var(--neutral-white, #ffffff);
}

.delivery-text {
  text-align: left;
}

.delivery-text h3 {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 1.2rem;
  color: var(--primary-gold, #d4a574);
  margin: 0 0 5px 0;
}

.delivery-text p {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #0f0f0f);
  margin: 0;
}

.confirmation-title {
  font-family: var(--font-heading, "Playfair Display", serif);
  font-size: 2.2rem;
  color: var(--primary-gold, #d4a574);
  margin-bottom: 15px;
}

.confirmation-subtitle {
  color: var(--text-primary, #0f0f0f);
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.order-details {
  text-align: left;
  background: #f5f1ed;
  padding: 25px;
  border-radius: 8px;
  margin-bottom: 30px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.order-details h2 {
  font-size: 1.3rem;
  color: var(--primary-gold, #d4a574);
  margin-bottom: 15px;
}

.order-info p {
  margin-bottom: 8px;
  color: var(--text-primary, #0f0f0f);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Add notes section styling */
.order-notes {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e8d4cc;
}

.order-notes p {
  margin: 0;
  color: var(--text-primary, #0f0f0f);
  font-size: 0.95rem;
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.order-items-summary {
  margin-top: 20px;
}

.order-items-summary h3 {
  font-size: 1.1rem;
  color: var(--primary-gold, #d4a574);
  margin-bottom: 10px;
}

.confirmation-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #e8d4cc;
  gap: 10px;
}

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

.item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.item-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.item-meta {
  color: var(--text-secondary, #a0908a);
  font-size: 0.9rem;
}

.item-total {
  font-weight: 600;
  color: var(--primary-gold, #d4a574);
  flex-shrink: 0;
  white-space: nowrap;
}

.confirmation-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-gold, #d4a574), var(--secondary-gold, #b8956a));
  color: var(--neutral-white, #ffffff);
}

.btn-secondary {
  background: #b8956a;
  color: var(--neutral-white, #ffffff);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

  .order-summary {
    position: static;
  }
}

@media (max-width: 768px) {
  .checkout-page {
    padding: 20px 0;
  }

  .checkout-title {
    font-size: 2rem;
  }

  .billing-section,
  .order-summary {
    padding: 20px;
  }

  .section-title {
    font-size: 1.5rem;
  }

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

  .confirmation-content {
    padding: 30px 20px;
    max-width: 100%;
  }

  .confirmation-title {
    font-size: 1.8rem;
  }

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

  .delivery-info {
    flex-direction: column;
    text-align: center;
  }

  .delivery-text {
    text-align: center;
  }

  .confirmation-item {
    flex-wrap: wrap;
  }

  .item-image {
    width: 50px;
    height: 50px;
  }

  .order-details {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .checkout-content {
    padding: 0 15px;
  }

  .billing-section,
  .order-summary {
    padding: 15px;
  }

  .form-input {
    font-size: 16px;
  }

  .confirmation-content {
    padding: 20px 15px;
  }

  .confirmation-actions {
    flex-direction: column;
    gap: 10px;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }
}
