#homecategories h4 {
    font-size: 1.375rem;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

/* ===== GRID ===== */
#homecategories ul.homecategories-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 25px;
    row-gap: 40px;   /* 🔥 espacio vertical */
    margin-bottom: 120px;
}

/* ITEMS */
#homecategories ul li {
    list-style: none;
    margin-bottom: 0;
}

/* TARJETAS */
#homecategories .featured-category {
    gap: 10px; /* 🔥 CLAVE */
    background-color: #fff;
    box-shadow: 2px 2px 8px 0 rgba(0,0,0,.2);
    width: 100%;
    height: 180px;
    display: flex;
    flex-direction: column; /* 🔥 añadido */
    justify-content: space-between; /* 🔥 añadido */
    align-items: center;
    padding: 10px;
}

/* TEXTO */
#homecategories .category_name {
    min-height: 40px; /* 🔥 CLAVE */
    display: flex;
    align-items: flex-start; /* 🔥 CAMBIO */
    justify-content: center;
    text-align: center;
    padding-top: 5px;
}
}

#homecategories .category_name a {
    width: 100%;
    display: block;
    line-height: 1.2;

}

/* DESCRIPCIÓN */
#homecategories .category_desc {
    text-align: center;
    line-height: 15px;
}

#homecategories .category_desc a {
    font-size: 12px;
    color: #232323;
    display: block;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  #homecategories ul.homecategories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  #homecategories ul.homecategories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  #homecategories ul.homecategories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* IMAGENES */
#homecategories .featured-category img {
    width: 100%;
    height: 160px;
    object-fit: contain;
    display: block; /* 🔥 añadido */
}