/* BC Cart Upsell : styles neutres, surchargeables via les variables --bc-cu-* */
:root {
    --bc-cu-accent: #ffb400;
    --bc-cu-accent-text: #1a1a1a;
    --bc-cu-bg: #fff;
    --bc-cu-text: #222;
    --bc-cu-muted: #6b6b6b;
    --bc-cu-line: #e6e6e6;
    --bc-cu-ok: #2e8b3d;
    --bc-cu-radius: 10px;
}
html.bc-cu-lock { overflow: hidden; }
.bc-cu-overlay {
    position: fixed; inset: 0; z-index: 100000; background: rgba(0, 0, 0, .55);
    display: flex; align-items: center; justify-content: center; padding: 16px; box-sizing: border-box;
}
.bc-cu-modal {
    position: relative; box-sizing: border-box; background: var(--bc-cu-bg); color: var(--bc-cu-text);
    width: 100%; max-width: 900px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; overflow: hidden;
    border-radius: var(--bc-cu-radius); padding: 0; outline: 0; box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
}
.bc-cu-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 22px; -webkit-overflow-scrolling: touch; }
.bc-cu-x {
    position: absolute; top: 8px; right: 12px; border: 0; background: none; cursor: pointer;
    font-size: 30px; line-height: 1; color: var(--bc-cu-muted); padding: 4px 8px;
}
.bc-cu-ok { margin: 0; padding: 18px 56px 8px 22px; font-weight: 700; color: var(--bc-cu-ok); font-size: 16px; }
.bc-cu-ok:before { content: "\2713\00a0"; }
.bc-cu-sub { margin: 0 0 12px; font-size: 22px; line-height: 1.2; }
.bc-cu-group { padding: 10px 0; border-top: 1px solid var(--bc-cu-line); }
.bc-cu-group h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--bc-cu-muted); display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.bc-cu-more { font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--bc-cu-muted); text-decoration: none; white-space: nowrap; }
.bc-cu-more:hover, .bc-cu-more:focus { text-decoration: none; color: var(--bc-cu-text); }
.bc-cu-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bc-cu-card {
    display: grid; grid-template-columns: 76px 1fr; grid-template-rows: auto auto 1fr; column-gap: 10px;
    min-width: 0; padding: 8px; border: 1px solid var(--bc-cu-line); border-radius: 8px;
}
.bc-cu-img { grid-row: 1 / 4; display: block; width: 76px; height: 76px; background: #fff; border-radius: 6px; overflow: hidden; }
.bc-cu-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bc-cu-name {
    font-size: 13px; line-height: 1.25; color: var(--bc-cu-text); text-decoration: none; min-width: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bc-cu-meta { margin: 2px 0 6px; }
.bc-cu-price { margin: 0; font-weight: 700; font-size: 15px; }
.bc-cu-avail { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 11px; color: var(--bc-cu-muted); }
.bc-cu-dots { display: inline-flex; gap: 4px; }
.bc-cu-dot { display: block; width: 7px; height: 7px; border-radius: 50%; background: #ddd; }
.bc-cu-dot.is-green { background: #7ad03a; }
.bc-cu-dot.is-orange { background: #ffba00; }
.bc-cu-dot.is-red { background: #a00; }
.bc-cu-price small { font-weight: 400; font-size: 11px; color: var(--bc-cu-muted); }
.bc-cu-price del { color: var(--bc-cu-muted); font-weight: 400; margin-right: 4px; }
.bc-cu-price ins { text-decoration: none; }
.bc-cu-add {
    align-self: end; display: block; text-align: center; box-sizing: border-box; width: 100%;
    border: 0; border-radius: 6px; padding: 7px 8px; cursor: pointer; font-size: 13px; font-weight: 600;
    background: var(--bc-cu-accent); color: var(--bc-cu-accent-text); text-decoration: none;
}
.bc-cu-add:disabled { opacity: .7; cursor: default; }
.bc-cu-add.is-done { background: var(--bc-cu-ok); color: #fff; opacity: 1; }
.bc-cu-foot { flex: 0 0 auto; display: flex; gap: 10px; justify-content: flex-end; padding: 12px 22px 14px; border-top: 1px solid var(--bc-cu-line); background: var(--bc-cu-bg); }
.bc-cu-cont, .bc-cu-cart {
    border-radius: 6px; padding: 11px 18px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center;
}
.bc-cu-cont { border: 1px solid var(--bc-cu-line); background: #fff; color: var(--bc-cu-text); }
.bc-cu-cart { border: 1px solid var(--bc-cu-accent); background: var(--bc-cu-accent); color: var(--bc-cu-accent-text); }

@media (max-width: 640px) {
    .bc-cu-overlay { align-items: flex-end; padding: 0; }
    .bc-cu-modal { max-width: none; max-height: 92vh; border-radius: var(--bc-cu-radius) var(--bc-cu-radius) 0 0; }
    .bc-cu-body { padding: 0 12px; }
    .bc-cu-ok { padding: 14px 48px 6px 12px; }
    .bc-cu-sub { font-size: 19px; }
    .bc-cu-ok { font-size: 15px; }
    .bc-cu-row { grid-template-columns: 1fr; }
    .bc-cu-foot { padding: 10px 12px 12px; gap: 8px; }
    .bc-cu-cont, .bc-cu-cart { flex: 1; padding: 11px 6px; font-size: 14px; }
}

/* Confirmation d'ajout : carte produit, état du stock, messages */
html.bc-cu-confirm .emallshop-notice-wrapper { display: none !important; }
.bc-cu-modal--simple { max-width: 520px; }
.bc-cu-modal.is-error .bc-cu-ok { color: #b3261e; }
.bc-cu-modal.is-error .bc-cu-ok:before { content: "!\00a0"; }
.bc-cu-prod { display: flex; gap: 14px; align-items: center; margin: 10px 0 4px; padding: 10px 0; border-top: 1px solid var(--bc-cu-line); }
.bc-cu-pimg { flex: 0 0 84px; width: 84px; height: 84px; background: #fff; border-radius: 8px; overflow: hidden; }
.bc-cu-pimg img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bc-cu-pinfo { min-width: 0; }
.bc-cu-pname { display: block; font-weight: 700; font-size: 16px; line-height: 1.25; color: var(--bc-cu-text); text-decoration: none; }
.bc-cu-pprice { margin-top: 2px; font-size: 18px; font-weight: 700; }
.bc-cu-pprice small { font-weight: 400; font-size: 12px; color: var(--bc-cu-muted); }
.bc-cu-avail { margin-top: 4px; font-size: 13px; font-weight: 600; }
.bc-cu-avail.is-in { color: var(--bc-cu-ok); }
.bc-cu-avail.is-back { color: #b26a00; }
.bc-cu-avail.is-out { color: #b3261e; }
.bc-cu-msg { margin: 6px 0; font-size: 14px; line-height: 1.35; color: var(--bc-cu-muted); }
.bc-cu-msg.is-error { color: #b3261e; background: #fdecea; border-radius: 6px; padding: 8px 10px; font-weight: 600; }
.bc-cu-card .bc-cu-msg { grid-column: 2; font-size: 12px; padding: 4px 6px; margin: 2px 0 0; }
@media (max-width: 640px) {
    .bc-cu-modal--simple { max-width: none; }
    .bc-cu-pimg { flex-basis: 64px; width: 64px; height: 64px; }
    .bc-cu-pname { font-size: 15px; }
}

@media (prefers-reduced-motion: no-preference) {
    .bc-cu-overlay { animation: bc-cu-fade .18s ease-out; }
    @keyframes bc-cu-fade { from { opacity: 0; } to { opacity: 1; } }
}
