./* ===================== PÁGINA DE CATEGORÍA ===================== */

/* Posicionamiento de layout */
.page-layout-2columns-left .columns {
  display: flex;
  gap: 1px;
  align-items: flex-start;
}

.page-layout-2columns-left .sidebar-main {
  width: 250px;
  flex-shrink: 0;
}

.page-layout-2columns-left .column.main {
  flex-grow: 1;
}

@media (max-width: 768px) {
  .page-layout-2columns-left .columns {
    flex-direction: column;
  }

  .page-layout-2columns-left .sidebar-main {
    width: 100%;
    margin-bottom: 20px;
  }
}

/* ===================== FILTROS ===================== */
.custom-filters {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  padding: 0px;
  margin-bottom: 1px;
}


/* ===================== PRODUCTOS ===================== */
.products-container {
  flex-grow: 1;
  margin-top: 0 !important;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.custom-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 30px;
 margin-bottom: 30px;
}

@media (max-width: 768px) {
  .custom-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.custom-product-grid .product-item {
  background: white;
  border: 1px solid #003366;
  border-radius: 10px;
  padding: 1px;
  box-shadow: 0 6px 16px rgba(0, 51, 102, 0.15);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.4s ease forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-product-grid .product-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0, 51, 102, 0.4);
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-product-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

.custom-product-grid h3 {
  font-size: 17px;
  color: #1a1a1a;
  margin: 10px 0;
  min-height: 48px;
}

/* ===================== PRECIO ===================== */
.product-item .price-box .price {
  font-size: 30px;
  font-weight: 700;
  color: #E67E22;
  margin-top: 1px;
  display: inline-block;
  animation: fadeIn 0.4s ease-in-out;
}

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

/* ===================== BOTÓN AÑADIR ===================== */
.product-item form {
  margin-top: auto;
}

.add-to-cart {
  width: 100%;
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 16px;
  background-color: #1f12a8;
  color: white;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.add-to-cart:hover {
  background-color: #ffa733;
}

.custom-product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
 margin-bottom: 30px;
}

.product-item {
  height: 100%;
  display: flex;
 #003366  flex-direction: column;
  justify-content: space-between;
}
.custom-product-grid img {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}
/* Contenedor general del producto */
.custom-product-grid .product-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 400px; /* Ajusta según diseño */
}

/* Imagen con altura fija */
.custom-product-grid .product-item img {
  max-height: 220px;
  object-fit: contain;
  margin-bottom: 10px;
}

/* Título */
.custom-product-grid h3 {
  min-height: 48px; /* Para que no salten */
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Precio */
.custom-product-grid .price {
  font-size: 18px;
  font-weight: bold;
  color: #E67E22;
  margin-bottom: 10px;
  text-align: center;
}

/* Botón */
.custom-product-grid form {
  margin-top: auto;
}

.category-header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.category-title {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
}

.inline-filters {
    flex: 1;
    max-width: 600px;
}

.custom-layered-navigation {
  background-color: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}

.custom-layered-navigation h2 {
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 600;
}
.filter-group {
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding: 1px 0;
}

/* Encabezado del filtro (acordeón) */
.filter-title {
  font-size: 22px;
  color: #333;
  font-weight: 600;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  position: relative;
  padding-right: 20px;
}

.filter-title::after {
  content: "▼";
  position: absolute;
  right: 0;
  top: 0;
  transition: transform 0.3s ease;
}

.filter-group.open .filter-title::after {
  transform: rotate(180deg);
}

.filter-group.open .filter-content {
  display: block;
}

.filter-content {
  display: none;
  padding-top: 10px;
}

/* Estilo de cada grupo de filtros */
.filter-options-title {
  text-align: center;
  font-weight: bold;
  font-size: 16px;
  color: #333;
  border: 2px solid #FFA733;
  border-radius: 8px;
  background-color: #fff;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.filter-options-content {
  border: 2px solid #FFA733;
  border-radius: 8px;
  background-color: #fff;
  padding: 10px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

/* Links de cada opción dentro del filtro */
.filter-options-content a {
  display: block;
  padding: 6px;
  text-align: center;
  font-size: 14px;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.filter-options-content a:hover {
  background-color: #fff2e0;
  color: #E67E22;
}

/* Botón de limpiar filtros */
.filter-actions {
  margin-bottom: 20px;
  text-align: right;
}

.clear-filters {
  background-color: #eee;
  color: #333;
  padding: 6px 10px;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

/* Responsive filtros */
@media (max-width: 768px) {
  .custom-filters {
    padding: 10px;
  }
  .filter-title {
    font-size: 16px;
  }
}

.toolbar-products {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  padding: 10px 20px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  gap: 20px;
}

/* Modos de vista (cuadrícula / lista) */
.toolbar-products .modes {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Etiqueta "Ver como" */
.toolbar-products .modes-label {
  margin-left: 10px;
  font-weight: 600;
  font-size: 14px;
}

/* Paginación */
.toolbar.pager {
  margin: 0;
}

.toolbar.pager .pages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar.pager .pages .item {
  list-style: none;
}

.toolbar.pager .page,
.toolbar.pager .item.current strong {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  color: #1a1487;
  text-decoration: none;
}

.toolbar.pager .item.current strong {
  background-color: #1a1487;
  color: #fff;
}

/* Ordenar por */
.toolbar-products .toolbar-sorter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sorter-options {
  padding: 4px 6px;
  font-size: 14px;
}

.sorter-action {
  background: #1a1487;
  color: #fff;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-item .price-box {
    margin: 1px 0 1px;
}
