/* Paleta SAM: navy #000033 · azul #1e40af · celeste #3399FF · borde #e6ecf5 */
    .sam-cd{position:fixed;inset:0;z-index:100080;font-family:var(--sam-font,inherit)}
    .sam-cd[hidden]{display:none}
    /* El velo entra con ANIMACIÓN, no con transición desde display:none: cuando el
       panel nace oculto, algunos navegadores no arrancan la transición y el velo
       quedaba invisible. Su estado base es visible y solo se desvanece al cerrar. */
    .sam-cd__back{position:absolute;inset:0;background:rgba(0,0,51,.5);backdrop-filter:blur(2px);
        opacity:1;animation:sam-cd-fade .22s ease both}
    .sam-cd:not(.is-open) .sam-cd__back{opacity:0;transition:opacity .22s ease}
    @keyframes sam-cd-fade{from{opacity:0}}
    .sam-cd__panel{position:absolute;top:0;right:0;bottom:0;width:min(420px,100%);display:flex;flex-direction:column;
        background:#f7fafd;box-shadow:-18px 0 50px rgba(0,0,51,.22);transform:translateX(100%);
        transition:transform .28s cubic-bezier(.22,1,.36,1)}
    .sam-cd.is-open .sam-cd__panel{transform:none}

    /* Cabecera */
    .sam-cd__head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;
        padding:16px 16px 14px 20px;background:linear-gradient(120deg,#000033,#12225c 60%,#1e40af);color:#fff}
    .sam-cd__head h2{margin:0;font-size:15px !important;font-weight:800 !important;letter-spacing:.2px;color:#fff !important;
        text-transform:uppercase;display:flex;align-items:center;gap:8px}
    .sam-cd-count{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;
        background:#1e6fd0;color:#fff;font-size:11.5px;font-weight:800;line-height:1}
    .sam-cd-count[hidden]{display:none}
    .sam-cd__x{width:34px !important;height:34px !important;min-width:0 !important;padding:0 !important;border:0 !important;
        border-radius:50% !important;background:rgba(255,255,255,.18) !important;color:#fff !important;display:grid;
        place-items:center;cursor:pointer;aspect-ratio:1/1;line-height:1 !important;box-shadow:none !important}
    .sam-cd__x:hover{background:rgba(255,255,255,.34) !important}

    /* Contenedor scrolleable + pie fijo */
    .sam-cd__inner{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}
    .sam-cd__body{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px}
    .sam-cd__progress:empty{display:none}
    .sam-cd__progress{margin:0 0 12px}
    /* La barra de mínimo viene con tipografía de 18px pensada para el carrito */
    .sam-cd__progress .shipping-progress-bar-container{padding:11px 14px;border-radius:12px;margin:0 !important}
    .sam-cd__progress .shipping-progress-message{font-size:12.5px !important;margin-bottom:7px;line-height:1.35}
    .sam-cd__progress .shipping-progress-track{height:7px}

    /* Ítems */
    .sam-cd__items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
    .sam-cd-item{position:relative;display:flex;gap:11px;padding:11px 34px 11px 11px;background:#fff;
        border:1px solid #e6ecf5;border-radius:14px;box-shadow:0 3px 12px rgba(0,0,51,.05)}
    .sam-cd-item__thumb{flex:0 0 auto;width:60px;height:60px;display:grid;place-items:center;background:#fff;
        border:1px solid #eef2f9;border-radius:10px;overflow:hidden}
    .sam-cd-item__thumb img{width:100%;height:100%;object-fit:contain;display:block}
    .sam-cd-item__body{min-width:0;flex:1 1 auto;display:flex;flex-direction:column;gap:4px}
    .sam-cd-item__name{font-size:12.5px;font-weight:700;line-height:1.3;color:#000033 !important;text-decoration:none !important;
        display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
    .sam-cd-item__name:hover{color:#1e40af !important}
    .sam-cd-item__unit{font-size:11.5px;font-weight:600;color:#5b6472;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
    .sam-cd-item__unit small{font-weight:600;color:#94a3b8}
    .sam-cd-item__unit bdi,.sam-cd-item__unit .woocommerce-Price-amount{color:#1e293b}
    .sam-cd-item__display{background:#eef4ff;color:#1e40af;font-size:10px;font-weight:800;text-transform:uppercase;
        letter-spacing:.3px;padding:2px 7px;border-radius:999px}
    .sam-cd-item__row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:2px}
    .sam-cd-item__sub{font-size:13.5px;font-weight:800;color:#000033;white-space:nowrap}
    .sam-cd-item__sub del{font-weight:600;color:#94a3b8;font-size:11.5px;margin-right:4px}

    /* Stepper */
    .sam-cd-qty{display:inline-flex;align-items:center;border:1px solid #dbe6f8;border-radius:999px;overflow:hidden;background:#fff}
    .sam-cd-qty__b{width:26px !important;height:26px !important;min-width:0 !important;padding:0 !important;border:0 !important;
        background:#fff !important;color:#000033 !important;font-size:15px;font-weight:800;line-height:1 !important;
        display:grid;place-items:center;cursor:pointer;box-shadow:none !important;border-radius:0 !important}
    .sam-cd-qty__b:hover{background:#eef4ff !important}
    .sam-cd-qty__b:disabled{opacity:.35;cursor:not-allowed}
    .sam-cd-qty__i{width:38px !important;height:26px !important;padding:0 !important;border:0 !important;border-radius:0 !important;
        text-align:center;font-size:12.5px !important;font-weight:800;color:#000033;background:transparent !important;
        box-shadow:none !important;-moz-appearance:textfield}
    .sam-cd-qty__i:focus{outline:none !important;box-shadow:none !important}

    /* Quitar */
    .sam-cd-item__rm{position:absolute;top:8px;right:8px;width:22px !important;height:22px !important;min-width:0 !important;
        padding:0 !important;border:0 !important;border-radius:50% !important;background:#f1f5f9 !important;color:#64748b !important;
        display:grid;place-items:center;cursor:pointer;aspect-ratio:1/1;box-shadow:none !important;line-height:1 !important;
        transition:background .15s ease,color .15s ease}
    .sam-cd-item__rm:hover{background:#000033 !important;color:#fff !important}

    /* Pie */
    .sam-cd__foot{flex:0 0 auto;padding:13px 14px 16px;background:#fff;border-top:1px solid #e6ecf5;
        box-shadow:0 -6px 18px rgba(0,0,51,.05)}
    .sam-cd__sub{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:11px}
    .sam-cd__sub span{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:#5b6472}
    .sam-cd__sub strong{font-size:20px;font-weight:800;color:#000033}
    .sam-cd__btns{display:grid;grid-template-columns:1fr 1.25fr;gap:9px}
    .sam-cd__btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:44px;border-radius:11px;
        font-size:13px;font-weight:800;text-decoration:none !important;letter-spacing:.2px;transition:background .15s ease,box-shadow .15s ease,transform .15s ease}
    .sam-cd__btn--ghost{border:1.5px solid #dbe6f8;background:#fff;color:#000033 !important}
    .sam-cd__btn--ghost:hover{border-color:#1e40af;background:#f7fafd}
    .sam-cd__btn--pay{background:linear-gradient(120deg,#000033,#1e40af 70%,#1e6fd0);color:#fff !important;
        box-shadow:0 6px 16px rgba(30,64,175,.28)}
    .sam-cd__btn--pay:hover{box-shadow:0 9px 22px rgba(30,64,175,.34);transform:translateY(-1px)}
    .sam-cd__btn--pay svg{width:15px;height:15px}
    .sam-cd__btn--pay.is-off{background:#e2e8f0;color:#64748b !important;box-shadow:none;cursor:not-allowed;font-size:12px}

    /* Vacío */
    .sam-cd__empty{flex:1 1 auto;display:flex;flex-direction:column;align-items:center;justify-content:center;
        text-align:center;gap:9px;padding:40px 26px}
    .sam-cd__empty-ic{width:66px;height:66px;display:grid;place-items:center;border-radius:50%;background:#eef4ff;color:#1e40af}
    .sam-cd__empty-ic svg{width:30px;height:30px}
    .sam-cd__empty h3{margin:4px 0 0;font-size:15px !important;font-weight:800 !important;color:#000033 !important}
    .sam-cd__empty p{margin:0;font-size:12.5px;color:#5b6472;line-height:1.45;max-width:28ch}
    .sam-cd__empty-cta{display:inline-flex;align-items:center;gap:8px;margin-top:6px;padding:11px 20px;border-radius:11px;
        background:linear-gradient(120deg,#000033,#1e40af 70%,#1e6fd0);color:#fff !important;font-size:13px;font-weight:800;
        text-decoration:none !important;box-shadow:0 6px 16px rgba(30,64,175,.26)}
    .sam-cd__empty-cta svg{width:14px;height:14px}

    /* Estado "actualizando": el panel se atenúa y aparece un spinner */
    .sam-cd__load{position:absolute;inset:0;display:none;place-items:center;background:rgba(247,250,253,.62);z-index:4}
    .sam-cd.is-loading .sam-cd__load{display:grid}
    .sam-cd__load span{width:30px;height:30px;border-radius:50%;border:3px solid #dbe6f8;border-top-color:#1e40af;
        animation:sam-cd-spin .7s linear infinite}
    @keyframes sam-cd-spin{to{transform:rotate(360deg)}}

    /* Móvil: bottom sheet */
    @media (max-width:768px){
        .sam-cd__panel{top:auto;left:0;right:0;bottom:0;width:100%;max-height:88vh;border-radius:18px 18px 0 0;
            transform:translateY(100%);box-shadow:0 -18px 44px rgba(0,0,51,.28)}
        .sam-cd__head{padding:14px 14px 12px 18px;border-radius:18px 18px 0 0}
        .sam-cd__btns{grid-template-columns:1fr 1fr}
        .sam-cd__foot{padding-bottom:calc(16px + env(safe-area-inset-bottom))}
    }
    html.sam-cd-lock,html.sam-cd-lock body{overflow:hidden !important}