/* ════════════════════════════════════════════════════════════
   PANIER LATÉRAL (drawer)
   ════════════════════════════════════════════════════════════ */

.bcd-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0);
  transition: background 0.3s ease;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}

.bcd-overlay[hidden] { display: none !important; }
.bcd-overlay.show { background: rgba(0,0,0,0.45); pointer-events: auto; }
html.bcd-lock { overflow: hidden; }

.bcd-panel {
  width: min(440px, 100vw);
  height: 100%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  box-shadow: var(--shadow-lg);
}

.bcd-overlay.show .bcd-panel { transform: translateX(0); }

.bcd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.bcd-head h2 {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.bcd-head__count {
  font-weight: var(--weight-regular);
  color: var(--muted);
  text-transform: none;
  font-size: 0.8rem;
}

.bcd-close {
  border: none;
  background: none;
  cursor: pointer;
  width: 32px; height: 32px;
  color: var(--black);
  display: flex; align-items: center; justify-content: center;
}
.bcd-close svg { width: 20px; height: 20px; }

.bcd-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  transition: opacity 0.15s ease;
}

.bcd-body.bcd-busy { opacity: 0.55; pointer-events: none; }

/* Bannière livraison gratuite */
.bcd-shipping {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--gray);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--black);
}

.bcd-shipping svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--muted); }
.bcd-shipping strong { font-weight: var(--weight-semibold); }

.bcd-shipping--unlocked { background: rgba(22,163,74,0.08); }
.bcd-shipping--unlocked svg { color: #16a34a; }
.bcd-shipping--unlocked strong { color: #16a34a; }

.bcd-shipping-bar {
  height: 4px;
  background: var(--border);
  margin: 0 24px 4px;
  border-radius: 4px;
  overflow: hidden;
}
.bcd-shipping-bar__fill {
  height: 100%;
  background: var(--gold-dark);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* Liste des articles */
.bcd-items {
  padding: 8px 24px;
}

.bcd-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.bcd-item:last-child { border-bottom: none; }

.bcd-item__thumb {
  flex-shrink: 0;
  width: 68px; height: 68px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray);
  display: block;
}
body .bcd-item__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }

.bcd-item__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bcd-item__name {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
  text-decoration: none;
}
.bcd-item__name:hover { color: var(--gold-dark); }

.bcd-item__meta {
  font-family: var(--font-body);
  font-size: 0.76rem;
  color: var(--muted);
}
.bcd-item__meta p { margin: 0; }

.bcd-item__qty {
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  width: fit-content;
}

.bcd-qty-btn {
  flex-shrink: 0;
  width: 26px; height: 26px;
  padding: 0;
  margin: 0;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 8px;
  transition: background 0.15s ease;
}
.bcd-qty-btn:hover { background: var(--gray); }
.bcd-qty-btn:disabled { color: var(--border); cursor: not-allowed; }

.bcd-qty-value {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: var(--weight-semibold);
}

.bcd-item__right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
}

.bcd-item__price {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
}

.bcd-item__remove {
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
}
.bcd-item__remove svg { width: 16px; height: 16px; }
.bcd-item__remove:hover { color: #dc2626; }

/* Panier vide */
.bcd-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--muted);
  text-align: center;
}
.bcd-empty svg { width: 48px; height: 48px; opacity: 0.4; }
.bcd-empty p { font-family: var(--font-body); font-size: 0.9rem; margin: 0; }
.bcd-empty__cta {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: var(--weight-semibold);
  color: var(--white);
  background: var(--black);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
}

/* ─── Étape "Ajouté au panier" ────────────────────────────────── */
.bcd-added__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
}

.bcd-added__thumb {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--gray);
  border: 1px solid var(--border);
  display: block;
}
body .bcd-added__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }

.bcd-added__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bcd-added__name {
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
  text-decoration: none;
}
.bcd-added__name:hover { color: var(--gold-dark); }

.bcd-added__meta {
  font-family: var(--font-body);
  font-size: 0.74rem;
  color: var(--muted);
}
.bcd-added__meta p { margin: 0; }

.bcd-added__price {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
}

.bcd-added__check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #16a34a;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.bcd-added__check svg { width: 12px; height: 12px; }

.bcd-added__actions {
  display: flex;
  gap: 8px;
  padding: 0 24px 20px;
}

.bcd-added__continue,
.bcd-added__viewcart {
  flex: 1;
  height: 38px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.bcd-added__continue {
  background: var(--white);
  border: 1.5px solid var(--black);
  color: var(--black);
}
.bcd-added__continue:hover { background: var(--black); color: var(--white); }

.bcd-added__viewcart {
  background: var(--black);
  border: 1.5px solid var(--black);
  color: var(--white);
}
.bcd-added__viewcart:hover { background: var(--gold-dark); border-color: var(--gold-dark); }

.bcd-added > .bcd-xsell {
  border-top: 8px solid var(--gray);
  padding-top: 28px;
}

/* Complétez le look */
.bcd-xsell {
  padding: 16px 24px 8px;
  border-top: 8px solid var(--gray);
}

.bcd-xsell__head {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: var(--weight-semibold);
  color: var(--black);
  margin-bottom: 12px;
}

/* Liste verticale de lignes pleine largeur — même logique de mise en
   page que .bcd-item (photo / infos / action alignés en une rangée),
   pour rester cohérent avec le reste du panier. */
.bcd-xsell__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bcd-xsell__row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bcd-xsell__thumb {
  flex: 0 0 44px;
  width: 44px; height: 44px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray);
  display: block;
  border: 1px solid var(--border);
}
body .bcd-xsell__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }

.bcd-xsell__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bcd-xsell__name {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: var(--weight-medium);
  color: var(--black);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bcd-xsell__name:hover { color: var(--gold-dark); }

.bcd-xsell__price {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: var(--weight-semibold);
  color: var(--gold-dark);
}

.bcd-xsell__add {
  flex-shrink: 0;
  width: 26px; height: 26px;
  padding: 0;
  margin: 0;
  border-radius: 7px;
  border: 1.5px solid var(--black);
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.18s ease, color 0.18s ease;
}
.bcd-xsell__add:hover { background: var(--black); color: var(--white); }

/* Footer sticky */
.bcd-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 18px 24px 22px;
  flex-shrink: 0;
  background: var(--white);
}

.bcd-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--font-body);
  margin-bottom: 14px;
}
.bcd-subtotal span { font-size: 0.85rem; color: var(--muted); }
.bcd-subtotal strong { font-size: 1.15rem; font-weight: var(--weight-bold); color: var(--black); }

.bcd-checkout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 52px;
  border-radius: 14px;
  background: #16a34a;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: background 0.18s ease;
}
.bcd-checkout svg { width: 18px; height: 18px; }
.bcd-checkout:hover { background: #128a3e; }

.bcd-payments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.bcd-pay {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: var(--weight-semibold);
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--black);
  display: inline-flex;
  align-items: center;
}

.bcd-pay--mtn { background: #ffcc08; border-color: #ffcc08; color: #1d1d1f; }
.bcd-pay--moov { background: #003399; border-color: #003399; color: #fff; }
.bcd-pay--visa { background: #1a1f71; border-color: #1a1f71; color: #fff; font-style: italic; letter-spacing: 0.03em; }
.bcd-pay--mc { background: #f7f7f7; gap: 2px; padding: 5px 8px; }
.bcd-pay--mc__dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.bcd-pay--mc__dot--1 { background: #eb001b; }
.bcd-pay--mc__dot--2 { background: #f79e1b; margin-left: -6px; opacity: 0.85; }

@media (max-width: 480px) {
  .bcd-panel { width: 100vw; }
}
