/* ===========================
   ICONO Y CONTADOR WISHLIST
=========================== */
.wishlist-link {
  position: relative;
  display: inline-block;
  margin-right: 15px;
  font-size: 24px;
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.wishlist-link:hover {
  color: var(--primary-color, #0a7e3b);
  transform: scale(1.1);
}

.wishlist-link .wishlist-count {
  position: absolute;
  top: -12px;
  right: -14px;
  background: #e63946;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  padding: 3px 7px;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  pointer-events: none;
}

/* ===========================
   MODAL BASE
=========================== */
.wishlist-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}

.wishlist-modal.active {
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
  padding: 20px;
}

/* ===========================
   MODAL CONTENT
=========================== */
.wishlist-modal-content {
  background: #fff;
  border-radius: 12px;
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease forwards;
  overflow: hidden;
}

@keyframes fadeIn {
  from { opacity:0; transform: translateY(-15px); }
  to { opacity:1; transform: translateY(0); }
}

/* ===========================
   BOTÓN CERRAR
=========================== */
.wishlist-close {
  position: absolute;
  top: 12px;
  right: 18px;
  font-size: 26px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 2;
}

.wishlist-close:hover {
  color: var(--primary-color, #0a7e3b);
}

/* ===========================
   CONTENIDO INTERNO
=========================== */
.wishlist-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

/* ===========================
   TABLA DE PRODUCTOS
=========================== */
.tinvwl-table-manage-list {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  font-size: 14px;
}

.tinvwl-table-manage-list thead {
  background: #f8f8f8;
}

.tinvwl-table-manage-list th,
.tinvwl-table-manage-list td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid #e0e0e0;
  vertical-align: middle;
}

.tinvwl-table-manage-list th.product-price {
  color: #0a7e3b;
  font-size: 16px;
  font-weight: bold;
}

.tinvwl-table-manage-list .product-thumbnail img {
  width: 60px;
  height: auto;
  border-radius: 6px;
  transition: transform 0.3s ease;
}

.tinvwl-table-manage-list .product-thumbnail img:hover {
  transform: scale(1.05);
}

.tinvwl-table-manage-list tbody tr:hover {
  background: #f6fef8;
  transition: background 0.3s ease;
}

/* ===========================
   BOTONES DE PRODUCTO
=========================== */
.tinvwl-table-manage-list button.button.alt {
  background: linear-gradient(135deg, #0a7e3b, #0f9d58);
  color: #fff;
  padding: 8px 14px;
  border-radius: 25px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: background 0.3s ease, transform 0.2s ease;
}

.tinvwl-table-manage-list button.button.alt:hover {
  background: linear-gradient(135deg, #056e31, #0a7e3b);
  transform: translateY(-1px);
}

/* ===========================
   FOOTER DE ACCIONES
=========================== */
.tinvwl-table-manage-list tfoot {
  background: #f9f9f9;
  padding: 15px;
  border-top: 1px solid #e0e0e0;
}

.tinvwl-table-manage-list tfoot .tinvwl-to-left,
.tinvwl-table-manage-list tfoot .tinvwl-to-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 10px 0;
}

/* Selector de acciones */
.tinvwl-table-manage-list select#tinvwl_product_actions {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  min-width: 180px;
  font-weight: 500;
  transition: border-color 0.3s ease;
}

.tinvwl-table-manage-list select#tinvwl_product_actions:hover {
  border-color: #0a7e3b;
}

/* Botones generales */
.tinvwl-table-manage-list button[name="tinvwl-action-product_apply"],
.tinvwl-table-manage-list button[name="tinvwl-action-product_selected"],
.tinvwl-table-manage-list button[name="tinvwl-action-product_all"] {
  background: #0a7e3b;
  color: #fff;
  padding: 10px 16px;
  border: none;
  border-radius: 25px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.tinvwl-table-manage-list button[name="tinvwl-action-product_apply"]:hover,
.tinvwl-table-manage-list button[name="tinvwl-action-product_selected"]:hover,
.tinvwl-table-manage-list button[name="tinvwl-action-product_all"]:hover {
  background: #056e31;
  transform: translateY(-1px);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
  .wishlist-modal-content {
    width: 98%;
    max-height: 90vh;
  }

  .tinvwl-table-manage-list thead {
    display: none;
  }

  .tinvwl-table-manage-list tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
  }

  .tinvwl-table-manage-list td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border: none;
    font-size: 13px;
  }

  .tinvwl-table-manage-list td.product-thumbnail {
    justify-content: center;
  }

  .tinvwl-table-manage-list td.product-name a {
    font-weight: bold;
  }

  .tinvwl-table-manage-list tfoot {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
}