/* =========================================
   OVERLAY (PREMIUM)
========================================= */

.carrito-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

/* =========================================
   DRAWER CARRITO (PREMIUM)
========================================= */

.drawer-carrito {
    position: fixed;
    top: 0;
    right: 0;

    width: 390px;
    max-width: 100%;
    height: 100dvh;

    background: #ffffff;
    z-index: 1050;

    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

/* =========================================
   HEADER (PREMIUM)
========================================= */

.drawer-carrito-header {
    flex-shrink: 0;
    padding: 18px 16px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.06);

    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #fff;
}

/* =========================================
   TITLE
========================================= */

.drawer-carrito-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
    letter-spacing: -0.2px;
}

/* =========================================
   CLOSE BUTTON (PREMIUM)
========================================= */

.btn-cerrar-carrito {
    border: none;
    background: rgba(0, 0, 0, 0.04);

    width: 42px;
    height: 42px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.1rem;

    transition: all 0.2s ease;
}

.btn-cerrar-carrito:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: scale(1.05);
}

/* =========================================
   BODY (PREMIUM SCROLL)
========================================= */

.drawer-carrito-body {
    flex: 1;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    padding: 16px;

    background: #fff;

    scroll-behavior: smooth;
}

/* Scroll premium */
.drawer-carrito-body::-webkit-scrollbar {
    width: 6px;
}

.drawer-carrito-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

/* =========================================
   EMPTY STATE
========================================= */

.carrito-vacio {
    padding: 80px 20px;
    opacity: 0.8;
}

/* =========================================
   ITEMS CONTAINER
========================================= */

.carrito-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* =========================================
   ITEM PRODUCTO (PREMIUM CARD)
========================================= */

.carrito-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;

    padding: 14px;

    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;

    background: #fff;

    transition: all 0.25s ease;

    position: relative;
}

.carrito-item:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

/* =========================================
   IMAGEN
========================================= */

.carrito-item-imagen img {
    width: 70px;
    height: 70px;

    object-fit: cover;

    border-radius: 12px;

    border: 1px solid rgba(0, 0, 0, 0.06);

    background: #f8f9fa;
}

/* =========================================
   INFO
========================================= */

.carrito-item-info {
    flex: 1;
    min-width: 0;
}

.carrito-item-titulo {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111;

    margin-bottom: 4px;

    line-height: 1.3;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carrito-item-precio {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 8px;
}

/* =========================================
   BOTÓN ELIMINAR (PREMIUM FEEL)
========================================= */

.btn-outline-danger {
    transition: all 0.2s ease;
}

.btn-outline-danger:hover {
    transform: scale(1.03);
}

/* =========================================
   FOOTER (PREMIUM)
========================================= */

.drawer-carrito-footer {
    flex-shrink: 0;

    padding: 16px;

    border-top: 1px solid rgba(0, 0, 0, 0.06);

    background: #fff;

    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.05);
}

/* Totales más limpios */
.drawer-carrito-footer span {
    letter-spacing: -0.2px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 480px) {
    .drawer-carrito {
        width: 100%;
    }
}