/* Contenedor Principal */

#wsc-side-cart {

    position: fixed;

    right: -100%; /* Oculto por defecto */

    top: 0;

    width: 18%; /* 1/4 de la pantalla */

    height: 100%;

    background: #f4f4f4;

    box-shadow: -2px 0 10px rgba(0,0,0,0.2);

    z-index: 1999999;

    transition: right 0.3s ease;

    display: flex;

    flex-direction: column;

    border-radius: 10px 0 0 0;

}



#wsc-side-cart.open {

    right: 0;

}



/* Overlay oscuro */

#wsc-side-cart-overlay {

    position: fixed;

    top: 0; left: 0;

    width: 100%; height: 100%;

    background: rgba(0,0,0,0.5);

    display: none;

    z-index: 999999;

}



/* Ajustes responsivos para móviles */

@media (max-width: 768px) {

    #wsc-side-cart { width: 80%; }

}



/* Estética interna */

.wsc-header {

    padding: 20px;

    background: #f4f4f4;

    display: flex;

    justify-content: space-between;

    align-items: center;

    border-radius: 10px 0 0 0;



}

#titulo_carrito{
    font-size: 25px;
    font-weight:600;
}

.wsc-header-bis{
    display: flex;
    justify-content: center;
    margin: 0px 100px;
    background-color: #f4f4f4;
    z-index: 10;

}

#icono_teletest{
    width: 30px;
    padding-right: 10px;
}

.wsc-header-bis #texto{
    margin-top: -4px;
    font-size: 18px;
    font-weight: 600;

}

.linea-back{
    border-bottom: 1px solid #cfcfcf;
    position: absolute;
    top: 78px;
    margin: 0 17px 0 17px;
    width: 90%;
}

#wsc-close { cursor: pointer; font-size: 40px; }



.wsc-content {

    flex-grow: 1;

    overflow-y: auto;

    padding: 20px;

}



/* Botones inferiores de WooCommerce */

.wsc-content .woocommerce-mini-cart__buttons {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


/* --- Estilos para el listado de productos en el Side Cart --- */

/* Eliminar puntos y márgenes por defecto de la lista */
.wsc-content ul.cart_list, 
.wsc-content ul.mini_cart_item {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Contenedor de cada producto */
.wsc-content ul li.mini_cart_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    width: 100%; /* Ocupa el máximo del contenedor */
    position: relative;
    gap: 12px; /* Espacio entre elementos */
}

/* 1. Botón para borrar producto (la "x") */
.wsc-content .mini_cart_item a.remove {
    order: 1; /* Lo posicionamos al principio */
    position: relative;
    color: #ff4d4d !important;
    border: 1px solid #ff4d4d;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    font-size: 14px;
    text-decoration: none;
    flex-shrink: 0; /* Que no se deforme */
    background-color: white !important;
}

.wsc-content .mini_cart_item a.remove:hover {
    background: #ff4d4d;
    color: #fff !important;
}

/* 2. Imagen del producto */
.wsc-content .mini_cart_item img {
    order: 2;
    width: 60px !important; /* Tamaño fijo para la miniatura */
    height: 60px !important;
    object-fit: cover;
    margin: 0 !important;
    float: none !important; /* Quitamos el float de WC */
    border-radius: 4px;
    flex-shrink: 0;
}

/* 3. Contenedor de Nombre, Unidades y Precio */
/* WooCommerce suele envolver el nombre en un <a> y los precios en un <span> */
.wsc-content .mini_cart_item .wsc-details {
    order: 3;
    flex-grow: 1; /* Ocupa el espacio restante */
    display: flex;
    flex-direction: column;
}

/* Nombre del producto */
.wsc-content .mini_cart_item a:not(.remove) {
    display: flex;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.2;
    flex-direction: row-reverse;
    align-items: center;
}

/* Cantidad y Precio (estilo de WooCommerce: 1 × $10.00) */
.wsc-content .mini_cart_item .quantity {
    font-size: 13px;
    color: #777;
    display: block;
}

/* Estilo para el Pie del Carrito (Subtotal y Botones) */
.wsc-content .woocommerce-mini-cart__total {
    padding: 20px 0;
    text-align: center;
    margin-top: 10px;
    font-size: 18px;
}

.wsc-content .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Forzar que el botón de "Ver Carrito" sea ancho completo y destaque */
.wsc-content .woocommerce-mini-cart__buttons a {
    width: 100%;
    text-align: center;
    padding: 12px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    display: none !important;
}



.wsc-content .woocommerce-mini-cart__buttons a.checkout {
    background: #555; /* Diferenciar botón de pago si existe */
    display: block !important;
}


/* Contenedor del input */
.wsc-qty-wrapper {
    margin-top: 5px;
}

.wsc-qty-input {
    width: 60px !important;
    padding: 4px 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: #f9f9f9;
}

/* Ocultar flechas por defecto si se prefiere un diseño más limpio */
.wsc-qty-input::-webkit-inner-spin-button,
.wsc-qty-input::-webkit-outer-spin-button {
    opacity: 1; /* Mantenerlas visibles para facilitar el uso */
}

/* Alineación en el detalle */
.wsc-content .mini_cart_item .wsc-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.wsc-qty-wrapper {
    display: flex;
    align-items: center;
    margin-top: 8px;
    gap: 8px;
}

.wsc-qty-input {
    width: 55px !important;
    height: 30px !important;
    padding: 0 5px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px;
    text-align: center;
}

.wsc-price-display {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}


/*** nuevo diseño de carro ***/
/* Contenedor LI: Ajustamos para que la X flote a la derecha */
.wsc-content ul li.mini_cart_item {
    display: block !important; /* Cambiamos el flex anterior */
    position: relative;
    padding: 20px 0 !important;
    border-bottom: 1px solid #cfcfcf;
}

/* Ocultar imagen del producto si no aparece en tu diseño */
.wsc-content .mini_cart_item img {
    display: none !important;
}

/* Botón Eliminar (X) arriba a la derecha */
.wsc-content .mini_cart_item a.remove {
    position: absolute !important;
    right: 0;
    top: 20px;
    border: 1px solid #333 !important;
    color: #333 !important;
    width: 22px;
    height: 22px;
    line-height: 18px;
    font-size: 16px;
    border-radius: 50%;
}



/* Nombre del Producto */
.wsc-product-name {
    font-weight: 700;
    font-size: 20px;
    color: #001f3f; /* Azul oscuro de la imagen */
    margin-bottom: 15px;
    padding-right: 30px; /* Para que no choque con la X */
    text-transform: capitalize;
}

/* Fila de metadatos (Qty y Precio) */
.wsc-product-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Selector de cantidad con botones +/- */
.wsc-qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
}

