/* Checkout Page Styles */

/* Navigation */
.navbar {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid #f8f9fa;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 5%;
}

.navbar .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}

.nav-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: #2c3e50;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.nav-link:hover {
  color: #27ae60;
  background: #f8faf5;
}

/* Main Layout */
.checkout-main {
  min-height: calc(100vh - 120px);
  background: linear-gradient(135deg, #f8faf5 0%, #ffffff 100%);
  padding: 2rem 0;
}

.checkout-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.checkout-title {
  font-size: 2.5rem;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 700;
  position: relative;
}

.checkout-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: #27ae60;
  border-radius: 2px;
}

/* Back to Shop Button */
.back-to-shop {
  color: #27ae60;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin-bottom: 2rem;
  background: #eafaf1;
  border-radius: 12px;
  padding: 0.8rem 1.5rem;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.1);
  transition: all 0.3s ease;
  font-size: 1rem;
}

.back-to-shop:hover {
  background: #d1f5e2;
  color: #219150;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(39, 174, 96, 0.15);
}

.back-to-shop svg {
  transition: transform 0.3s ease;
}

.back-to-shop:hover svg {
  transform: translateX(-3px);
}

/* Cart Container */
#checkout-cart {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  border: 1px solid #e8f5e8;
}

/* Cart List */
.cart-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Cart Items */
.cart-item {
  background: #f8faf5;
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(39, 174, 96, 0.06);
  transition: all 0.3s ease;
  opacity: 1;
  animation: fadeInCart 0.5s ease;
  border: 1px solid #e8f5e8;
}

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

.cart-item.removing {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.95);
}

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

.cart-item:hover {
  box-shadow: 0 6px 24px rgba(39, 174, 96, 0.13);
  background: #f0f8f4;
  transform: translateY(-2px);
}

/* Cart Item Content */
.cart-item-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cart-item-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.3;
}

.cart-item-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: #27ae60;
  letter-spacing: 0.5px;
}

/* Quantity Controls */
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 0 1.5rem;
  background: #eafaf1;
  border-radius: 12px;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.08);
  border: 1px solid #d1f5e2;
}

.qty-btn {
  background: #fff;
  border: 2px solid #27ae60;
  color: #27ae60;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.1);
}

.qty-btn:active {
  transform: scale(0.95);
}

.qty-btn:hover {
  background: #27ae60;
  color: #fff;
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.2);
}

.qty-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  min-width: 24px;
  text-align: center;
}

/* Remove Button */
.remove-btn {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.1);
  border: 1px solid #fecaca;
}

.remove-btn:hover {
  background: #fca5a5;
  color: #991b1b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.remove-btn:active {
  transform: translateY(0);
}

/* Cart Total */
.cart-total-sep {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, #27ae60, #2ecc71);
  margin: 2rem 0 1.5rem 0;
  border-radius: 1px;
}

.cart-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin: 0;
  padding: 1rem;
  background: #f0f8f4;
  border-radius: 12px;
  border: 2px solid #27ae60;
}

.cart-total-value {
  color: #27ae60;
  font-size: 1.7rem;
}

/* Empty Cart */
.cart-empty {
  text-align: center;
  font-size: 1.2rem;
  color: #6c757d;
  padding: 3rem;
  font-style: italic;
}

.cart-error {
  text-align: center;
  font-size: 1.1rem;
  color: #dc2626;
  padding: 2rem;
  background: #fee2e2;
  border-radius: 12px;
  border: 1px solid #fecaca;
}

/* M-Pesa Payment Section */
.mpesa-instructions {
  background: #ffffff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  border: 2px solid #00a651;
  position: relative;
  overflow: hidden;
}

.mpesa-instructions::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00a651, #27ae60);
}

.mpesa-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #00a651;
  margin-bottom: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.mpesa-title::before {
  content: "📱";
  font-size: 1.3rem;
}

.mpesa-desc {
  font-size: 1rem;
  color: #6c757d;
  margin-bottom: 1.5rem;
  text-align: center;
}

.mpesa-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem;
  margin-bottom: 0.8rem;
  background: #f8faf5;
  border-radius: 12px;
  border: 1px solid #e8f5e8;
  font-size: 1rem;
}

.mpesa-detail strong {
  color: #2c3e50;
  font-weight: 600;
}

.mpesa-paybill,
.mpesa-account,
.mpesa-name {
  font-weight: 700;
  color: #00a651;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  background: #e8f5e8;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.mpesa-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  padding: 1rem;
  background: #f0f8f4;
  border-radius: 12px;
  margin: 1.5rem 0;
  border: 2px solid #27ae60;
}

.mpesa-amount span {
  color: #27ae60;
  font-size: 1.4rem;
}

.mpesa-after {
  background: #e8f5e8;
  padding: 1rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1rem;
  color: #2c3e50;
  border: 1px solid #d1f5e2;
}

.mpesa-whatsapp {
  color: #25d366;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.mpesa-whatsapp:hover {
  color: #128c7e;
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .checkout-container {
    padding: 0 1rem;
  }
  
  .checkout-title {
    font-size: 2rem;
  }
  
  .cart-item {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
    padding: 1.2rem;
  }
  
  .cart-item-main {
    text-align: center;
  }
  
  .qty-controls {
    margin: 0;
    justify-content: center;
  }
  
  .remove-btn {
    align-self: center;
    width: auto;
  }
  
  .mpesa-detail {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .mpesa-paybill,
  .mpesa-account,
  .mpesa-name {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .checkout-main {
    padding: 1rem 0;
  }
  
  #checkout-cart,
  .mpesa-instructions {
    padding: 1.5rem;
  }
  
  .checkout-title {
    font-size: 1.8rem;
  }
  
  .back-to-shop {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}

/* Footer */
.checkout-footer {
  background: #2c3e50;
  color: #ecf0f1;
  padding: 2rem 0 1rem 0;
  margin-top: 3rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.footer-section h3 {
  color: #27ae60;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-section p,
.footer-section a {
  color: #bdc3c7;
  text-decoration: none;
  margin-bottom: 0.5rem;
  display: block;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #27ae60;
}

.footer-bottom {
  border-top: 1px solid #34495e;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: #95a5a6;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
