/* * GEA Woo Faceted Filters v2.1 (Unificado)
 * Paleta: 
 * Azul: #05243f (Primario)
 * Aqua: #5dc2b0 (Acento)
 * Gris: #d9d9d9 (Bordes)
 * Gris claro: #f7f9fb (Fondo inputs)
*/

.gea-wrap {
  display: grid;
  grid-template-columns: 280px 1fr; /* Layout principal */
  gap: 30px; /* Más espacio */
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(5, 36, 63, 0.06);
  padding: 24px;
  max-width: 100%;
}

/* --- Sidebar --- */
.gea-sidebar {
  padding-right: 0;
  border-right: 0;
}

.gea-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 2px solid #f0f2f4;
  padding-bottom: 12px;
}
.gea-head h3 {
  color: #05243f;
  margin: 0;
  font-size: 22px;
}
.gea-clear {
  background: transparent;
  border: none;
  color: #5dc2b0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  text-decoration: underline;
}
.gea-clear:hover {
  background: #eaf7f4;
  color: #05243f;
  text-decoration: none;
}

.gea-filter {
  margin-bottom: 24px;
}
.gea-filter h4 {
  color: #05243f;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0;
  margin-bottom: 12px;
}

/* --- Sidebar: Búsqueda --- */
.gea-search {
  margin-bottom: 24px;
}
.gea-search-input {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 12px 14px;
  box-sizing: border-box;
  background: #f7f9fb;
  font-size: 14px;
  color: #05243f;
  transition: all 0.2s ease;
}
.gea-search-input::placeholder {
  color: #7a8b99;
}
.gea-search-input:focus {
  border-color: #5dc2b0;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 194, 176, 0.2);
}

/* --- Sidebar: Checkboxes --- */
.gea-filter-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 5px;
}
.gea-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #f7f9fb;
  cursor: pointer;
  transition: all 0.2s ease;
}
.gea-check:hover {
  border-color: #5dc2b0;
  background: #eaf7f4;
}
.gea-check input[type="checkbox"] {
  accent-color: #5dc2b0;
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
}
.gea-check-label {
  flex-grow: 1;
  color: #05243f;
  font-weight: 500;
}
.gea-check-count {
  color: #7a8b99;
  font-size: 13px;
  flex-shrink: 0;
}
.gea-check input:checked + .gea-check-label {
  font-weight: 700;
  color: #05243f;
}

/* --- Sidebar: Precio --- */
.gea-price-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
}
.gea-price-row span {
  color: #d9d9d9;
  font-weight: 700;
}
.gea-price-row input {
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  box-sizing: border-box;
  background: #f7f9fb;
}
.gea-price-row input:focus {
  border-color: #5dc2b0;
  background: #fff;
  outline: none;
}

/* --- Sidebar: Botón Aplicar --- */
.gea-wrap .gea-actions {
  margin-top: 20px;
}
.gea-wrap .gea-actions .gea-apply.button {
  width: 100%;
  background: #05243f !important;
  color: #fff !important;
  border: 2px solid #05243f !important;
  border-radius: 12px !important;
  padding: 12px 16px !important;
  font-weight: 700 !important;
  text-align: center;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
}
.gea-wrap .gea-actions .gea-apply.button:hover {
  background: #5dc2b0 !important;
  border-color: #5dc2b0 !important;
  color: #05243f !important;
}


/* --- Main Content Area --- */
.gea-main {
  border-left: 1px solid #f0f2f4;
  padding-left: 30px;
}
.gea-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #f0f2f4;
  padding-bottom: 12px;
}
.gea-count {
  color: #05243f;
  font-weight: 700;
  font-size: 15px;
}
.gea-order {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gea-order label {
  font-size: 14px;
  color: #05243f;
  margin-bottom: 0;
}
.gea-order select {
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  padding: 8px 10px;
  color: #05243f;
  background-position: right 10px center;
}

/* --- Grilla de Productos y Cards --- */
#gea-products.gea-loading {
  opacity: .3;
  pointer-events: none;
  transition: opacity 0.3s;
}
#gea-products.products {
  display: grid;
  gap: 20px;
}
.gea-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  border: 2px dashed #d9d9d9;
  border-radius: 12px;
  color: #7a8b99;
}

/* --- Estructura de la Card de Producto --- */
#gea-products ul.products {
  height: min-content; /* CORRECCIÓN: Evita altura 100% */
  align-items: stretch;
  list-style: none !important;
  padding-left: 0;
}
#gea-products li.product {
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
  padding-bottom: 1.5em;
  box-sizing: border-box;
  list-style: none !important;
  
  /* Estilos visuales de la card */
  border: 1px solid #d9d9d9;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
#gea-products li.product:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(5, 36, 63, .10);
  border-color: #5dc2b0;
}

