/*
 Theme Name:   P-Store Child
 Template:     astra
 Version:      1.0.0
*/

/* Tarjeta blanca */
li.product.custom-product-card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform 0.2s ease;
}

li.product.custom-product-card:hover {
  transform: translateY(-2px);
}

/* Contenido interior */
.custom-card-content {
  padding: 16px;
  text-align: left;
}
.notice-error{
    margin-top: -3px;
    padding: 1px 11px;
    /* border-left: 5px solid #46b450; */
    background: red;
    text-align: center;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    padding: 10px;
}
/* Badge de categoría */
.custom-badge {
  display: inline-block;
  font-size: 12px;
  color: #3366ff;
  background-color: #e6ecff;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 6px;
}

/* Precio en círculo perfecto, sobre la imagen, debajo del botón carrito */
li.product.custom-product-card {
  position: relative; /* para posicionar el círculo */
}

/* Precio círculo */
.custom-price-circle {
  position: absolute;
  bottom: -30px;  /* desde abajo de la imagen */
  right: 12px;
  background: #3366ff;
  color: #fff;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  z-index: 10;
  pointer-events: none; /* para que no interfiera con el botón carrito */
}
/* ordena elementos en card*/

li.custom-product-card .astra-shop-summary-wrap > * {
  padding-left: 16px;
  padding-right: 16px;
  display: block;
}

/* Opcional: margen vertical para separar */
li.custom-product-card .ast-woo-product-category {
  margin-bottom: 6px;
}

li.custom-product-card .woocommerce-loop-product__title {
  margin-top: 0;
  margin-bottom: 8px;
}

li.custom-product-card .price {
  margin-top: 0;
  margin-bottom: 12px;
}
li.custom-product-card .astra-shop-summary-wrap .price {
  display: none !important;
}

li.custom-product-card .ast-woo-product-category {
  display: inline-block;
  background-color: #e0f0ff;
  color: #0073aa;
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.85rem;
  margin-bottom: 8px;
  margin-left: 8px;
}
li.custom-product-card .ast-woo-product-category {
  display: inline-block !important;
  width: auto !important;
  max-width: none !important;
  white-space: nowrap;
}
li.custom-product-card .astra-shop-thumbnail-wrap img {
  transition: transform 0.3s ease;
}

li.custom-product-card:hover .astra-shop-thumbnail-wrap img {
  transform: scale(1.05);
}
/* columnas prods mobile*/
@media (max-width: 768px) {
  ul.products.columns-4 {
    display: grid;
    grid-template-columns: 1fr !important;
  }

  ul.products.columns-4 li.product {
    width: 100% !important;
  }
}

/* OCULTAR el botón estándar en desktop */
@media (min-width: 769px) {
  li.product > .add_to_cart_button {
    display: none !important;
  }
}

/* CENTRAR el botón estándar en mobile */
@media (max-width: 768px) {
  li.product > .add_to_cart_button {
    font-family: poppins;
		font-weight: 400;
		display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
		letter-spacing: 1px;
    width: calc(100% - 2rem) !important;
    margin: 1rem auto 1rem auto !important;
    border-radius: 10px;
    background-color: #3366ff;
    color: #fff;
    text-align: center;
		text-transform: inherit; 
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    border: none;
    font-size: 1rem;
    position: relative;
  }

  /* Quitar iconos previos si existen */
  li.product > .add_to_cart_button svg,
  li.product > .add_to_cart_button::before {
    display: none !important;
  }

  /* Agregar ícono carrito blanco con background */
  li.product > .add_to_cart_button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='826 837.5 140 121'%3E%3Cpath d='M878.77,943.611c0,2.75-1.005,5.131-3.015,7.141c-2.009,2.01-4.389,3.014-7.139,3.014c-2.75,0-5.13-1.004-7.139-3.014c-2.01-2.01-3.015-4.391-3.015-7.141c0-2.749,1.005-5.129,3.015-7.138c2.009-2.011,4.389-3.016,7.139-3.016c2.75,0,5.13,1.005,7.139,3.016C877.765,938.482,878.77,940.862,878.77,943.611z M949.846,943.611c0,2.75-1.005,5.131-3.015,7.141s-4.39,3.014-7.141,3.014c-2.748,0-5.129-1.004-7.138-3.014c-2.01-2.01-3.015-4.391-3.015-7.141c0-2.749,1.005-5.129,3.015-7.138c2.009-2.011,4.39-3.016,7.138-3.016c2.751,0,5.131,1.005,7.141,3.016C948.841,938.482,949.846,940.862,949.846,943.611z M960,857.306v40.615c0,1.27-0.438,2.393-1.311,3.371s-1.943,1.548-3.212,1.705l-82.815,9.678c0.687,3.174,1.031,5.024,1.031,5.554c0,0.846-0.635,2.539-1.904,5.076h72.979c1.375,0,2.564,0.503,3.569,1.508c1.006,1.005,1.508,2.194,1.508,3.569c0,1.376-0.502,2.564-1.508,3.569c-1.005,1.005-2.194,1.507-3.569,1.507H863.54c-1.375,0-2.565-0.502-3.57-1.507s-1.507-2.193-1.507-3.569c0-0.581,0.212-1.415,0.634-2.498c0.424-1.085,0.847-2.036,1.27-2.855c0.423-0.82,0.992-1.878,1.706-3.174s1.124-2.076,1.23-2.34l-14.041-65.285h-16.183c-1.375,0-2.564-0.502-3.569-1.507c-1.005-1.005-1.508-2.195-1.508-3.57c0-1.375,0.502-2.565,1.508-3.57c1.004-1.004,2.194-1.507,3.569-1.507h20.308c0.846,0,1.6,0.172,2.261,0.516s1.177,0.754,1.547,1.229c0.37,0.476,0.714,1.124,1.032,1.944c0.316,0.819,0.528,1.507,0.634,2.062c0.106,0.556,0.252,1.336,0.437,2.34c0.185,1.005,0.304,1.692,0.357,2.063h95.271c1.375,0,2.563,0.502,3.57,1.507C959.497,854.741,960,855.931,960,857.306z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;
    margin-right: 0.5rem;
  }
}
/*mini cart*/

