/* Bookshop cart: drawer, overlay, nav button. Kept neutral so it sits
   on any page of the site without fighting the theme. */
.cart-button {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 90;
}

.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 92vw);
  background: #fff;
  color: #222;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.25);
  transform: translateX(105%);
  transition: transform 0.25s ease;
  z-index: 91;
  display: flex;
  flex-direction: column;
  font-family: inherit;
}

.cart-drawer.open { transform: translateX(0); }

.cart-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e5e5;
}

.cart-drawer__head h3 { margin: 0; font-size: 1.15rem; }

.cart-drawer__head button {
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

#cart-items { flex: 1; overflow-y: auto; padding: 12px 20px; }

.cart-empty { color: #666; }

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
  position: relative;
}

.cart-item img { width: 56px; height: auto; object-fit: cover; }

.cart-item__info { display: flex; flex-direction: column; gap: 2px; font-size: 0.9rem; }

.cart-item__info span { color: #666; }

.cart-item__qty { display: flex; align-items: center; gap: 8px; grid-column: 2; }

.cart-item__qty button {
  width: 26px;
  height: 26px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.cart-item__line { grid-column: 3; grid-row: 1; font-weight: 600; }

.cart-item__remove {
  grid-column: 3;
  grid-row: 2;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 1.2rem;
}

#cart-footer { padding: 16px 20px; border-top: 1px solid #e5e5e5; }

.cart-row { display: flex; justify-content: space-between; margin-bottom: 6px; }

.cart-note { color: #666; font-size: 0.85rem; margin: 0 0 12px; }

.cart-error { color: #b00020; font-size: 0.9rem; margin: 0 0 12px; }

.cart-checkout {
  width: 100%;
  padding: 12px;
  border: none;
  background: #0b101e;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.cart-checkout:disabled { opacity: 0.6; cursor: wait; }

.edition-alt { margin: 8px 0 0; font-size: 0.85rem; }

.edition-alt a { text-decoration: underline; }
