/**
 * Panel lateral del carrito (tipo Tienda Nube): se abre al agregar un producto o al tocar el
 * ícono del carrito del header. Ver js/mf-cart-drawer.js. Componente nuevo, con sus propias
 * clases (prefijo mf-drawer-), no pisa nada de las hojas viejas.
 */

.mf-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 20, 30, 0.45);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
}

.mf-drawer-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mf-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 400px;
    max-width: 92vw;
    background: #fff;
    z-index: 2001;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
    display: flex;
    flex-direction: column;
}

.mf-drawer-overlay.is-open .mf-drawer {
    transform: translateX(0);
}

.mf-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #ECEDEF;
    flex: 0 0 auto;
}

.mf-drawer-head h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #22262B;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mf-drawer-close {
    border: none;
    background: #F1F2F4;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #22262B;
    cursor: pointer;
    font-size: 15px;
}

.mf-drawer-close:hover {
    background: #E5E6E9;
}

/* Aviso "se agregó al carrito" arriba del listado, aparece un instante y se desvanece */
.mf-drawer-added {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: #ECFDF3;
    color: #0E6B3A;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.mf-drawer-added i {
    font-size: 16px;
}

.mf-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 6px 18px;
}

.mf-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: #7A828C;
    gap: 10px;
    padding: 40px 10px;
}

.mf-drawer-empty i {
    font-size: 34px;
    color: #D8DADD;
}

.mf-drawer-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #F1F2F4;
}

.mf-drawer-item img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    background: #F7F8F9;
    border-radius: 8px;
    border: 1px solid #ECEDEF;
    flex: 0 0 auto;
}

.mf-drawer-item-info {
    flex: 1 1 auto;
    min-width: 0;
}

.mf-drawer-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #22262B;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.mf-drawer-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.mf-drawer-qty {
    display: flex;
    align-items: center;
    gap: 6px;
}

.mf-drawer-qty button {
    width: 24px;
    height: 24px;
    border: 1px solid #ECEDEF;
    background: #fff;
    border-radius: 6px;
    font-weight: 700;
    color: #22262B;
    cursor: pointer;
    line-height: 1;
}

.mf-drawer-qty button:hover {
    background: #F7F8F9;
}

.mf-drawer-qty span {
    min-width: 18px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
}

.mf-drawer-item-price {
    font-size: 13px;
    font-weight: 800;
    color: #22262B;
}

.mf-drawer-item-remove {
    border: none;
    background: transparent;
    color: #B5392E;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    margin-top: 4px;
}

.mf-drawer-item-remove:hover {
    text-decoration: underline;
}

.mf-drawer-foot {
    flex: 0 0 auto;
    padding: 14px 18px 18px;
    border-top: 1px solid #ECEDEF;
}

.mf-drawer-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 800;
    color: #22262B;
    margin-bottom: 12px;
}

.mf-drawer-min {
    font-size: 12px;
    color: #B5392E;
    background: #FDECEA;
    border-radius: 8px;
    padding: 8px 10px;
    margin-bottom: 12px;
}

.mf-drawer-btn {
    display: block;
    width: 100%;
    text-align: center;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .02em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
}

.mf-drawer-btn-primary {
    background: #FF5D01;
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 93, 1, 0.28);
}

.mf-drawer-btn-primary:hover {
    background: #E65100;
    color: #fff;
}

.mf-drawer-btn-secondary {
    background: transparent;
    color: #22262B;
    margin-top: 8px;
    font-weight: 600;
}

.mf-drawer-btn-secondary:hover {
    color: #FF5D01;
}

body.mf-drawer-locked {
    overflow: hidden;
}
