a {
  text-decoration: none !important;
}

.page-header {
  background: url("/bundles/appfrontend/img/products/header.jpg") no-repeat
    center center;
  background-size: cover;
  margin: 0;
  height: 30rem;
  /* display: flex;
  align-items: center;
  justify-content: center; */
  width: 100%;
}

.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 90%;
}

.page-header h1 {
  color: white;
  font-size: 5rem;
  font-weight: 600;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.content {
  display: flex;
  justify-content: space-around;
}

.product-categories {
  width: 66%;
  margin-top: 5rem;
}

.categories-sidebar {
  width: 25%;
  margin-bottom: 3rem;
}

.products-title {
  margin-top: 5rem;
  margin-bottom: 3rem;
}

.category-image {
  margin: 2rem 1rem;
}

.categories-sidebar {
  margin-top: 5rem;
  width: 240px;
}

.cat-title {
  margin-top: 4rem;
  font-weight: 700;
  font-size: 2rem;
  color: #111;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-item a {
  color: #999;
  margin-bottom: 1rem;
}

.category-item a:hover {
  color: #337ab7;
}

.category-item a.active {
  color: #337ab7;
  font-weight: 600;
}

.cat-item {
  margin-bottom: 0.3rem;
}

.cat-btn {
  background: none;
  border: none;
  color: gray;
  font-weight: 500;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 3px 0;
  transition: color 0.2s;
}

.cat-btn:hover,
.subcat-list li:hover {
  color: #0068b4;
}

.cat-arrow {
  display: inline-block;
  margin-right: 6px;
  font-size: 2rem;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.cat-arrow.open {
  transform: rotate(90deg);
}

.subcat-list {
  list-style: none;
  padding-left: 1.2rem;
  margin: 0.2rem 0 0.4rem 0;
  color: #999;
  font-size: 1.5rem;
  line-height: 1.5;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.8s ease;
}

.subcat-list.open {
  max-height: 500px; /* suficiente para mostrar todo */
}

#loadMoreBtn {
  margin-bottom: 4rem;
  margin-left: auto;
  font-weight: 800;
  color: #0068b4;
  letter-spacing: 2px;
  text-decoration: underline;
}

#loadMoreBtn img {
  margin-left: 0.5rem;
}

#loadMoreBtn:hover {
  color: #004a8f; /* azul más oscuro */
}

.cat-title {
  cursor: pointer; /* importante para indicar que se puede clickear */
}

.cat-list {
  display: none; /* inicialmente oculto */
}

.cat-list.open {
  display: block; /* mostrar al desplegar */
}

.category-card {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: white;
}

.category-image {
  display: block;
  width: 100%;
  height: auto;
}

.category-card h3 {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0 10px;
  text-align: center;
  font-size: 3rem;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  white-space: normal; /* por si el texto es largo */
  width: 100%;
  letter-spacing: 3px;
}

.category-card:hover h3 {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.05);
  transition: 0.2s ease;
}

.products-top {
  margin-top: 4rem;
  margin-bottom: 2rem;
  margin-left: 2rem;
}

.products-top img {
  height: 16px;
  margin-right: 0.5rem;
  margin-bottom: 0.3rem;
}

.products-top a {
  text-decoration: underline;
  font-weight: 800;
  font-size: 2rem;
  width: 100%;
}

.products-top p {
  font-size: 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .categories-sidebar {
    width: 100%;
    margin-left: 1.5rem;
  }
}

@media (max-width: 768px) {
  .content {
    display: flex;
    flex-direction: column-reverse;
  }
  .categories-sidebar {
    width: 100%;
    margin-left: 1.5rem;
  }

  .product-categories {
    width: 90%;
    margin-left: 1.5rem;
  }
  .products-title {
    margin-left: 1rem;
  }

  #submenu-categorias {
    display: none;
  }
  #submenu-categorias.open {
    display: block;
  }

  .products-title {
    margin-top: 3rem;
  }

  .categories-sidebar {
    margin-top: 5rem;
    width: 66%;
    margin: auto;
  }

  .products-top {
    margin-top: 0rem;
  }
}
