/* CLEAN WOODMART MINI CART CSS (ADAPTADO A MYLISTING) */

/* === 1. CONTAINER === */
.cart-widget-side {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 340px;
  background-color: #fff;
  z-index: 999999;
  transform: translate3d(340px, 0, 0);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.cart-widget-side.woodmart-cart-opened {
  transform: translate3d(0, 0, 0);
}

.woodmart-close-side {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s ease 0.3s;
}

.woodmart-close-side.woodmart-close-side-opened {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
  transition-delay: 0s;
}

/* === 2. HEADER === */
.cart-widget-side .widget-heading {
  padding: 20px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(129, 129, 129, 0.2);
}

.cart-widget-side .widget-heading .title {
  font-size: 20px;
  font-weight: 600;
  text-transform: uppercase;
  color: #2d2a2a;
  margin: 0;
}

.cart-widget-side .close-side-widget {
  font-size: 0;
  position: relative;
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.cart-widget-side .close-side-widget::before,
.cart-widget-side .close-side-widget::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #333;
}

.cart-widget-side .close-side-widget::before {
  transform: rotate(45deg);
}

.cart-widget-side .close-side-widget::after {
  transform: rotate(-45deg);
}

/* === 3. LISTA DE PRODUCTOS === */
.cart-widget-side .widget_shopping_cart {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
}

.cart-widget-side .woocommerce-mini-cart {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-widget-side .woocommerce-mini-cart-item {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
  position: relative;
}

.cart-widget-side .woocommerce-mini-cart-item:last-child {
  border-bottom: none;
}

.cart-widget-side .woocommerce-mini-cart-item img {
  width: 65px;
  height: auto;
  margin-right: 15px;
  flex-shrink: 0;
}

.cart-widget-side .woocommerce-mini-cart-item .cart-info {
  flex: 1;
}

.cart-widget-side .woocommerce-mini-cart-item .product-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.cart-widget-side .woocommerce-mini-cart-item .variation,
.cart-widget-side .woocommerce-mini-cart-item .quantity {
  font-size: 13px;
  color: #777;
}

.cart-widget-side .woocommerce-mini-cart-item .remove_from_cart_button {
  position: absolute;
  top: 15px;
  right: 0;
  font-size: 16px;
  color: #bbb;
  transition: color 0.2s ease;
}

.cart-widget-side .woocommerce-mini-cart-item .remove_from_cart_button:hover {
  color: #f03d3d;
}

/* === 4. FOOTER === */
.cart-widget-side .shopping-cart-widget-footer {
  padding: 15px;
  border-top: 2px solid #efefef;
  background-color: #f8f8f8;
}

.cart-widget-side .woocommerce-mini-cart__total {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  padding-bottom: 10px;
  color: #2d2a2a;
}

.cart-widget-side .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  text-align: center;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout {
  background-color: #83b735;
  color: #fff;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout:hover {
  background-color: #74a32f;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.cart {
  background-color: #f7f7f7;
  color: #333;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.cart:hover {
  background-color: #efefef;
}

/* === 5. EMPTY CART === */
.cart-widget-side .woocommerce-mini-cart__empty-message {
  padding: 40px 15px;
  text-align: center;
  font-size: 14px;
  color: #999;
}

/* === 6. ANIMACIONES === */
@keyframes wd-rotate {
  100% {
    transform: rotate(360deg);
  }
}

.adding-to-cart .ajax_add_to_cart::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  border-left-color: transparent !important;
  border-radius: 50%;
  margin-left: 8px;
  vertical-align: middle;
  animation: wd-rotate 450ms infinite linear;
}

/* SUBTOTAL */
.cart-widget-side .woocommerce-mini-cart__total {
    margin-bottom: 15px;
    padding: 15px 0;
    border-top: 2px solid #efefef;
    border-bottom: 2px solid #efefef;
    color: #2d2a2a;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 14px;
    text-align: left; /* alineado a la izquierda */
}

/* BOTONES */
.cart-widget-side .woocommerce-mini-cart__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0 15px 20px; /* mover más abajo */
    margin-top: auto; /* empuja hacia el fondo */
}

.cart-widget-side .woocommerce-mini-cart__buttons .button {
    padding: 12px 20px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 13px;
    border-radius: 3px;
    background-color: #2d2a2a;
    color: #fff;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout {
    background-color: #cc9900; !important /* nuevo color */
    color: #fff;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout:hover {
    background-color: #b88a00; !important /* nuevo color */
    color: #fff;
}

/* MINI IMAGEN */
.woocommerce ul.cart_list li img, .woocommerce ul.product_list_widget li img {
    float: left;
    margin-right: 15px;
    width: 65px;
    height: auto;
}

/* CANTIDAD Y PRECIO UNITARIO */
.cart-widget-side .mini_cart_item .quantity,
.cart-widget-side .woocommerce-mini-cart-item .quantity {
    display: block;
    font-size: 14px;
    font-weight: 400; /* nuevo peso */
    color: #777;
    line-height: 1.5;
    margin-top: 5px;
}

.cart-widget-side .mini_cart_item .cart-info {
    flex: 1 1 auto;
    padding-right: 25px;
    display: flex;
    flex-direction: column;
}

