/* ===== Shopping Cart Page ===== */
.cart-page {
  padding-bottom: 64px;
}

.cart-notice {
  background: #f3e8ff;
  border-bottom: 1px solid rgba(15, 76, 129, 0.12);
  padding: 14px 0;
}

.cart-notice p {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-dark);
}

.cart-page__inner {
  padding-top: 32px;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Ticket-style cart card */
.cart-item {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 76, 129, 0.08);
  overflow: hidden;
}

.cart-item__body {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 20px;
  padding: 20px;
}

.cart-item__image {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item__content {
  min-width: 0;
}

.cart-item__title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
  margin-bottom: 4px;
}

.cart-item__title a:hover {
  color: var(--purple);
}

.cart-item__subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.cart-item__meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.cart-item__lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
}

.cart-item__lang-flag {
  font-size: 1rem;
}

.cart-item__refund {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-weight: 600;
  font-size: 0.82rem;
}

.cart-item__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.cart-item__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: #f3e8ff;
  color: var(--purple-dark);
  font-size: 0.78rem;
  font-weight: 600;
}

.cart-item__pill svg {
  flex-shrink: 0;
  opacity: 0.85;
}

/* Ticket tear line */
.cart-item__tear {
  position: relative;
  border-top: 2px dashed rgba(15, 76, 129, 0.2);
  margin: 0 12px;
}

.cart-item__tear::before,
.cart-item__tear::after {
  content: '';
  position: absolute;
  top: -10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #f8f6fc;
  box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.06);
}

.cart-item__tear::before {
  left: -22px;
}

.cart-item__tear::after {
  right: -22px;
}

.cart-travelers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.cart-travelers__label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.cart-travelers__select {
  min-width: 72px;
  padding: 10px 36px 10px 14px;
  border: 1.5px solid #e8e4f0;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--navy);
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237B42BC' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-travelers__select:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 66, 188, 0.12);
}

.cart-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
}

.cart-item__pricing {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}

.cart-item__unit {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 600;
}

.cart-item__unit small {
  font-weight: 500;
}

.cart-item__times {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.cart-item__price {
  display: inline-block;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: #dcfce7;
  color: #15803d;
  font-size: 1.1rem;
  font-weight: 800;
}

.cart-item__remove {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #dc2626;
  font-size: 0.88rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.cart-item__remove:hover {
  opacity: 0.8;
}

/* Empty state */
.cart-empty {
  text-align: center;
  padding: 64px 24px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.cart-empty h2 {
  font-size: 1.35rem;
  margin-bottom: 8px;
  color: var(--navy);
}

.cart-empty p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cart-empty .btn--primary {
  display: inline-flex;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--purple) 0%, var(--pink) 100%);
  color: var(--white);
  font-weight: 700;
}

/* Order summary */
.cart-summary__card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 76, 129, 0.08);
  padding: 24px;
  position: sticky;
  top: 96px;
}

.cart-summary__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.cart-summary__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #f3e8ff;
  color: var(--purple);
  flex-shrink: 0;
}

.cart-summary__label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cart-summary__total {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--purple);
  line-height: 1.2;
}

.cart-summary__tax {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 16px;
}

.cart-promo {
  margin-bottom: 14px;
}

.cart-promo__applied {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #e8f8ef;
  border: 1px solid #b8e6c8;
  border-radius: var(--radius-sm);
}

.cart-promo__badge {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  font-size: 0.9rem;
  color: #1b7a43;
}

.cart-promo__remove {
  font-size: 0.8rem;
  font-weight: 600;
  color: #b42318;
}

.cart-promo__remove:hover {
  text-decoration: underline;
}

.cart-summary__promo {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  margin-bottom: 10px;
  color: var(--purple);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.cart-summary__promo:hover {
  text-decoration: underline;
}

.cart-promo__form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.cart-promo__input {
  flex: 1;
  padding: 10px 14px;
  border: 1.5px solid #e8e4f0;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.9rem;
  text-transform: uppercase;
}

.cart-promo__input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(123, 66, 188, 0.12);
}

.cart-promo__apply {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: var(--white);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
}

.cart-promo__apply:hover {
  background: var(--purple-dark);
}

.cart-promo__apply:disabled {
  opacity: 0.7;
}

.cart-promo__msg {
  font-size: 0.82rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.cart-promo__msg.is-success {
  color: #1b7a43;
}

.cart-promo__msg.is-error {
  color: #b42318;
}

.cart-promo__msg.is-loading {
  color: var(--purple);
}

.cart-summary__discount-row,
.cart-summary__total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.cart-summary__discount-row strong {
  color: #16a34a;
  font-weight: 700;
}

.cart-summary__total-row {
  margin-bottom: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 76, 129, 0.1);
  font-weight: 700;
}

.cart-summary__grand {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--purple);
}

.cart-summary__checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-summary__checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(15, 76, 129, 0.35);
}

.cart-summary__trust {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
  border-top: 1px solid rgba(15, 76, 129, 0.1);
}

.cart-summary__trust li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

.cart-summary__trust svg {
  flex-shrink: 0;
  color: var(--purple);
  margin-top: 1px;
}

.icon-btn--cart {
  position: relative;
}

.cart-layout--empty .cart-summary {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary__card {
    position: static;
  }
}

@media (max-width: 640px) {
  .cart-item__body {
    grid-template-columns: 1fr;
  }

  .cart-item__image {
    max-height: 200px;
  }
}
