/* Checkout Page Styles */

* {
  box-sizing: border-box;
}

body {
  background: #f5f5f5;
  font-family: 'Inter', sans-serif;
}

/* Header */
.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.checkout-header .back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1f2937;
  text-decoration: none;
  font-size: 18px;
}

.checkout-header h1 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

/* Main Content */
.checkout-page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-container {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

/* Sections */
.checkout-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.checkout-section h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-section h3 i {
  color: #667eea;
}

/* Form Groups */
.form-group {
  margin-bottom: 12px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
  color: #9ca3af;
}

.input-prefix {
  display: flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.input-prefix span {
  padding: 14px 12px;
  background: #f9fafb;
  color: #6b7280;
  font-size: 15px;
  border-right: 1px solid #e5e7eb;
}

.input-prefix input {
  border: none;
  border-radius: 0;
}

.input-prefix input:focus {
  box-shadow: none;
}

/* Address Select */
.address-select,
.store-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.address-select:hover,
.store-select:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.address-select span,
.store-select span {
  color: #6b7280;
}

/* Delivery Tabs */
.delivery-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.delivery-tab {
  flex: 1;
  padding: 12px 16px;
  border: none;
  background: white;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.delivery-tab.active {
  background: #1f2937;
  color: white;
}

.delivery-content {
  display: none;
}

.delivery-content.active {
  display: block;
}

/* Order Items */
.order-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-item {
  display: flex;
  gap: 12px;
}

.order-item img {
  width: 70px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  background: #f3f4f6;
}

.order-item-info {
  flex: 1;
}

.order-item-info h4 {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  margin: 0 0 4px 0;
}

.order-item-info p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* Right Column */
.checkout-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 80px;
  height: fit-content;
}

/* Promo Section */
.promo-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.promo-section:hover {
  background: #f9fafb;
}

.promo-section i:first-child {
  color: #667eea;
  font-size: 18px;
}

.promo-section span {
  flex: 1;
  color: #667eea;
  font-weight: 500;
}

.promo-section i:last-child {
  color: #9ca3af;
}

/* Payment Section */
.payment-section {
  background: white;
  border-radius: 12px;
  overflow: hidden;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  border: 2px solid transparent;
  border-radius: 10px;
  margin-bottom: 8px;
}

.payment-option:hover {
  background: #f9fafb;
}

.payment-option.active {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border-color: #667eea;
}

.payment-option input[type="radio"] {
  width: 20px;
  height: 20px;
  accent-color: #667eea;
  cursor: pointer;
}

.payment-option i:first-of-type {
  color: #667eea;
  font-size: 18px;
}

.payment-option span {
  flex: 1;
  font-size: 14px;
  color: #374151;
  font-weight: 500;
}

.payment-option.active span {
  color: #1f2937;
  font-weight: 600;
}

/* Order Summary */
.order-summary {
  background: white;
  border-radius: 12px;
  padding: 20px;
}

.order-summary h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: #4b5563;
}

.summary-row.discount span:last-child {
  color: #ef4444;
}

.summary-row.total {
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
  padding-top: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
}

.summary-row.total span:last-child {
  color: #f59e0b;
  font-size: 20px;
}

.savings {
  font-size: 13px;
  color: #10b981;
  margin: 8px 0 0 0;
  text-align: right;
}

/* Free Shipping Note */
.free-shipping-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef3c7;
  border-radius: 8px;
  font-size: 13px;
  color: #92400e;
}

.free-shipping-note i {
  color: #f59e0b;
}

/* Place Order Button */
.btn-place-order {
  width: 100%;
  padding: 16px 24px;
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-place-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Modal 
*/
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s ease-out;
}

.store-modal {
  max-width: 600px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
}

.modal-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #6b7280;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
}

.btn-confirm {
  width: 100%;
  padding: 14px 24px;
  background: #e5e7eb;
  color: #6b7280;
  border: none;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-confirm.active {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: white;
}

/* Store Filters */
.store-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.store-filters select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  font-size: 15px;
  color: #6b7280;
  background: white;
  cursor: pointer;
}

