/* ==========================================================================
   AXBEN CART DRAWER (Diseño Figma Match - COMPLETO)
   ========================================================================== */

/* Bloquear scroll del cuerpo cuando el carrito esté abierto */
body.cart-drawer-open {
    overflow: hidden !important;
}

/* ==========================================================================
   1. OVERLAY Y PANEL PRINCIPAL
   ========================================================================== */

/* Fondo oscuro */
.axben-cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Figma oscurece el fondo */
    z-index: 99998; /* Un nivel abajo del panel */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.axben-cart-drawer-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* El Cajón Lateral */
.axben-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    background-color: #ffffff;
    z-index: 99999; /* Siempre arriba de todo */
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
    
    /* Medidas FIGMA Desktop: 511px con ajuste responsive */
    width: 90%;
    max-width: 511px;
    
    /* Animación de entrada por la derecha */
    transform: translateX(100%);
    transition: transform 0.3s ease;
    
    display: flex;
    flex-direction: column; /* Estructura vertical para que el footer baje */
}

.axben-cart-drawer.is-active {
    transform: translateX(0);
}

/* ==========================================================================
   2. CABECERA VERDE
   ========================================================================== */
.cart-drawer-header {
    background-color: #00b912; /* Verde Figma */
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.drawer-title {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.drawer-close {
    background: #008a0d; /* Verde más oscuro para el botón */
    color: #ffffff;
    border: none;
    border-radius: 30px;
    padding: 6px 15px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.3s;
}
.drawer-close:hover { background: #00700a; }

/* ==========================================================================
   3. CONTENEDOR DE PRODUCTOS Y SCROLL
   ========================================================================== */
.cart-drawer-content {
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evita que el contenedor global se rompa */
    position: relative;
}

/* Área exclusiva para scrollear los productos */
.mc-scroll-area {
    flex-grow: 1;
    overflow-y: auto; /* Aquí ocurre la magia del scroll */
    padding-bottom: 20px;
}

/* Scrollbar personalizado */
.mc-scroll-area::-webkit-scrollbar { width: 6px; }
.mc-scroll-area::-webkit-scrollbar-track { background: #f9f9f9; }
.mc-scroll-area::-webkit-scrollbar-thumb { background: #00b912; border-radius: 10px; }

/* Estado de carga inicial */
.drawer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #888;
    font-size: 14px;
}

.spin { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ==========================================================================
   4. LISTA DE PRODUCTOS (Figma Match)
   ========================================================================== */
.cart_list {
    list-style: none;
    padding: 0 30px;
    margin: 0;
}

.woocommerce-mini-cart-item {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #f0f0f0;
}
.woocommerce-mini-cart-item:last-child { border-bottom: none; }

/* Columna Imagen */
.mc-image { flex-shrink: 0; margin-right: 20px; }
.mc-image img {
    width: 75px; 
    height: 75px !important;
    object-fit: contain;
    border-radius: 50%;
    border: 1px solid #eee;
}

/* Columna Info */
.mc-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Tags visuales */
.mc-tags { display: flex; gap: 6px; }
.tag-nuevo { background-color: #d93846; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; text-transform: uppercase;}
.tag-personalizable { background-color: #ab68f2; color: #fff; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }

.mc-meta { font-size: 12px; color: #a3a3a3; }

.mc-title {
    font-size: 15px;
    font-weight: 500;
    color: #111;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.3s;
}
.mc-title:hover { color: #00b912; }

/* Columna Acciones (X Verde) */
.mc-actions { flex-shrink: 0; margin-left: 15px; }
.mc-actions a { display: flex; transition: transform 0.2s; }
.mc-actions a:hover { transform: scale(1.1); }

/* ==========================================================================
   5. FOOTER (Fijo abajo con el botón)
   ========================================================================== */
.mc-footer {
    flex-shrink: 0; /* Evita que el footer se encoja al scrollear */
    padding: 20px 30px;
    background: #ffffff;
    border-top: 1px solid #f0f0f0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.03); /* Sombra suave hacia arriba */
}

.btn-mc-checkout {
    display: block;
    background-color: #00b912;
    color: #ffffff;
    text-align: center;
    padding: 18px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.3s;
}
.btn-mc-checkout:hover { background-color: #009d0f; color: #fff;}

/* Carrito vacío */
.woocommerce-mini-cart__empty-message { 
    text-align: center; 
    padding: 60px 30px; 
    color: #888; 
    font-size: 16px;
}