/* === Mini Cart: Estilos Oscuros Personalizados === */

/* Fondo general y color de texto */
.woocommerce-mini-cart,
.woocommerce-mini-cart__empty-message,
.widget_shopping_cart,
.widget_shopping_cart_content,
.widget_shopping_cart_content h2,
.widgettitle,
.widget_shopping_cart h2 {
  background-color: #323232 !important;
  color: #e0e0e0 !important;
}

/* Encabezado */
.astra-cart-drawer-header {
  background-color: #323232 !important;
  border-bottom: 1px solid #676767!important;
  padding: 15px;
}

.astra-cart-drawer-title {
  color: #e0e0e0 !important;
  font-size: 1.2em;
  font-weight: 400;
}

/* Icono cerrar */
.astra-cart-drawer-close svg {
  color: #e0e0e0 !important;
  fill: #e0e0e0 !important;
}

/* Productos */
.woocommerce-mini-cart__product {
  background-color: #3a3a3a !important;
  border-bottom: 1px solid #2a2a2a !important;
  padding: 10px 0;
}
.woocommerce-js ul.product_list_widget li img {
  margin-left: 10px;
}

.woocommerce-mini-cart-item > a.remove {
  margin-right: 10px; /* margen a la derecha del botón eliminar */
}
.woocommerce-mini-cart-item:hover {
  background-color: #454545 !important;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
/* Textos dentro de productos */
.woocommerce-mini-cart-item__name,
.woocommerce-mini-cart-item__name a,
.woocommerce-mini-cart__quantity,
.woocommerce-mini-cart__product span,
.woocommerce-mini-cart__product a,
.woocommerce-mini-cart__product dt,
.woocommerce-mini-cart__product dd,
.widget_shopping_cart .total strong {
  color: #e0e0e0 !important;
}

/* Enlaces hover */
.woocommerce-mini-cart-item a:hover {
  color: #ffffff !important;
}

/* Botones: solo color de texto */
.woocommerce-mini-cart__buttons a,
.woocommerce-mini-cart-item a {
  color: #e0e0e0 !important;
  text-decoration: none;
}
.woocommerce-mini-cart__buttons .button:hover {
  background-color: #000 !important; /* Fondo negro */
  color: #fff !important;            /* Texto blanco */
}
/* Total del carrito */
.woocommerce-js .widget_shopping_cart .total,
.woocommerce-js.widget_shopping_cart .total {
  padding: 5px 0;
  border-top: 1px solid #676767;
  border-bottom: 1px solid #676767;
  margin-bottom: 1.3em;
}

/* Bordes generales */
.woocommerce-js .widget_shopping_cart .cart_list li,
.woocommerce-js .widget_shopping_cart li,
.woocommerce-js ul.product_list_widget .cart_list li,
.woocommerce-js ul.product_list_widget li,
cart .widget_shopping_cart,
.astra-cart-drawer {
  border-bottom: 1px solid #676767;
}
.woocommerce-mini-cart-item.mini_cart_item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 2rem !important;
}
.woocommerce-mini-cart-item .quantity{
  margin-top: 0 !important;
}
.woocommerce-mini-cart-item .remove {
  background-color: #000 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px;
  padding: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.woocommerce-mini-cart-item .remove:hover {
  background-color: #3366ff !important;
  color: #fff !important;
}
.woocommerce-mini-cart-item .remove {
  opacity: 1 !important;
}
.woocommerce-mini-cart-item .remove {
  position: relative;
}

 /*Tooltip oculto por defecto */
.woocommerce-mini-cart-item .remove::after {
  content: "Eliminar producto";
  position: absolute;
  top: -30px;
  right: 0;
  background-color: #000;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(5px);
  z-index: 99;
}

/* Mostrar tooltip en hover */
.woocommerce-mini-cart-item .remove:hover::after {
  opacity: 1;
  transform: translateY(0);
}

/* Tooltip en hover */
.woocommerce-mini-cart-item .remove[aria-label]:hover::after {
  background-color: #000 !important;
  color: #fff !important;
  opacity: 1 !important;
}


/* Estilo del botón de eliminar en mini-cart */
/* Acomoda el precio debajo de la descripción */
.woocommerce-mini-cart-item .quantity {
  display: block;
  margin-top: 10px;
  font-weight: bold;
  color: #3366ff;
  font-size: 14px;
  line-height: 1.5;
  text-align: left; /* Asegura que el precio esté alineado correctamente */
}

/* Arregla el botón de eliminar para que no tenga círculo detrás */
.woocommerce-mini-cart-item .remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  padding: 0;
  background: none !important;
  border: 1px solid transparent !important; /* Borde transparente */
  border-radius: 6px !important; /* border-radius para hacer el botón cuadrado con bordes redondeados */
  box-shadow: none !important; /* Elimina cualquier sombra */
}

/* Asegura que el ícono SVG no tenga fondo ni bordes */
.woocommerce-mini-cart-item .remove .ahfb-svg-iconset {
  background: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Elimina cualquier fondo visible detrás del ícono SVG */
.woocommerce-mini-cart-item .remove svg {
  display: block;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Ajusta la alineación y espaciado de los elementos dentro del mini-cart */
.woocommerce-mini-cart-item {
  display: flex;
  flex-direction: row; /* Asegura que los elementos estén alineados en una fila */
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
