/* ==========================================================================
   MADAN TRADERS — Checkout page
   ========================================================================== */

.shan-checkout {
  padding: 150px 0px 50px 0;
  background-image: linear-gradient(rgba(210, 166, 121, 0.25), rgba(210, 166, 121, 0.25)), url(/static/app/assets/image/bg.webp) !important;
    background-blend-mode: hard-light;
    background-color: #D2A679;
}

.shan-checkout__form {
  border: 2px solid white;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-6);
}

.shan-checkout__form h3 {
  margin-bottom: var(--space-4);
  color: var(--shan-dark);
}

.shan-checkout__form .form-group {
  margin-bottom: var(--space-4);
}

.shan-checkout__form label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--shan-dark);
}

.shan-checkout__form input,
.shan-checkout__form textarea {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid #ddd;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: border-color 0.2s;
  background: transparent;
  color: white !important;
}

.shan-checkout__form input:focus,
.shan-checkout__form textarea:focus {
  outline: none !important;
  background: transparent !important;
  border-color: var(--shan-red);
}

.shan-checkout__summary {
  border: 2px solid white;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  position: sticky;
  top: 100px;
}

.shan-checkout__summary h3 {
  margin-bottom: var(--space-4);
  color: var(--shan-dark);
}

.shan-checkout__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid #eee;
  gap: var(--space-3);
}

.shan-checkout__item-image {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.shan-checkout__item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.shan-checkout__item-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.shan-checkout__item-name {
  font-weight: 600;
  color: var(--shan-dark);
}

.shan-checkout__item-qty {
  color: var(--shan-gold-light);
  font-size: 1.5rem;
}

.shan-checkout__item-price {
  font-weight: 700;
  color: var(--shan-red);
}

.shan-checkout__summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid #eee;
}

.shan-checkout__summary-row--total {
  border-bottom: none;
  border-top: 2px solid var(--shan-red);
  font-weight: 700;
  font-size: 1.2rem;
  margin-top: var(--space-2);
  padding-top: var(--space-4);
}

.shan-checkout__message {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  display: none;
}

.shan-checkout__message--success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.shan-checkout__message--error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ---------- localStorage checkout ---------- */
.shan-checkout__title {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: var(--space-5);
  color: #fff;
}

.shan-checkout__loading {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: 0;
  padding: var(--space-4) 0;
}

.shan-checkout__payment {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-2) 0 0;
}

.shan-checkout__payment i {
  color: var(--shan-gold-light);
}

.shan-checkout__form button[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.shan-checkout__item-name {
  overflow-wrap: anywhere;
}

.shan-checkout__item-price,
.shan-checkout__summary-row span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.shan-checkout__edit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  margin-top: var(--space-3);
  font-weight: 600;
  color: #fff;
}

.shan-checkout__edit:hover {
  color: var(--shan-gold-light);
}

.shan-checkout .alert p:last-child {
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .shan-checkout {
    padding-top: 130px;
  }

  .shan-checkout__summary {
    position: static;
  }

  /* On phones/tablets show the order summary before the form. */
  .shan-checkout .row > .col-lg-5 {
    order: -1;
  }
}

@media (max-width: 575.98px) {
  .shan-checkout {
    padding: 116px 0 40px;
  }

  .shan-checkout__form,
  .shan-checkout__summary {
    padding: var(--space-4);
  }

  .shan-checkout__form {
    margin-bottom: 0;
  }

  .shan-checkout__item-qty {
    font-size: 1rem;
  }
}
