/* Panier latéral (drawer post-ajout) */
body.panlat-open {
    overflow: hidden;
}

.panlat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
    z-index: 9998;
}

.panlat-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.panlat-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(460px, 92vw);
    background: #fff;
    box-shadow: var(--box-shadow2);
    transform: translateX(100%);
    transition: transform 240ms ease;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.panlat-drawer.is-open {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {

    .panlat-overlay,
    .panlat-drawer {
        transition: none;
    }
}

.panlat-header {
    padding: 18px 18px 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panlat-title {
    margin: 0;
}

.panlat-close {
    border: 0;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 28px;
    line-height: 1;
    padding: 4px 10px 8px 10px;
    border-radius: 999px;
    color: rgba(0, 0, 0, 0.65);
}

.panlat-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.85);
}

.panlat-content {
    padding: 12px 18px;
    overflow: auto;
    flex: 1 1 auto;
}

.panlat-empty {
    color: rgba(0, 0, 0, 0.6);
    padding: 12px 0;
}

.panlat-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.panlat-media {
    width: 64px;
    height: 64px;
}

.panlat-img,
.panlat-img-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.45);
}

.panlat-item-title {
    font-weight: 600;
    line-height: 1.2;
}

.panlat-item-subtitle {
    color: rgba(0, 0, 0, 0.65);
    font-size: 0.8em;
    margin-top: 2px;
}

.panlat-meta {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    color: rgba(0, 0, 0, 0.65);
    font-size: 0.95em;
}

.panlat-unit__old {
    text-decoration: line-through;
    font-size: 0.75em;
}

.panlat-unit__disc {
    color: var(--bg1);
    font-size: 0.75em;
}

.panlat-unit__new {
    color: var(--bg1);
}

.panlat-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.panlat-line-total {
    font-weight: 600;
    white-space: nowrap;
}

.panlat-line-total.is-promo {
    color: var(--bg1);
}

.panlat-price-ref {
    margin-top: 2px;
    font-size: 0.75em;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.65);
    text-align: right;
    white-space: nowrap;
}

.panlat-price-ref__old {
    text-decoration: line-through;
}

.panlat-price-ref__disc {
    color: var(--bg1);
}

.panlat-footer {
    padding: 14px 18px 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.panlat-discount {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.panlat-discount-value {
    color: var(--bg1);
}

.panlat-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.panlat-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.panlat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9em;
}

.panlat-btn--primary {
    background: var(--bg1);
    color: #fff;
}

.panlat-btn--secondary {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.85);
}