.woocommerce .wsc-qty-controls button {
    background: #fff !important;
    border: none;
    width: 20px;
    height: 30px;
    cursor: pointer;
    font-size: 20px !important;
    font-weight: 600 !important;
    margin-top:0px !important;
    margin-bottom:0px !important;
    color:#4d4d4d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce .wsc-product-info-wrap .wsc-qty-input::-webkit-outer-spin-button,
.woocommerce .wsc-product-info-wrap .wsc-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.wsc-qty-input {
  -moz-appearance: textfield;
}

.woocommerce .wsc-qty-controls input {
    width: 35px !important;
    border: none !important;
    text-align: center;
    font-weight: bold;
    height: 30px !important;
    margin: 0 !important;
    background: #fff;
}

/* Precio a la derecha */
.woocommerce .wsc-price-display {
    font-weight: 700;
    font-size: 18px;
    color: #000;
}

.woocommerce #wsc-side-cart .woocommerce-mini-cart-item a:nth-child(2){
    display:none !important;
}

/*** footer carrito ***/
.footer_carrito{
    margin: 20px;
    /*display: flex;*/
    background-color: #D6EAC6;
    padding: 10px;
    border-radius: 10px;
    align-items: center;

}

.footer_imagen_carrito{
    width: 25%;
    float: left;
}

.footer_texto_carrito{
    width: 75%;
    float: left;
}

.footer_carrito img{
    width: 180px;
    margin-right:5px;
}



.footer_carrito .footer_texto_carrito p{
    font-size:12px;
    line-height: 15px;
}

.footer_carrito .footer_texto_carrito span{
    font-size:16px;
    padding-bottom:10px;
    
}

.footer-carrito-bis{
    display: flex;
    background: #f4f4f4;
    margin: 5px;
    border-top:1px solid #c0c0c0;
    border-radius: 0;
}

.footer-carrito-bis img{
    width: 58%;
    display: block;
    margin: 0 auto;
    
}


