/* == CHECKOUT PAGE == */

.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 140px;
  background-color: #0a0a0a;
  min-height: 100vh;
}

.checkout-container {
  max-width: 1100px;
  margin: 0 auto;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: 60px;
}

.page-header h1 {
  font-size: 42px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.page-header p {
  font-size: 19px;
  color: #aaaaaa;
  max-width: 520px;
  margin: 0 auto;
}

/* Main Grid Layout */
.checkout-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 48px;
  align-items: start;
}
/* === ORDER SUMMARY SECTION === */

.order-summary {
  background-color: #1a1a1a;
  border-radius: 24px;
  padding: 36px;
  border: 1px solid #333333;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Individual Cart Item */
.cart-item-container {
  background-color: #222222;
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid #2f2f2f;
  transition: all 0.3s ease;
}

.cart-item-container:hover {
  border-color: #00d4ff;
  transform: translateY(-4px);
}

.cart-item-details-grid {
  display: grid;
  gap: 28px;
}

.product-image {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  border-radius: 12px;
  background-color: #111;
}

.product-name {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.4;
  color: #ffffff;
  margin-bottom: 12px;
}

.product-price {
  font-size: 21px;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 8px;
}

/* Delivery Options */
.delivery-date {
  color: #00d4ff;
  font-weight: 700;
  font-size: 19px;
  margin: 16px 0 20px;
}

.delivery-options-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  color: #ffffff;
}

.delivery-option {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 16px;
  padding: 14px 18px;
  background-color: #2a2a2a;
  border-radius: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.delivery-option:hover {
  background-color: #333333;
  border: 1px solid #00d4ff;
}

.delivery-option-input {
  margin: 0;
  cursor: pointer;
}

.delivery-option-date {
  color: #00d4ff;
  font-weight: 600;
  font-size: 16px;
}

.delivery-option-price {
  color: #999999;
  font-size: 15px;
}

/* === PAYMENT SUMMARY SECTION === */

.payment-summary {
  background-color: #1a1a1a;
  border-radius: 24px;
  padding: 36px;
  border: 1px solid #333333;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  position: sticky;
  top: 110px;
}

.payment-summary-title {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 28px;
}

.payment-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 17px;
  color: #cccccc;
  margin-bottom: 16px;
}

.payment-summary-money {
  font-weight: 600;
  text-align: right;
}

.subtotal-row .payment-summary-money {
  border-top: 1px solid #444;
  padding-top: 16px;
}

.total-row {
  font-size: 24px;
  font-weight: 800;
  color: #00d4ff;
  border-top: 2px solid #00d4ff;
  padding-top: 20px;
  margin-top: 12px;
}

/* Place Order Button */
.place-order-button {
  width: 100%;
  padding: 18px 0;
  background: linear-gradient(135deg, #00d4ff, #00b8d4);
  color: #000000;
  font-size: 19px;
  font-weight: 700;
  border: none;
  border-radius: 16px;
  margin-top: 32px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.place-order-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 212, 255, 0.4);
  background: linear-gradient(135deg, #00eaff, #00c8e0);
}

/* Quantity Editing Styles */
.quantity-input {
  width: 60px;
  background-color: #333;
  color: white;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 6px;
  display: none;
}

.save-quantity-link {
  display: none;
  color: #00d4ff;
  font-weight: 600;
  margin-left: 12px;
  cursor: pointer;
}

.is-editing-quantity .quantity-input {
  display: inline-block;
}

.is-editing-quantity .save-quantity-link {
  display: inline;
}

.is-editing-quantity .update-quantity-link,
.is-editing-quantity .quantity-label {
  display: none;
}

/* Responsive */
@media (max-width: 1000px) {
  .main {
    padding: 90px 20px 100px;
  }
  
  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .page-header h1 {
    font-size: 36px;
  }

   .payment-summary {
    grid-row: 1;
    margin-bottom: 20px;
    position: static;
  }
  
  .order-summary {
    grid-row: 2;
  }
}
