/* =====================================================================
   TIROIR « AJOUTÉ AU PANIER »
   Ordinateur : panneau à droite. Téléphone : feuille qui monte du bas, boutons larges et faciles à toucher.
   ===================================================================== */

html.sk-mc-lock { overflow: hidden; }

.sk-minicart { position: fixed; inset: 0; z-index: 100000; visibility: hidden; pointer-events: none; font-family: 'Montserrat', 'Poppins', system-ui, Arial, sans-serif; }
.sk-minicart.is-open { visibility: visible; pointer-events: auto; }

.sk-minicart-overlay { position: absolute; inset: 0; background: rgba(17, 17, 17, .55); opacity: 0; transition: opacity .3s ease; }
.sk-minicart.is-open .sk-minicart-overlay { opacity: 1; }

.sk-minicart-panel {
    position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100vw);
    background: #fff; color: #111; display: flex; flex-direction: column; outline: none;
    transform: translateX(100%); transition: transform .35s cubic-bezier(.16, 1, .3, 1);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .18);
}
.sk-minicart.is-open .sk-minicart-panel { transform: none; }

/* En-tête : coche beige + titre */
.sk-mc-head { display: flex; align-items: center; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid #eee; }
.sk-mc-check {
    flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--brand, #b29f75); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.sk-mc-headtext { flex: 1; min-width: 0; }
.sk-mc-head h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.2; color: #111; }
.sk-mc-sub { margin: 4px 0 0; font-size: 13px; color: #6b6b6b; line-height: 1.4; }
.sk-mc-close {
    flex: 0 0 44px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f4f1ea; color: #111; font-size: 16px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .2s ease, color .2s ease;
}
.sk-mc-close:hover { background: #111; color: #fff; }

/* Contenu du panier */
.sk-minicart-body { flex: 1 1 auto; overflow-y: auto; padding: 10px 22px; -webkit-overflow-scrolling: touch; }
.sk-mc-empty { margin: 30px 0; text-align: center; color: #6b6b6b; font-size: 14px; }
.sk-mc-items { list-style: none; margin: 0; padding: 0; }
.sk-mc-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0ece3; }
.sk-mc-thumb { display: block; width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: #f4f1ea; }
.sk-mc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-mc-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sk-mc-name { font-size: 14px; font-weight: 600; line-height: 1.35; color: #111; text-decoration: none; overflow-wrap: anywhere; }
.sk-mc-name:hover { color: var(--brand-mid, #8b7d5b); text-decoration: underline; }
.sk-mc-qty { font-size: 13px; color: #6b6b6b; }
.sk-mc-line { font-size: 14px; font-weight: 700; white-space: nowrap; }
.sk-mc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 0 6px; font-size: 14px; }
.sk-mc-total strong { font-size: 20px; font-weight: 700; color: var(--brand-mid, #8b7d5b); white-space: nowrap; }

/* Boutons : « Passer la commande » en grand, bien visible */
.sk-mc-foot { padding: 14px 22px calc(22px + env(safe-area-inset-bottom)); border-top: 1px solid #eee; display: grid; gap: 10px; background: #fff; }
.sk-mc-checkout {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; border-radius: 4px;
    background: #111; color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; border: 1px solid #111;
    transition: background .25s ease, border-color .25s ease;
}
.sk-mc-checkout:hover, .sk-mc-checkout:focus-visible { background: var(--brand, #b29f75); border-color: var(--brand, #b29f75); color: #fff; }
.sk-mc-cart {
    display: flex; align-items: center; justify-content: center; min-height: 50px; border-radius: 4px; border: 1px solid #111;
    background: #fff; color: #111; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .25s ease, color .25s ease;
}
.sk-mc-cart:hover { background: #111; color: #fff; }
.sk-mc-continue { min-height: 44px; border: 0; background: none; color: #6b6b6b; font: inherit; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; }
.sk-mc-continue:hover { color: #111; }

/* Le lien « Voir le panier » que WooCommerce ajoute sous les boutons des cartes est remplacé par le tiroir */
.prod-card .added_to_cart { display: none; }

/* ---------- Téléphone : feuille qui monte du bas ---------- */
@media (max-width: 640px) {
    .sk-minicart-panel {
        top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; max-height: 88dvh;
        border-radius: 22px 22px 0 0; transform: translateY(100%); box-shadow: 0 -10px 40px rgba(0, 0, 0, .22);
    }
    .sk-minicart.is-open .sk-minicart-panel { transform: none; }
    .sk-mc-head { padding: 18px 16px 14px; }
    .sk-mc-head::before { content: ''; position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px; background: #ddd; }
    .sk-mc-head { position: relative; padding-top: 22px; }
    .sk-minicart-body { padding: 6px 16px; }
    .sk-mc-item { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; }
    .sk-mc-thumb { width: 64px; height: 64px; }
    .sk-mc-foot { padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
    .sk-minicart-panel, .sk-minicart-overlay { transition: none; }
}
