/* Checkout Page Styles */

.checkout-container {
  min-height: 60vh;
}

.checkout-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.checkout-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.checkout-qty-controls .btn {
  border-radius: 4px;
  font-weight: bold;
}

.checkout-qty-controls .form-control {
  border: 1px solid #dee2e6;
  border-radius: 4px;
}

/* Right Sidebar (Summary Card) */
.summary-card {
  background-color: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 30px;
  position: sticky;
  top: 100px;
}

/* Promo Code Section styling matching the previous sidebar */
.promo-section .input-group .form-control {
  border-right: none;
}

.promo-section .input-group .btn-dark {
  background-color: var(--color-teal); /* Now black due to global variables */
  border-color: var(--color-teal);
  font-weight: 600;
  white-space: nowrap;
}

.promo-message {
  font-size: 0.85rem;
  margin-top: 5px;
  display: none;
}

.promo-message.success {
  color: #198754;
}

.promo-message.error {
  color: #dc3545;
}

.promo-fine-print {
  font-size: 0.76rem;
  line-height: 1.4;
  color: #6c757d;
}

.active-promo-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.promo-code-tag {
  background-color: white;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.promo-code-tag:hover {
  background-color: var(--color-coral); /* Popmart Yellow */
  border-color: var(--color-coral);
  color: var(--color-teal);     /* Black text */
}

/* Make sure the main checkout button looks heavy and clickable */
.summary-card .btn-dark {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .btn-dark:hover {
  background-color: var(--color-coral);
  color: #000;
  border-color: var(--color-coral);
}

.checkout-clear-btn {
  width: 100%;
  padding: 12px;
  border-radius: 100px;
  border: 1.5px solid var(--clr-yellow);
  background: var(--clr-yellow);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.checkout-clear-btn:hover {
  border-color: var(--clr-yellow-dark);
  background: var(--clr-yellow-dark);
  color: #ffffff;
}

.checkout-continue-link {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.88rem;
}

.checkout-continue-link:hover {
  color: #111827;
}

.checkout-original-price {
  text-decoration: line-through;
  color: #777;
  margin-right: 4px;
}

.checkout-discounted-price {
  color: #198754;
  font-weight: 600;
}

#checkoutPointsEarnedLine {
  font-size: 0.95rem;
}

@media (max-width: 991px) {
  .summary-card {
    position: static;
    top: auto;
  }
}

@media (max-width: 768px) {
  .checkout-container {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }

  .checkout-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .checkout-item > .flex-grow-1 {
    min-width: 0;
  }

  .checkout-qty-controls {
    margin: 0 !important;
    width: 100%;
    justify-content: flex-start;
  }

  .checkout-item .text-end {
    width: 100%;
    text-align: left !important;
  }

  .summary-card {
    padding: 18px;
  }

  .checkout-clear-btn {
    min-height: 44px;
  }

  .promo-section {
    margin-bottom: 1.25rem;
  }

  .promo-section .input-group {
    flex-direction: column;
    gap: 10px;
  }

  .promo-section .input-group .form-control {
    border-right: 1px solid #ced4da;
    border-radius: 0.375rem;
    width: 100%;
    flex: 0 0 auto;
    min-height: 44px;
    font-size: 0.95rem;
    padding: 0.6rem 0.85rem;
  }

  .promo-section .input-group .btn-dark {
    width: 100%;
    flex: 0 0 auto;
    border-radius: 0.375rem;
    min-height: 44px;
    padding: 0.6rem 0.85rem;
  }

  .active-promo-codes {
    gap: 10px;
  }

  .promo-code-tag {
    padding: 6px 12px;
    font-size: 0.78rem;
  }
}