.cart-widget-side .mini_cart_item .product-title {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 600;
    color: #2d2a2a;
}

.cart-widget-side .mini_cart_item .quantity {
    font-size: 13px;
    font-weight: 400;
    color: #777;
    margin-top: 0;
    line-height: 1.4;
}

.cart-widget-side .woocommerce-mini-cart-item .amount {
  font-weight: 600;
  color: #cc9900;
  font-size: 14px;
  display: inline-block;
  margin-top: 3px;
}

.cart-widget-side .widget_shopping_cart {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
}

.cart-widget-side .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: space-between;
}

.cart-widget-side .woocommerce-mini-cart-item .cart-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}


.cart-widget-side .woocommerce-mini-cart-item .amount {
  order: 3;
  font-weight: 600;
  font-size: 14px;
  color: #cc9900;
  margin-top: 2px;
}

.cart-widget-side .woocommerce-mini-cart-item .product-title {
  font-size: 14px;
  font-weight: 600;
  color: #2d2a2a;
  margin-bottom: 4px;
}

.cart-widget-side .woocommerce-mini-cart-item .quantity {
  font-size: 13px;
  font-weight: 400;
  color: #777;
  margin-top: 0;
  line-height: 1.4;
}


.cart-widget-side .shopping-cart-widget-footer {
  margin-top: auto;
  padding: 15px;
  border-top: 2px solid #efefef;
  background-color: #f8f8f8;
}

.cart-widget-side .shopping-cart-widget-total {
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  padding-bottom: 10px;
  color: #2d2a2a;
}

.cart-widget-side .buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}


/*Nuevo*/
.woocommerce-mini-cart-item .cart-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.woocommerce-mini-cart-item .cart-info .product-title {
    font-weight: 600;
    margin-bottom: 0;
}

.woocommerce-mini-cart-item .cart-info .quantity {
    font-size: 14px;
    color: #666;
}

.shopping-cart-widget-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.shopping-cart-widget-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 20px;
    box-shadow: 0 -1px 6px rgba(0,0,0,0.1);
    z-index: 10;
}

.woocommerce-mini-cart__total.total {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.woocommerce-mini-cart__buttons.buttons a.button {
    display: inline-block;
    margin-right: 10px;
    padding: 10px 20px;
}

/* === CORRECCIÓN: Producto en columna (imagen izquierda, textos en bloque) === */
.cart-widget-side .woocommerce-mini-cart-item {
  display: flex;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.cart-widget-side .woocommerce-mini-cart-item img {
  float: left;
  width: 65px;
  height: auto;
  margin-right: 15px;
  flex-shrink: 0;
}

.cart-widget-side .woocommerce-mini-cart-item > a:not(.remove) {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
}

.cart-widget-side .woocommerce-mini-cart-item > a:not(.remove) img {
  margin-right: 15px;
}

.cart-widget-side .woocommerce-mini-cart-item > a:not(.remove) {
  width: 100%;
}

.cart-widget-side .woocommerce-mini-cart-item .product-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: #2d2a2a;
}


/* === CORRECCIÓN: Subtotal y botones anclados abajo === */
.cart-widget-side .widget_shopping_cart_content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart-widget-side .woocommerce-mini-cart {
  flex-grow: 1;
}

.cart-widget-side .woocommerce-mini-cart__total {
  font-size: 16px;
  font-weight: 600;
  color: #2d2a2a;
  text-transform: uppercase;
  padding: 15px 0;
  border-top: 2px solid #efefef;
  border-bottom: 2px solid #efefef;
  margin: 0;
  text-align: center;
}

.cart-widget-side .woocommerce-mini-cart__buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
  padding-top: 15px;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  text-align: center;
  border: none;
  cursor: pointer;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout {
  background-color: #cc9900;
  color: #fff;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout:hover {
  background-color: #b88a00;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.cart {
  background-color: #f7f7f7;
  color: #333;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button.cart:hover {
  background-color: #efefef;
}

.cart-widget-side .woocommerce-mini-cart-item .price-line {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 13px;
  font-weight: 400;
  color: #777;
}

/*estos dos
.cart-widget-side .woocommerce-mini-cart-item .quantity {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: #777;
  margin-top: 4px;
}

.cart-widget-side .woocommerce-mini-cart-item .amount {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #cc9900;
  margin-top: 2px;
}

*/
.cart-widget-side .woocommerce-mini-cart-item .price-line {
  display: flex;
  gap: 6px;
  align-items: baseline;
  font-size: 13px;
  font-weight: 400;
  color: #777;
  margin-top: 2px;
}

.cart-widget-side .woocommerce-mini-cart-item .price-line .quantity,
.cart-widget-side .woocommerce-mini-cart-item .price-line .amount {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  color: inherit;
}

.woocommerce .widget_shopping_cart .cart_list li, .woocommerce.widget_shopping_cart .cart_list li {
    padding-left: 2em;
    position: relative;
    padding-top: 8px;
    padding-bottom: 8px;
}

.woocommerce .widget_shopping_cart .cart_list li a.remove, .woocommerce.widget_shopping_cart .cart_list li a.remove {
    position: absolute;
    top: 20px;
    left: 0;
}

a.added_to_cart.wc-forward {
    display: none !important;
}
