/* Volet panier latéral */
.dm-drawer-root { --dm-primary: var(--primary-color, #7d7268); position: fixed; inset: 0; z-index: 100000; font-family: inherit; }
.dm-drawer-root[hidden] { display: none; }
.dm-drawer-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.dm-drawer { position: absolute; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100%; display: flex; flex-direction: column; background: #fff; box-shadow: -8px 0 30px rgba(0,0,0,.2); transform: translateX(100%); transition: transform .25s ease-out; color: #333; font-size: 16px; }
.dm-drawer-open .dm-drawer-overlay { opacity: 1; }
.dm-drawer-open .dm-drawer { transform: none; }
.dm-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #eee; }
.dm-drawer-head h3 { margin: 0; font-size: 1.25rem; }
.dm-drawer-x { width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: #f1efed; font-size: 1.5rem; line-height: 1; cursor: pointer; color: #333; }
.dm-drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; }
.dm-ditem { display: flex; gap: .9rem; padding: .85rem; margin-bottom: .75rem; border: 1px solid #eee; border-radius: 12px; }
.dm-dimg { flex: 0 0 72px; height: 72px; background: #f4f2f0; border-radius: 8px; overflow: hidden; }
.dm-dimg img { display: block; width: 100%; height: 100%; object-fit: cover; }
.dm-dtxt { flex: 1; min-width: 0; }
.dm-dname { display: block; font-weight: 600; color: #333; text-decoration: none; line-height: 1.3; }
.dm-dchip { display: inline-block; margin-top: .4rem; padding: .2rem .6rem; background: #f4f2f0; border-radius: 999px; font-size: 14px; }
.dm-dbottom { display: flex; align-items: baseline; justify-content: space-between; margin-top: .5rem; color: #666; font-size: 15px; }
.dm-dbottom strong { color: #222; font-size: 18px; }
.dm-drawer-foot { padding: .75rem 1.25rem 0; border-top: 1px solid #eee; }
.dm-drow { display: flex; justify-content: space-between; padding: .35rem 0; }
.dm-dtotal { font-size: 1.25rem; font-weight: 700; }
.dm-drawer-actions { display: flex; gap: .75rem; padding: .75rem 1.25rem 1.25rem; }
.dm-dbtn { flex: 1; display: inline-flex; align-items: center; justify-content: center; padding: .7rem 1rem; border: 1px solid var(--dm-primary); border-radius: 8px; background: var(--dm-primary); color: #fff !important; font-family: inherit; font-weight: 500; font-size: 15px; line-height: 1.2; text-decoration: none; cursor: pointer; }
.dm-dbtn:hover { filter: brightness(.9); }
.dm-dbtn-ghost { background: #fff; color: #333 !important; border-color: #d9d4cf; }
.dm-noscroll { overflow: hidden; }
@media (max-width: 520px) { .dm-drawer { width: 100%; } .dm-drawer-actions { flex-direction: column-reverse; } }
@media (prefers-reduced-motion: reduce) { .dm-drawer, .dm-drawer-overlay { transition: none; } }

.dm-drawer button.dm-dlink { background: none; border: 0; box-shadow: none; text-transform: none; letter-spacing: 0; font: inherit; font-weight: 600; color: #333; cursor: pointer; text-decoration: underline; padding: .5rem; }
.dm-drawer a.dm-dbtn { text-transform: none; letter-spacing: 0; font-weight: 600; background: var(--dm-primary); color: #fff; text-decoration: none; }
.dm-drawer-root, .dm-drawer-root * { box-sizing: border-box; }
.dm-drawer-root h3 { text-transform: none; letter-spacing: 0; }

/* Fiche produit : bouton secondaire, sous « Ajouter au panier ». */
#dm-form .dm-actions { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
#dm-form .dm-actions .dm-continue { width: 100%; margin: 0; }
#dm-form .dm-actions .dm-sample-btn { width: 100%; margin: 0; background: #fff; color: var(--dm-primary); border: 1px solid var(--dm-primary); }
#dm-form .dm-actions .dm-sample-btn:hover { background: var(--dm-primary); color: #fff; filter: none; }


/* Panier : ligne d'échantillon */
.dm-cart .dm-lsample { margin: .25rem 0 0; font-size: 15px; }

/* Message d'erreur */
.dm-sample-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 100001; max-width: min(92vw, 420px); padding: 12px 18px; border-radius: 10px; background: #b3261e; color: #fff; font-size: 15px; line-height: 1.35; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.dm-sample-toast.dm-on { opacity: 1; transform: translate(-50%, 0); }
