/* Hơ Mông — Checkout Flow */

.checkout-main { padding: 32px 0 72px; min-height: 65vh; }

/* Progress steps */
.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.checkout-step-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
  font-weight: 600;
  transition: color 0.3s;
}

.checkout-step-indicator--active { color: var(--gold-light); }
.checkout-step-indicator--done { color: rgba(251, 191, 36, 0.7); }

.checkout-step-indicator__num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s;
}

.checkout-step-indicator--active .checkout-step-indicator__num {
  background: linear-gradient(135deg, #ef4444, var(--gold));
  border-color: transparent;
  color: var(--white);
}

.checkout-step-indicator--done .checkout-step-indicator__num {
  background: rgba(251, 191, 36, 0.2);
  border-color: var(--gold);
  color: var(--gold-light);
}

.checkout-step-indicator__label { display: none; }

@media (min-width: 640px) {
  .checkout-step-indicator__label { display: inline; }
}

.checkout-step-sep {
  width: 24px;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  align-self: center;
}

.checkout-page-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 28px;
}

/* Cart layout */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.cart-items { display: flex; flex-direction: column; gap: 16px; }

.cart-item-card {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 16px;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: border-color 0.3s;
}

.cart-item-card:hover { border-color: rgba(251, 191, 36, 0.3); }

.cart-item-card__img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius);
  object-fit: cover;
  background: rgba(0, 0, 0, 0.2);
}

.cart-item-card__info { min-width: 0; }

.cart-item-card__name {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 4px;
  font-size: 0.9375rem;
}

.cart-item-card__cat {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 10px;
}

.cart-item-card__price {
  font-weight: 800;
  color: var(--gold-light);
  font-size: 1rem;
}

.cart-item-card__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.qty-control__btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 1.125rem;
  font-weight: 700;
  transition: background 0.2s;
}

.qty-control__btn:hover { background: rgba(251, 191, 36, 0.15); }

.qty-control__val {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--white);
}

.cart-item-card__subtotal {
  font-weight: 800;
  color: var(--gold-light);
  font-size: 1.0625rem;
}

.cart-item-card__remove {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.8125rem;
  transition: color 0.2s;
}

.cart-item-card__remove:hover { color: #ef4444; }

/* Summary box */
.cart-summary-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.2);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: sticky;
  top: 96px;
}

.cart-summary-box__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.cart-summary-box__row--discount {
  color: #ef4444;
  font-weight: 700;
}

.cart-summary-box__row--discount span:last-child {
  color: var(--gold-light);
  font-size: 1rem;
}

.cart-summary-box__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0;
  margin-top: 8px;
  border-top: 2px solid rgba(251, 191, 36, 0.25);
}

.cart-summary-box__total-label {
  font-weight: 700;
  color: var(--white);
  font-size: 1rem;
}

.cart-summary-box__total-val {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Coupon */
.coupon-box {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.coupon-box__input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.coupon-box__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2);
}

.coupon-box__input::placeholder { color: rgba(255, 255, 255, 0.35); }

.coupon-box__btn {
  padding: 12px 20px;
  background: linear-gradient(135deg, #ef4444, var(--gold));
  color: var(--white);
  font-weight: 800;
  font-size: 0.75rem;
  text-transform: uppercase;
  border-radius: var(--radius);
  white-space: nowrap;
  transition: transform 0.25s, box-shadow 0.25s;
}

.coupon-box__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}

.coupon-msg {
  font-size: 0.8125rem;
  margin-top: 6px;
  min-height: 1.2em;
}

.coupon-msg--ok { color: var(--gold-light); }
.coupon-msg--err { color: #ef4444; }

/* Gift badge */
.gift-badge {
  display: none;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(251, 191, 36, 0.12));
  border: 2px solid rgba(251, 191, 36, 0.45);
  border-radius: var(--radius);
  animation: gift-pulse 2s ease-in-out infinite;
}

.gift-badge.is-visible { display: flex; }

.gift-badge__icon {
  font-size: 1.5rem;
  color: var(--gold-light);
  flex-shrink: 0;
}

.gift-badge__text {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.4;
}

@keyframes gift-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.2); }
  50% { box-shadow: 0 0 0 6px rgba(251, 191, 36, 0); }
}

/* Empty cart */
.cart-empty {
  text-align: center;
  padding: 80px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.cart-empty i { font-size: 3rem; margin-bottom: 16px; color: rgba(255,255,255,0.15); }

/* Checkout form */
.checkout-panel {
  max-width: 560px;
  margin: 0 auto;
}

.checkout-form { display: flex; flex-direction: column; gap: 20px; }

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-field textarea { min-height: 90px; resize: vertical; }

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.2), 0 0 12px rgba(239, 68, 68, 0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(255, 255, 255, 0.35); }

/* Payment methods */
.payment-methods { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.payment-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-card:hover { border-color: rgba(251, 191, 36, 0.35); }

.payment-card--active {
  border-color: var(--gold);
  background: rgba(251, 191, 36, 0.08);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15), 0 0 16px rgba(239, 68, 68, 0.1);
}

.payment-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(251, 191, 36, 0.15);
  color: var(--gold-light);
  font-size: 1.125rem;
}

.payment-card__label { font-weight: 600; color: var(--white); font-size: 0.9375rem; }

.bank-details {
  display: none;
  margin-top: 16px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  text-align: center;
}

.bank-details.is-visible { display: block; }

.bank-details__qr {
  width: 140px;
  height: 140px;
  margin: 0 auto 12px;
  background: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: 3rem;
}

.bank-details__text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}

.bank-details__account {
  font-weight: 700;
  color: var(--gold-light);
  margin-top: 8px;
  font-size: 0.9375rem;
}

/* Payment layout */
.payment-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* Thank you */
.thanks-panel {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px 24px;
}

.thanks-panel__icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(251, 191, 36, 0.2));
  color: var(--gold-light);
  border: 2px solid rgba(251, 191, 36, 0.4);
  animation: thanks-pop 0.6s ease;
}

@keyframes thanks-pop {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); opacity: 1; }
}

.thanks-panel__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 12px;
}

.thanks-panel__msg {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 28px;
  font-size: 0.9375rem;
}

.thanks-panel__order {
  display: inline-block;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.thanks-panel__order-label {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.thanks-panel__order-id {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, #ef4444, var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Step transitions */
.checkout-view {
  animation: step-in 0.4s ease;
}

@keyframes step-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.checkout-view[hidden] { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
  .cart-layout,
  .payment-layout { grid-template-columns: 1fr; }
  .cart-summary-box { position: static; }
}

@media (max-width: 560px) {
  .cart-item-card {
    grid-template-columns: 80px 1fr;
    grid-template-rows: auto auto;
  }
  .cart-item-card__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  .cart-item-card__img { width: 80px; height: 80px; }
}
