/* ═══════════════════════════════════════
   PANIER & FAVORIS
   ═══════════════════════════════════════ */

/* ── Icônes TopBar ── */
.cart-icon, .fav-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  transition: opacity 0.2s;
  opacity: 0.6;
}
.cart-icon:hover, .fav-icon:hover { opacity: 1; }
.cart-icon--dark  { color: var(--wild-ink); }
.cart-icon--light { color: var(--atelier-ink); }
.fav-icon--dark   { color: var(--wild-accent); }
.fav-icon--light  { color: var(--atelier-accent); }

.cart-badge {
  position: absolute; top: -2px; right: -4px;
  min-width: 16px; height: 16px;
  background: var(--wild-accent);
  color: var(--wild-bg);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  padding: 0 4px;
  line-height: 1;
}
.fav-count {
  font-family: var(--mono);
  font-size: 9px;
  margin-left: 2px;
  opacity: 0.7;
}

/* ── Drawer Overlay ── */
.cart-drawer-overlay {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  animation: cdFadeIn 0.3s ease;
}
@keyframes cdFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ── Drawer Panel ── */
.cart-drawer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(92vw, 440px);
  background: var(--wild-bg-2);
  border-left: 1px solid rgba(196,168,118,0.12);
  display: flex;
  flex-direction: column;
  animation: cdSlideIn 0.4s cubic-bezier(0.8, 0, 0.2, 1);
  color: var(--wild-ink);
}
@keyframes cdSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* ── Header ── */
.cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(196,168,118,0.1);
  flex-shrink: 0;
}
.cd-tabs { display: flex; gap: 4px; }
.cd-tab {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  opacity: 0.5;
  transition: all 0.2s;
}
.cd-tab.is-active {
  opacity: 1;
  border-color: rgba(196,168,118,0.3);
  background: rgba(196,168,118,0.06);
  color: var(--wild-accent);
}
.cd-close {
  font-family: var(--mono);
  font-size: 12px;
  opacity: 0.5;
  transition: opacity 0.2s;
  padding: 6px;
}
.cd-close:hover { opacity: 1; }

/* ── Body ── */
.cd-body {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
}
.cd-body::-webkit-scrollbar { display: none; }

.cd-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  opacity: 0.35;
}

/* ── Items panier ── */
.cd-items { padding: 12px 0; }

.cd-item {
  display: flex;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(196,168,118,0.06);
  transition: background 0.2s;
}
.cd-item:hover { background: rgba(196,168,118,0.03); }

.cd-item-img {
  width: 70px; height: 56px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(196,168,118,0.1);
}
.cd-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cd-item-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--wild-ink);
}
.cd-item-meta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--wild-ink-2);
}
.cd-item-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}
.cd-item-qty {
  display: flex;
  align-items: center;
  border: 1px solid rgba(196,168,118,0.15);
}
.cd-item-qty button {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--wild-ink-2);
  transition: background 0.2s;
}
.cd-item-qty button:hover { background: rgba(196,168,118,0.1); }
.cd-item-qty span {
  width: 28px; text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--wild-ink);
}
.cd-item-price {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--wild-accent);
  flex: 1;
  text-align: right;
}
.cd-item-rm {
  font-size: 10px;
  opacity: 0.35;
  transition: opacity 0.2s;
}
.cd-item-rm:hover { opacity: 1; color: #e24b4a; }

/* ── Footer panier ── */
.cd-footer {
  padding: 20px;
  border-top: 1px solid rgba(196,168,118,0.1);
  flex-shrink: 0;
}
.cd-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wild-ink-2);
  margin-bottom: 8px;
}
.cd-total-val {
  font-family: var(--serif);
  font-size: 28px;
  color: var(--wild-accent);
  letter-spacing: 0;
  text-transform: none;
}
.cd-shipping {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--wild-ink-2);
  opacity: 0.6;
  margin-bottom: 16px;
}
.cd-checkout {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--wild-accent);
  color: var(--wild-accent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all 0.25s;
  margin-bottom: 10px;
}
.cd-checkout:hover {
  background: var(--wild-accent);
  color: var(--wild-bg);
}
.cd-checkout.is-loading {
  opacity: 0.6;
  cursor: wait;
}
.cd-note {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--wild-ink-2);
  opacity: 0.45;
  text-align: center;
}

/* ── Favoris ── */
.cd-favs { padding: 12px 0; }
.cd-fav {
  display: flex;
  gap: 14px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(196,168,118,0.06);
  cursor: pointer;
  transition: background 0.2s;
}
.cd-fav:hover { background: rgba(196,168,118,0.03); }
.cd-fav-img {
  width: 60px; height: 48px;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.cd-fav-info { display: flex; flex-direction: column; gap: 3px; justify-content: center; }
.cd-fav-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}
.cd-fav-series {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--wild-ink-2);
}

/* ── Bouton favori sur photo ── */
.fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}
.fav-btn:hover { opacity: 1; }
.fav-btn.is-fav { color: var(--wild-accent); opacity: 1; }
.fav-btn .heart { font-size: 14px; transition: transform 0.2s; }
.fav-btn.is-fav .heart { transform: scale(1.15); }

/* ── Toast notification ── */
.wz-toast {
  position: fixed;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--wild-bg-2);
  border: 1px solid rgba(196,168,118,0.2);
  backdrop-filter: blur(12px);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--wild-ink);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 1.8s forwards;
  white-space: nowrap;
}
.wz-toast .check { color: var(--wild-accent); font-size: 14px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: translateX(-50%) translateY(-8px); } }
