/* ==========================================
   MENÚ: CARRITO / CANVAS
   ========================================== */
/* Badge del icono */
.custom-cart-trigger { 
    align-items: center;
    background-color: var(--primario);
    border-radius: 50px;
    cursor: pointer; 
    display: flex;
    height: 38px;
    justify-content: center;
    position: relative; 
    width: 38px;    
}

.cart-count-badge {
    align-items: center;
    background: var(--alerta);
    border-radius: 50%;
    color: var(--blanco);
    display: flex;
    font-size: var(--e-global-typography-996197c-font-size)!important;
    height: 16px;
    justify-content: center;
    right: -6px;
    position: absolute;
    top: -5px; 
    width: 16px;
}

/* Canvas*/
#side-cart-panel {
    background: var(--blanco);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    position: fixed;
    right: -520px;
    transition: right 0.4s ease;
    top: 0;
    width: 510px;
    z-index: 999999;
}

#side-cart-panel.open {
    right: 0;
}

#side-cart-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 999998;
}

.side-cart-content-loop {
    display: flex;    
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.side-cart-header {
    background: var(--primario);
    color: var(--blanco);
    padding: 20px;
      height: 90px;
  flex-shrink: 0;
}

p.woocommerce-mini-cart__empty-message {
    color: var(--gris);
    font-size: var(--e-global-typography-text-font-size);
    font-weight: 500;
    padding: 20px;
}

/* Header Canvas */
.cart-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.side-cart-header h2 {
    font-size: var(--e-global-typography-ba4bbcd-font-size)!important;
}

span.cart-count-title {
    margin: 0 -2px;
}

#close-side-cart {
    cursor: pointer;
}

p.free-shipping-note {
    font-size: var(--e-global-typography-996197c-font-size)!important;
}

/* Cotenido */
.custom-cart-items-container {
    display: flex;
    flex: 1; 
    flex-direction: column;
    min-height: 0; 
}

.woocommerce-mini-cart {
    flex: 1;
    list-style-type: none!important;
    margin: 0;
    min-height: 0;
    padding: 20px!important;
    overflow-y: auto;
}

.cart-item {
    align-items: center;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

li.woocommerce-mini-cart-item {
    align-items: center;
    border-bottom: 1px solid var(--gris-claro);
    display: flex;
    gap: 20px;
    padding: 0 0 10px!important;
    margin-bottom: 10px!important;
}

.woocommerce-mini-cart li.woocommerce-mini-cart-item:after, .woocommerce-mini-cart li.woocommerce-mini-cart-item:before {
    display: none!important;
}

.cart-item-image img {
    border-radius: 5px;
    margin-left: 0!important;
    min-width: 90px;
    overflow: hidden;
    width: 90px;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    width: 230px;
}

a.product-name {
    color: var(--gris)!important;
    font-size: var( --e-global-typography-text-font-size )!important;
    font-weight: 500!important;
    padding-bottom: 10px;
    transition: all .4s;
    text-decoration: none!important;
    text-transform: none!important;
}

a.product-name:hover {
    color: var(--celeste)!important;
}

.quantity {
    color: var(--gris);
    font-size: var(--e-global-typography-ba4bbcd-font-size)!important;
    font-weight: 600!important;
}

.quantity span.woocommerce-Price-amount {
    color: var(--primario);
}

span.product-total-price {
    color: var(--gris)!important;
    font-size: var(--e-global-typography-996197c-font-size)!important;
}

/* Cantidad */
.quantity-selector .quantity-nav {
    display: flex;
    width: 75px;
}

.quantity-nav button {
    height: 25px!important;
    padding: 0!important;
    min-width: 21px!important;
}

input.cart-qty-input {
    height: 25px!important;
    padding: 0!important;
    min-width: 33px!important;
}

/* Footer */
.custom-cart-footer {
    box-shadow: 0 -29px 31.6px 0 rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    height: 177px;
    padding: 20px;
}

.woocommerce-mini-cart__total.total {
    display: flex;
    flex-direction: column;
}

.tax-shipping-note {
    color: var(--gris)!important;
    font-size: var(--e-global-typography-996197c-font-size)!important;
    margin-top: 5px;
}

.woocommerce-mini-cart__total.total span.woocommerce-Price-amount {
    color: var(--primario);
    font-size: var( --e-global-typography-2d75838-font-size )!important;
    font-weight: 600!important;
    line-height: 1em;
}

/* Botones */
.remove_from_cart_button {
    transition: all .4s;  
}

.remove_from_cart_button:hover {
    opacity: 0.6;
}

.woocommerce-mini-cart__buttons.buttons {
    align-items: center;
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.woocommerce-mini-cart__buttons a {
    background-color: transparent!important;
    border: 1px solid var(--primario)!important;
    border-radius: 50px!important;
    font-size: var( --e-global-typography-accent-font-size )!important;
    line-height: 1em!important;
    padding: 15px!important;
    position: relative!important;
    text-align: center;
    transition: all .4s;
    overflow: hidden!important;
    z-index: 1;
    width: 50%;
}

a.button.checkout {
    background-color: var(--primario)!important;
    color: var(--blanco)!important;
}

a.button.btn-ver-detalle {
    color: var(--primario)!important;
}

.woocommerce-mini-cart__buttons a:hover {
    border-color: var(--celeste)!important;
    color: var(--blanco)!important;
}

.woocommerce-mini-cart__buttons a:before {
    content: "";
    background-color: var(--celeste);
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    z-index: -1;
}

.woocommerce-mini-cart__buttons a:hover:before {
    transform: translateX(0);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
/* Mobile */
@media (max-width: 500px) {
    #side-cart-panel {
        right: -85%;
        width: 85%;
    }
    
    .cart-item-image img {
        min-width: 60px;
        width: 60px;
    }
    
    .cart-item-details {
        width: 80%;
    }
    
    .cart-item-details a.product-name {
        padding-bottom: 5px;
    }
    
    .woocommerce-mini-cart__buttons.buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-cart-footer {
        height: 200px;
    }

    .woocommerce-mini-cart__buttons.buttons a {
        padding: 12px!important;
        width: 100%;
    }

}

@media (max-width: 300px) {
    li.woocommerce-mini-cart-item.mini_cart_item {
        flex-direction: column;
        gap: 5px;
    }
        
    .cart-item-image {
        width: 100%;
    }
    
    .cart-item-image img {
        min-width: 50px;
        width: 50px;
    }

}