/* --- Contenido de la Card (Texto) --- */
#gea-products li.product h2.woocommerce-loop-product__title,
#gea-products li.product .price {
  padding-left: 15px;
  padding-right: 15px;
}
#gea-products li.product h2.woocommerce-loop-product__title {
  color: #05243f;
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.4;
  padding: 0 15px;
  margin-top: 10px;
  margin-bottom: 8px;
}
#gea-products li.product .price {
  display: block;
  padding: 0 15px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #5dc2b0;
  font-size: 17px;
}

/* --- Botones de la Card (Wishlist y Carrito) --- */

/* Contenedor de Wishlist (alineado al fondo) */
#gea-products li.product .tinv-wraper {
  padding: 0 15px; /* Padding L/R */
  margin-top: auto;  /* ¡MAGIA! Alinea al fondo */
  padding-top: 10px; /* Espacio antes del botón "Add to cart" */
}

/* Botón "Add to Wishlist" */
#gea-products li.product .tinvwl_add_to_wishlist_button {
  color: #05243f !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  border: 2px solid #eef3f7 !important;
  border-radius: 10px !important;
  padding: 8px 12px !important;
  background: #f7f9fb !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}
#gea-products li.product .tinvwl_add_to_wishlist_button:hover {
  color: #5dc2b0 !important;
  border-color: #5dc2b0 !important;
  background: #eaf7f4 !important;
}
#gea-products li.product .tinvwl_add_to_wishlist_button::before {
  color: #5dc2b0;
  font-size: 18px !important;
  margin: 0 !important;
}

/* Botón "Añadir al carrito" */
#gea-products li.product .button.add_to_cart_button {
  display: block;
  width: calc(100% - 30px);
  margin: 15px auto 0;
  background: #05243f !important;
  color: #fff !important;
  border: 2px solid #05243f !important;
  border-radius: 10px !important;
  padding: 10px 14px !important;
  font-weight: 700 !important;
  text-align: center;
  font-size: 15px;
  transition: all 0.3s ease;
}
#gea-products li.product .button.add_to_cart_button:hover {
  background: #5dc2b0 !important;
  border-color: #5dc2b0 !important;
  color: #05243f !important;
}

/* Botón "Ver Carrito" (estado 'added') */
#gea-products li.product .button.added_to_cart {
  display: block;
  width: calc(100% - 30px);
  margin: 15px auto 0;
  padding: 10px 14px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  text-align: center;
  font-size: 15px;
  transition: all 0.3s ease;
  background: #eaf7f4 !important;
  color: #05243f !important;
  border: 2px solid #5dc2b0 !important;
}
#gea-products li.product .button.added_to_cart:hover {
  background: #5dc2b0 !important;
  border-color: #5dc2b0 !important;
  color: #05243f !important;
}

/* --- Paginación (Versión Unificada contra Divi) --- */

/* El <ul>: Forzado a ser Flexbox */
.et_pb_column .gea-wrap .gea-pagination ul.gea-page-numbers {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  list-style: none !important;
  list-style-type: none !important;
  list-style-image: none !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  border: none !important;
  background: none !important;
}

/* El <li>: Forzado a ser un item en línea y SIN bullets */
.et_pb_column .gea-wrap .gea-pagination ul.gea-page-numbers li {
  list-style: none !important;
  list-style-type: none !important;
  list-style-image: none !important;
  background: none !important;
  display: inline-block !important;
  width: auto !important;
  padding: 0 !important;
  margin: 0 4px !important;
  border: none !important;
  flex-grow: 0 !important;
  flex-shrink: 0 !important;
}

/* Los <a> y <span> (los números en sí) */
.et_pb_column .gea-wrap .gea-page-numbers-item {
  display: inline-block;
  border: 1px solid #d9d9d9;
  border-radius: 8px;
  padding: 8px 14px;
  color: #05243f;
  text-decoration: none;
  font-weight: 600;
  min-width: 40px;
  text-align: center;
  transition: all 0.2s ease;
}
.et_pb_column .gea-wrap .gea-page-numbers-item.current,
.et_pb_column .gea-wrap .gea-page-numbers-item:hover {
  background: #05243f;
  color: #fff;
  border-color: #05243f;
  text-decoration: none;
}
.et_pb_column .gea-wrap .gea-page-numbers-item.dots {
  border: none;
  background: transparent;
}


/* --- Responsive --- */
@media (max-width: 768px) {
  .gea-wrap {
    grid-template-columns: 1fr; /* Stack vertical */
    padding: 16px;
    gap: 20px;
  }
  .gea-main {
    border-left: 0;
    padding-left: 0;
  }
  .gea-topbar {
    flex-direction: column;
    gap: 15px;
  }
  .gea-filter-list {
    max-height: 200px; /* Reducir altura en móvil */
  }
}

.woocommerce a.added_to_cart {
       display: block;
    width: calc(100% - 30px);
    margin: 15px auto 0;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    text-align: center;
    font-size: 15px;
    transition: all 0.3s 
ease;
}

/* ---
 * MEJORA: Ocultar botón "Aplicar"
 * Los filtros ahora son automáticos.
 * ---
*/
.gea-wrap .gea-actions {
  display: none;
}
