/* Shopping cart drawer (mirrors My Saves layout) */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 1001;
  pointer-events: none;
}
.cart-drawer.is-open {
  pointer-events: auto;
}
.cart-drawer[hidden] {
  display: none;
}
.cart-drawer:not([hidden]) {
  display: block;
}

.cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 37, 64, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.cart-drawer.is-open .cart-drawer__backdrop {
  opacity: 1;
}

.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.cart-drawer.is-open .cart-panel {
  transform: translateX(0);
}

.cart-panel__head {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e8edf2;
  position: relative;
}
.cart-panel__head h2 {
  margin: 0 2rem 0.35rem 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: #0d2818;
}
.cart-panel__hint {
  margin: 0;
  font-size: 0.875rem;
  color: #5c6c84;
}
.cart-panel__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  font-size: 1.5rem;
  line-height: 1;
  color: #0d2818;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
}
.cart-panel__close:hover {
  background: #f0f4f8;
}

.cart-panel__count {
  margin: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.8125rem;
  color: #5c6c84;
  text-align: right;
  border-bottom: 1px solid #eef1f5;
}

.cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-y: auto;
}
.cart-list__empty {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: #5c6c84;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #eef1f5;
  position: relative;
}
.cart-item__thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #e8edf2;
}
.cart-item__body {
  min-width: 0;
  padding-right: 1.5rem;
}
.cart-item__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0d2818;
  line-height: 1.3;
}
.cart-item__type {
  margin: 0 0 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5c6c84;
}
.cart-item__meta {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: #5c6c84;
  line-height: 1.4;
}
.cart-item__price {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0a2540;
}
.cart-item__remove {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  width: 1.75rem;
  height: 1.75rem;
  border: 0;
  background: transparent;
  color: #8a97a8;
  font-size: 1.25rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
}
.cart-item__remove:hover {
  background: #f0f4f8;
  color: #0d2818;
}
.cart-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}
.cart-item__actions .btn-cart-checkout-one {
  border: 0;
  background: #0a2540;
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
}
.cart-item__actions .btn-cart-checkout-one:hover {
  filter: brightness(1.08);
}

.cart-panel__foot {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #e8edf2;
  background: #fafbfc;
}
.cart-panel__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 700;
  color: #0d2818;
}
.cart-panel__total span:last-child {
  font-size: 1.15rem;
  color: #0a2540;
}
.btn-cart-checkout {
  display: block;
  width: 100%;
  border: 0;
  background: #ffc400;
  color: #0a2540;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}
.btn-cart-checkout:hover:not(:disabled) {
  filter: brightness(1.05);
}
.btn-cart-checkout:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-cart-continue {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  border: 0;
  background: transparent;
  color: #1668e3;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem;
  cursor: pointer;
}

/* Header cart button */
.btn-header-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  position: relative;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.btn-header-cart:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.btn-header-cart__icon {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
}
.btn-header-cart__badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.25rem;
  border-radius: 999px;
  background: #ff5a7a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
  text-shadow: none;
}

/* Tour detail "Add to cart" */
.btn-add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0 0 0.75rem;
  border: 2px solid #0a2540;
  background: #fff;
  color: #0a2540;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.10);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}
.btn-add-cart:hover {
  background: #0a2540;
  color: #fff;
  box-shadow: 0 6px 16px rgba(10, 37, 64, 0.25);
  transform: translateY(-1px);
}
.btn-add-cart:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(10, 37, 64, 0.18);
}
.btn-add-cart.is-added {
  border-color: #1a7f4b;
  background: #1a7f4b;
  color: #fff;
  box-shadow: 0 6px 16px rgba(26, 127, 75, 0.3);
}

.mobile-book-sheet__cart {
  display: block;
  width: 100%;
  margin-top: 0.55rem;
  min-height: 2.85rem;
  border: 1.5px solid #d5dde6;
  background: #fff;
  color: #0d2818;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mobile-book-sheet__cart:hover {
  background: #f7f9fb;
  border-color: #b0bcc9;
}

.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 1100;
  background: #0a2540;
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
  pointer-events: none;
}
.cart-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.cart-toast a {
  color: #ffc400;
  margin-left: 0.4rem;
  text-decoration: underline;
  pointer-events: auto;
  cursor: pointer;
}