.store-hours {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px 0;
}

.store-hours i {
  margin-right: 6px;
}

/* Store List */
.store-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.store-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.store-item:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.store-item input {
  margin-top: 4px;
}

.store-item input:checked + .store-info h4 {
  color: #667eea;
}

.store-info {
  flex: 1;
}

.store-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.store-info p {
  font-size: 13px;
  color: #6b7280;
  margin: 0 0 4px 0;
}

.store-info p i {
  width: 16px;
  margin-right: 6px;
  color: #9ca3af;
}

/* Responsive */
@media (max-width: 992px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }
  
  .checkout-right {
    position: static;
  }
}

@media (max-width: 576px) {
  .checkout-page {
    padding: 12px;
  }
  
  .checkout-section {
    padding: 16px;
  }
  
  .delivery-tabs {
    flex-direction: column;
  }
  
  .order-item img {
    width: 60px;
    height: 75px;
  }
}

/* B
ank Transfer Info */
.bank-transfer-info {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
  border: 1px solid #667eea;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.bank-transfer-info h4 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bank-transfer-info h4 i {
  color: #667eea;
}

.bank-account-display {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.bank-details {
  flex: 1;
}

.bank-details p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: #374151;
}

.bank-details p strong {
  color: #1f2937;
}

.bank-qr {
  text-align: center;
}

.bank-qr img {
  border: 2px solid #e5e7eb;
  background: white;
  padding: 8px;
}

@media (max-width: 768px) {
  .bank-account-display {
    flex-direction: column;
  }
  
  .bank-qr {
    width: 100%;
    margin-top: 16px;
  }
  
  .bank-qr img {
    max-width: 120px !important;
  }
}


/* Promo Modal */
.promo-modal {
  max-width: 480px;
}

.promo-input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.promo-input-group input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  text-transform: uppercase;
}

.promo-input-group input:focus {
  outline: none;
  border-color: #667eea;
}

.btn-apply-promo {
  padding: 14px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-apply-promo:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.promo-error {
  color: #ef4444;
  font-size: 13px;
  margin: 0 0 16px 0;
  padding: 10px 12px;
  background: #fef2f2;
  border-radius: 6px;
}

.available-coupons {
  margin-top: 20px;
}

.available-coupons h4 {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.coupons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 300px;
  overflow-y: auto;
}

.coupon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px dashed #d1d5db;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  background: white;
}

.coupon-item:hover {
  border-color: #667eea;
  background: #f9fafb;
}

.coupon-item.applied {
  border-color: #10b981;
  border-style: solid;
  background: #ecfdf5;
}

.coupon-item-left {
  flex: 1;
}

.coupon-item-code {
  font-size: 15px;
  font-weight: 700;
  color: #667eea;
  margin-bottom: 4px;
}

.coupon-item-desc {
  font-size: 13px;
  color: #374151;
  margin-bottom: 2px;
}

.coupon-item-condition {
  font-size: 12px;
  color: #9ca3af;
}

.coupon-item-right {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coupon-item-discount {
  font-size: 14px;
  font-weight: 600;
  color: #ef4444;
}

.applied-icon {
  color: #10b981;
  font-size: 18px;
}

.no-coupons {
  text-align: center;
  color: #9ca3af;
  padding: 20px;
  font-size: 14px;
}

/* Applied Promo Display */
.applied-promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #10b981;
  border-radius: 12px;
}

.applied-promo i:first-child {
  color: #10b981;
  font-size: 18px;
}

.applied-promo-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.applied-code {
  font-size: 14px;
  font-weight: 700;
  color: #10b981;
}

.applied-desc {
  font-size: 12px;
  color: #6b7280;
}

.btn-remove-coupon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-remove-coupon:hover {
  background: #fef2f2;
  border-color: #ef4444;
  color: #ef4444;
}

/* Toast Notification */
.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 14px 24px;
  background: #1f2937;
  color: white;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-notification.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-notification.info {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.toast-notification i {
  font-size: 16px;
}
