/* ========================================
   PRANA Checkout Page Styles
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.checkout-page {
  font-family: 'Inter', 'Poppins', sans-serif;
  background: #f8f7f4;
  min-height: 100vh;
}

/* --- Step Indicator --- */
.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0 30px;
  gap: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  background: #e8e5df;
  color: #999;
  transition: all 0.4s ease;
  flex-shrink: 0;
}

.step-circle.active {
  background: linear-gradient(135deg, #1a5c38, #2a7a4e);
  color: #fff;
  box-shadow: 0 4px 15px rgba(26, 92, 56, 0.35);
}

.step-circle.completed {
  background: #c8b78e;
  color: #fff;
}

.step-label {
  font-size: 14px;
  font-weight: 600;
  color: #999;
  transition: color 0.3s;
}

.step-label.active { color: #1a5c38; }
.step-label.completed { color: #c8b78e; }

.step-line {
  width: 80px;
  height: 3px;
  background: #e8e5df;
  margin: 0 15px;
  border-radius: 2px;
  transition: background 0.4s;
}

.step-line.completed {
  background: #c8b78e;
}

/* --- Checkout Container --- */
.checkout-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.checkout-section {
  display: none;
  animation: fadeSlideIn 0.4s ease;
}

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

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: #1a5c38;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 16px;
  color: #888;
  margin-bottom: 35px;
}

/* --- Product Cards --- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.product-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.product-card.selected {
  border-color: #1a5c38;
  box-shadow: 0 8px 25px rgba(26, 92, 56, 0.15);
}

.product-card .product-img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 auto 12px;
  display: block;
  transition: transform 0.3s;
}

.product-card:hover .product-img {
  transform: scale(1.08);
}

.product-card .product-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a5c38, #2a7a4e);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: #fff;
  font-size: 28px;
}

.product-card .product-name {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
}

.product-card .product-subtitle {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-card .product-price {
  font-size: 20px;
  font-weight: 700;
  color: #c8b78e;
  margin-bottom: 14px;
}

/* --- Quantity Controls --- */
.qty-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  color: #1a5c38;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  background: #1a5c38;
  color: #fff;
  border-color: #1a5c38;
}

.qty-value {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  min-width: 24px;
  text-align: center;
}

/* --- Category Headers --- */
.category-header {
  font-size: 22px;
  font-weight: 700;
  color: #1a5c38;
  margin: 30px 0 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8e5df;
}

.category-header:first-of-type {
  margin-top: 0;
}

/* --- Cart Summary Bar --- */
.cart-summary-bar {
  background: #fff;
  border-radius: 16px;
  padding: 20px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-top: 25px;
  position: sticky;
  bottom: 20px;
  z-index: 10;
}

.cart-info {
  font-size: 16px;
  color: #555;
}

.cart-info strong {
  color: #1a5c38;
  font-size: 24px;
}

/* --- Form Styles --- */
.checkout-form {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

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

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

.form-group {
  position: relative;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #1a5c38;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e8e5df;
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  color: #333;
  background: #faf9f7;
  transition: all 0.3s;
  outline: none;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #1a5c38;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 92, 56, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group .error-text {
  color: #e53e3e;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

.form-group.has-error input {
  border-color: #e53e3e;
}

.form-group.has-error .error-text {
  display: block;
}

/* --- Order Summary --- */
.order-summary-card {
  background: #fff;
  border-radius: 20px;
  padding: 35px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.06);
}

.summary-items {
  margin-bottom: 20px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0ede8;
}

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

.summary-item-name {
  font-weight: 600;
  color: #333;
  font-size: 15px;
}

.summary-item-qty {
  color: #888;
  font-size: 14px;
}

.summary-item-price {
  font-weight: 700;
  color: #1a5c38;
  font-size: 16px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0 0;
  border-top: 3px solid #1a5c38;
  margin-top: 10px;
}

.summary-total-label {
  font-size: 20px;
  font-weight: 700;
  color: #333;
}

.summary-total-price {
  font-size: 28px;
  font-weight: 700;
  color: #1a5c38;
}

.summary-customer {
  background: #faf9f7;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
}

.summary-customer h4 {
  font-size: 15px;
  font-weight: 700;
  color: #1a5c38;
  margin-bottom: 10px;
}

.summary-customer p {
  font-size: 14px;
  color: #555;
  line-height: 1.8;
  margin: 0;
}

/* --- Buttons --- */
.btn-checkout {
  background: linear-gradient(135deg, #1a5c38, #2a7a4e);
  color: #fff;
  border: none;
  padding: 16px 40px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-family: inherit;
}

.btn-checkout:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 92, 56, 0.35);
}

.btn-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-checkout.btn-gold {
  background: linear-gradient(135deg, #c8b78e, #b5a47d);
}

.btn-checkout.btn-gold:hover {
  box-shadow: 0 8px 25px rgba(200, 183, 142, 0.35);
}

.btn-outline {
  background: transparent;
  color: #1a5c38;
  border: 2px solid #1a5c38;
  padding: 14px 35px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.btn-outline:hover {
  background: #1a5c38;
  color: #fff;
}

.checkout-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  gap: 15px;
}

/* --- Success Screen --- */
.success-screen {
  text-align: center;
  padding: 60px 20px;
}

.success-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a5c38, #2a7a4e);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes successPop {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.success-icon i {
  font-size: 48px;
  color: #fff;
}

.success-title {
  font-size: 36px;
  font-weight: 700;
  color: #1a5c38;
  margin-bottom: 10px;
}

.success-subtitle {
  font-size: 18px;
  color: #666;
  margin-bottom: 30px;
}

.success-order-number {
  display: inline-block;
  background: #faf9f7;
  padding: 15px 30px;
  border-radius: 12px;
  font-size: 22px;
  font-weight: 700;
  color: #c8b78e;
  letter-spacing: 2px;
  margin-bottom: 40px;
  border: 2px dashed #c8b78e;
}

/* --- Loading Spinner --- */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .step-label { display: none; }
  .step-line { width: 40px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .checkout-form { padding: 25px; }
  .cart-summary-bar { flex-direction: column; gap: 15px; text-align: center; }
  .checkout-actions { flex-direction: column; }
  .section-title { font-size: 24px; }
  .order-summary-card { padding: 20px; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-card { padding: 15px 10px; }
  .product-card .product-img { width: 70px; height: 70px; }
}
